Opening emacsclient in terminal works, but will not work with Automator

Thus, I get a rather strange behavior when I try to use the Automator service to open emacs buffers (GNU Version 25.2 with spacemacs).

In my terminal, the command emacsclient -a '' -cworks as expected, opening a new buffer through emacsclient. However, when I do a service in Automator that just starts the shell ( /bin/bash) script: emacsclient -a '' -c I get an error: The action "Run Shell Script" encountered an error: "emacsclient: could not get terminal name"

On suspicion that this was due to the fact that Automator did not use any default variable PATH, I tried the following: PATH=/usr/local/bin:$PATH emacsclient -c which generated the same error as before.

Then I tried PATH=/usr/bin:/usr/local/bin export PATH; emacsclient -c as a result of which a different message appeared : The action "Run Shell Script" encountered an error: "emacsclient: invalid option -- c Try `emacsclient --help' for more information" however, why am I trying to use this script in my terminal, it also gives a similar error, which does not make much sense to me.

If anyone has suggestions on how to fix this, I would really appreciate it.

+4
source share
1 answer

, script emacsclient /usr/bin, Emacs.app/Contents/MacOS/bin/emacsclient. PATH, , emacsclient macOS emacs emacsclient: mac "

+2

Source: https://habr.com/ru/post/1694377/


All Articles