GNU bug report logs - #30421
25.3; desktop.el: Steal lock when no living "emacs" process owns it

Previous Next

Package: emacs;

Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>

Date: Sun, 11 Feb 2018 09:55:02 UTC

Severity: wishlist

Found in version 25.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #68 received at 30421 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pierre Neidhardt <ambrevar <at> gmail.com>
Cc: 30421 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net
Subject: Re: bug#30421: 25.3;
 desktop.el: Steal lock when no living "emacs" process owns it
Date: Sat, 24 Feb 2018 22:09:26 +0200
> From: Pierre Neidhardt <ambrevar <at> gmail.com>
> Cc: 30421 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net
> Date: Sat, 24 Feb 2018 20:44:45 +0100
> 
> Correct me if I did not understand your instructions correctly.  I did this:
> 
> - Add this to my init.el
> 
>   (defun ambrevar/desktop-init ()
>     (desktop-save-mode)
>     (desktop-read)
>     (remove-hook 'server-switch-hook 'ambrevar/desktop-init))
>   (add-hook 'server-switch-hook 'ambrevar/desktop-init)
> 
> - Kill Emacs, leaving a .emacs.desktop.lock behind.
> 
> - Switch to a TTY.
> 
> - Start `emacs --daemon`.
> 
> - Run `emacsclient foo`.

Yes.

> I correctly get prompted if I want to load the desktop then.

OK, thanks for testing.

So like I said, we need a new hook, which would be called when the
server creates a frame, but doesn't switch to any new buffers in that
frame.

> Running `emacsclient -t` does not trigger the desktop loading, but I
> guess that's to be expected.

Right, because in that case server-switch-hook is not run.




This bug report was last modified 7 years and 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.