Support for emacsclient/daemon mode #15
Replies: 1 comment 2 replies
-
Thank you for sharing your solution, @bobbyrullo! I was unable to reproduce the bug in Emacs 30. It may be specific to the version of Emacs you are using. Running Emacs in daemon mode does require handling hooks differently, and your use of One alternative you could consider is using Could you please try it? Here’s an example: (defun bobby/easy-session ()
(easysession-load-including-geometry)
(easysession-save-mode)
(remove-hook 'server-after-make-frame-hook #'bobby/easy-session))
(use-package easysession
:ensure t
:custom
(easysession-save-interval (* 10 60))
:init
(add-hook 'server-after-make-frame-hook #'bobby/easy-session)) Question 1: Which solution works better for you, (add-hook 'emacs-startup-hook #'easysession-load-including-geometry 98)
(add-hook 'emacs-startup-hook #'easysession-save-mode 99)) Question 3: What Emacs version are you using? I plan to update the README.md after your confirmation. |
Beta Was this translation helpful? Give feedback.
-
Hi there! I run emacs in daemon mode. If you use 'after-init-hook as specified in the installation, it crashes on startup. What I did instead which works is to load easysession when emacsclient starts, using the focus-in-hook:
I'm not sure if there is a better way, but would be nice to add to docs or something so that emacsclient folks have an easier time.
Beta Was this translation helpful? Give feedback.
All reactions