reddit / emacs

emacs-mac: emacsclient doesnt exist.

jjbatard · 2022-08-22 06:36
Hi everyone, new doom emacs user here, running macos 12.5.1 I installed emacs-mac via homebrew, following the doom emacs documentation: ``` brew tap railwaycat/emacsmacport brew install emacs-mac --with-modules ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app ``` because of that last command, i now have the Emacs.app link in the Applications folder. In /usr/local/bin i have two symlinks to contents of that Emacs.app, one is emacs and the other is emacsclient: ``` MacBook-Pro-di-Raffo:bin simone$ ls -lah | grep emacs lrwxr-xr-x 1 simone admin 44B Jun 19 16:30 emacs -> /Applications/Emacs.app/Contents/MacOS/Emacs lrwxr-xr-x 1 simone admin 54B Jun 19 16:30 emacsclient -> /Applications/Emacs.app/Contents/MacOS/bin/emacsclient ``` emacs is fine, the problem lies with emacsclient: the whole bin folder doesnt exist! This is the Emacs.app/Contents/MacOS/ folder's contents: ``` MacBook-Pro-di-Raffo:bin simone$ ls -lah /Applications/Emacs.app/Contents/MacOS total 34296 drwxr-xr-x 5 simone admin 160B Aug 21 15:00 . drwxr-xr-x 6 simone admin 192B Aug 21 14:56 .. -rwxr-xr-x@ 1 simone admin 6.1M Aug 21 15:00 Emacs -rw-r--r-- 1 simone admin 11M Aug 21 15:00 Emacs.pdmp -rwxr-xr-x 1 simone admin 1.3K Apr 6 05:51 Emacs.sh ``` I can start the daemon server, i can run emacs alone and it seems to work fine, but of course if i try to run emacsclient it is command not found. Here the doom info: ``` generated Aug 21, 2022 17:02:59 system MacOS 12.5.1 Darwin 21.6.0 x86_64 emacs 28.1 ~/.emacs.d/ -> ~/.emacs.d/ doom 3.0.0-dev HEAD -> master, origin/master, origin/HEAD c44bc81a0 2022-08-19 11:24:34 +0200 ~/.doom.d/ -> ~/.doom.d/ shell /bin/bash features ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER THREADS TOOLKIT_SCROLL_BARS XIM ZLIB traits batch server-running envvar-file modules :completion company vertico :ui doom doom-dashboard hl-todo modeline ophints (popup +defaults) (vc-gutter +pretty) vi-tilde-fringe workspaces :editor (evil +everywhere) file-templates fold snippets :emacs dired electric undo vc :checkers syntax :tools (eval +overlay) lookup magit :os macos :lang emacs-lisp markdown org sh :config (default +bindings +smartparens) ``` If this is something straightforward that i should've just found around, i'm sorry. I googled all Yesterday but i don't really understand much of it so im just circling around. Thank you all.
[deleted] · 2022-08-22 06:43
[deleted]
berenddeboer · 2022-08-22 08:44
Can't help you with your particular problem, but this is how I install Emacs on Mac: `brew install emacs-head@28 --with-native-comp`
[deleted] · 2022-08-22 15:07
[deleted]
Ronis_BR · 2022-08-22 16:19
Hi! The `emacsclient` executable can be found in `/usr/local/bin/emacsclient`. However, unfortunately `emacs-mac` does not play well with daemon mode in macOS. If you start the daemon in GUI, `emacsclient` will always open a new frame in GUI. If you start in the terminal, `emacsclient` will always open in terminal mode. Furthermore, if you close the last GUI in the former scenario, it kills the daemon for some reason. I tried a lot to make it work without success. There is an issue to track this behavior but seems staled: https://github.com/railwaycat/homebrew-emacsmacport/issues/52 The only feature I really needed in emacs-mac was HiDPI PDF rendering. It was fixed in Doom Emacs using pdftools. Hence, I switched to `emacs-plus`. The flickering some people reported does not happen anymore here after I upgraded to Emacs 28. In this case, you can start the deamon using `brew services start emacs-plus@28`, and everything works as expected.
[deleted] · 2022-08-22 18:00
[deleted]
jjbatard · 2022-08-22 20:19
I just installed emacs-plus, seems to work fine. Now i'm installing doom. Thank you a lot ronis!
Ronis_BR · 2022-08-22 20:19
You’re welcome!