caldwell / build-emacs

Build scripts for www.emacsformacosx.com
http://www.emacsformacosx.com/about
GNU General Public License v3.0
364 stars 61 forks source link

Update to "Running Emacs.app from the command line" tip #128

Closed SaraCPickett closed 1 year ago

SaraCPickett commented 1 year ago

The tip for "Running Emacs.app from the command line" works, but I noticed that a modified version of the emacsclient instructions also works and seems cleaner. Instead of creating a shell script, you can just run: sudo ln -s /Applications/Utilities/Emacs.app/Contents/MacOS/Emacs /usr/local/bin/emacs

It's enough simpler that I think it would be worth updating the tip on the web site.

[Thank you for maintaining a build of emacs for macos!]

caldwell commented 1 year ago

Yeah… I basically took those from my setup:

$ type emacs
emacs is aliased to `ec'
$ echo $EDITOR
ec
$ echo $VISUAL
ec
$ which ec
/Users/david/bin/ec
$ cat $(which ec)
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -nw -c "$@"

I don't remember my reasons for all the indirection. It's pretty dumb, isn't it. It's probably something like, I set this up 20 years ago when I didn't know what I was doing and then never bothered to change it 🙂. My linux setup is more straightforward:

$ type emacs
emacs is aliased to `emacsclient -c -nw -a ""'
$ echo $EDITOR
emacsclient -c -nw -a ''
$ echo $VISUAL
emacsclient -c -nw -a ''
caldwell commented 1 year ago

I've changed it. Thanks!