Coder Social home page Coder Social logo

.emacs.d's People

Contributors

andersmurphy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

.emacs.d's Issues

Apheleia with zprint question

Hi Anders, I didn't know how else to contact you other than this so here I am creating an issue for a question. I found your blog where you were using zprint for clojure formatting. I have tried using it as well, but without success. My problem is that it looks like Apheleia is calling it's formatters with make-process and that does not work well with shell redirection as far as I could tell.

Here is my apheleia use-package

(use-package! apheleia
  :defer t
  :hook ((typescript-mode . apheleia-mode)
         (javascript-mode . apheleia-mode)
         (js2-mode . apheleia-mode)
         (clojure-mode . apheleia-mode))
  :config
  (setf (alist-get 'clj-zprint apheleia-formatters)
        '("clj-zprint"
          "{:style [:community :justified] :map {:comma? false}} <"
          file))
  (add-to-list 'apheleia-mode-alist '(clojure-mode . clj-zprint)))

And here is what I've tried to reproduce the issue:

(defun testcmd ()
  (let* ((command '("clj-zprint"
                    "{:style [:community :justified] :map {:comma? false}} <"
                    "/Users/dimiha/code/personal/clojure/fwpd/src/fwpd/core.clj"
                    ))
        (proc (make-process
               :name "zprint"
               :buffer (current-buffer)
               :command command)))))

(testcmd)
Unknown switch '/Users/dimiha/code/personal/clojure/fwpd/src/fwpd/core.clj'

Process zprint exited abnormally with code 1

As you can see, the process exits with status code 1 and what I think happens is that Emacs doesn't know how to do stdin redirection (<) when running a process outside a shell.

Have you had this problem as well? Or do you have any ideas why this is happening?

Thanks in advance!

Relevant code from your repo:

.emacs.d/init.el

Lines 732 to 735 in 15a040e

(setf (alist-get 'clj-zprint apheleia-formatters)
'("clj-zprint"
"{:style [:community :justified] :map {:comma? false}} <"
file))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.