# Open in external editor: emacs

edited December 2020

I am taking the red pill...

The first hangup is that "open in emacs" seems to only work if emacs isn't already running, and so only works for one file. My understanding, having used emacs years ago, is that you should use the emacsclient command-line tool to open files (located under the bin path when you open the Emacs.app package resource). I don't see a way to add that in The Archive though: TA seems to expect a .app file.

So, how can I use "open in emacs" from The Archive to open multiple files in succession?

## Comments

• Well I found one answer: use Doom emacs. I'm not sure what it's doing, but it apparently has whatever configuration is required to work nicely with "open in..."

• edited December 2021

@pat said:
I am taking the red pill...

The first hangup is that "open in emacs" seems to only work if emacs isn't already running, and so only works for one file. My understanding, having used emacs years ago, is that you should use the emacsclient command-line tool to open files (located under the bin path when you open the Emacs.app package resource). I don't see a way to add that in The Archive though: TA seems to expect a .app file.

So, how can I use "open in emacs" from The Archive to open multiple files in succession?

Create an Automator app called "Emacs-open". Make it execute a shell script configured to take arguments as input, and use with this:

/usr/local/bin/emacsclient --no-wait "\$*"


Now add "Emacs-open" as an External Editor option in The Archive.

Sign In or Register to comment.

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!