You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start a daemon with brew start services emacs-plus, I get an "End of file during parsing: Error reading from stdin" error. The strange thing is that I don't get this error when I start a daemon with emacs --daemon in the terminal (after stopping the brew services).
Googling the error seems to suggest that there may be unbalanced parentheses in my config files, but as far as I can tell (visually and using check-parens) this does not seem to be the case.
Does anyone know what the problem might be? How would I go about debugging this further to pinpoint the root cause of the issue?
Full backtrace from "/tmp/homebrew.mxcl.emacs-plus.stderr.log":
Wrote /Users/duynguyen/.config/emacs/recentf
Wrote /Users/duynguyen/repos/config-files/emacs/config.el
Tangled 145 code blocks from config.org
Loading /Users/duynguyen/repos/config-files/emacs/config.el (source)...
Repeat mode is enabled for 28 commands and 12 keymaps; see ‘describe-repeat-maps’
Loading gcmh (native compiled elisp)...
Loading gcmh (native compiled elisp)...done
Loading /Users/duynguyen/.config/emacs/recentf...
Loading /Users/duynguyen/.config/emacs/recentf...done
Cleaning up the recentf list...
Cleaning up the recentf list...done (0 removed)
Tramp: Opening connection *system-packages* for root@Duys-MBPusing sudo...
Opening connection *system-packages* for root@Duys-MBPusing sudo... \
Tramp: Opening connection *system-packages* for root@Duys-MBPusing sudo...done
Tramp: Opening connection nil for root@Duys-MBPusing sudo...
Opening connection nil for root@Duys-MBPusing sudo... \
Tramp: Opening connection nil for root@Duys-MBPusing sudo...done
stop Warning (initialization): An error occurred while loading ‘/Users/duynguyen/.config/emacs/init.el’:
End of file during parsing: Error reading from stdin
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
Starting Emacs daemon.
nil: exited abnormally with code 127.
The text was updated successfully, but these errors were encountered:
This line checks whether the rg binary exists, and I think the brew services does this in sudo mode and therefore requires me to enter my password (hence the "Error reading from stdin"). However, I have no clue how to solve this (i.e. to make brew services work with the above elisp code).
I don't think it's because of sudo (why and how would it run it as sudo?), but rather because launchctl runs Emacs in a different environment (ie login vs interactive). A bit of explanation can be found in a blog post where I explain why the PATH is injected.
Also I am curious, what exactly :ensure-system-package does. Also, do you use exec-path-from-shell?
In general, I'd say Emacs+ needs some love to make service more usable.
Issue
When I start a daemon with
brew start services emacs-plus
, I get an "End of file during parsing: Error reading from stdin" error. The strange thing is that I don't get this error when I start a daemon withemacs --daemon
in the terminal (after stopping the brew services).Googling the error seems to suggest that there may be unbalanced parentheses in my config files, but as far as I can tell (visually and using
check-parens
) this does not seem to be the case.Does anyone know what the problem might be? How would I go about debugging this further to pinpoint the root cause of the issue?
My setup
MacOS
Emacs
==> d12frosted/emacs-plus/emacs-plus@29: stable 29.1, HEAD
/opt/homebrew/Cellar/emacs-plus@29/29.1 (4,539 files, 253.2MB) *
Built from source on 2023-12-01 at 17:04:55 with: --with-xwidgets --with-native-comp --with-imagemagick --with-mailutils
From: https://github.com/d12frosted/homebrew-emacs-plus/blob/HEAD/Formula/[email protected]
==> Dependencies
Build: make ✔, autoconf ✔, gnu-sed ✔, gnu-tar ✔, grep ✔, awk ✔, coreutils ✔, pkg-config ✔, texinfo ✔, xz ✔
Required: gnutls ✔, librsvg ✔, little-cms2 ✔, jansson ✔, tree-sitter ✔
Optional: imagemagick ✘, dbus ✘, mailutils ✔
Error message
Full backtrace from "/tmp/homebrew.mxcl.emacs-plus.stderr.log":
The text was updated successfully, but these errors were encountered: