1

I created a service in macOS so I could open any file with emacs as I wanted. The service was created using Automator with the following shell script: /usr/local/bin/../Cellar/emacs/25.3/bin/emacsclient -nc "$@"

While this service will always failed with the following message: emacsclient: could not get terminal name

Anyone has some clues? Thanks forward.

bigpan
  • 399
  • 2
  • 11
  • I was able to make this work under Automator using your command line without any special settings, loading a file into a running Emacs.app successfully. But I build my own Emacs.app rather than using homebrew, so there could well be a difference there. You might try passing the `--display ns` option to tell it to use the Mac windowing system, assuming you're not running your emacs in a terminal. – Steve Vinoski Oct 09 '17 at 12:52
  • Thanks very much for the solution and it works for me. Another workaround is `open -a Emacs “$@“` – bigpan Oct 23 '17 at 09:27

0 Answers0