burly.el icon indicating copy to clipboard operation
burly.el copied to clipboard

Try save bookmark use burly.el interactively when closing current frame (use emacs daemon mode), but, this broken emacs daemon.

Open zw963 opened this issue 3 years ago • 1 comments

I use emacs with daemon mode,

emacs --daemon

and interactive emacs with emacsclient.

emacsclient -nc some_file  # will connect to daemon

And, i add a hook like this, for try to save bookmark when i close current frame.

(defun set-burly-bookmark (frame)
  (call-interactively 'burly-bookmark-windows)
  t
  )

(add-hook 'delete-frame-functions 'set-burly-bookmark)

Above code seem like work, when i want to close current frame, it prompt me to save bookmark.

image

after i input name, we assume test2, then pressing enter, frame get closed, but, emacs server get broken, like this:

emacsclient: connect: Connection refused

(in normal sitution, i can always create a new frame when connect to server immediately)

In fact, test2 never saved correctly in this case, so, how to archive this correctly?

zw963 avatar Jan 03 '22 11:01 zw963

Hi,

Thanks for reporting this. I don't know what's happening here; you might need to consult the Emacs or Elisp manuals about exactly what delete-frame-functions does and when they are called. It might also be a bug in Emacs, so you might want to ask about this on the emacs-devel mailing list.

alphapapa avatar Mar 01 '22 10:03 alphapapa