Subject: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it

From: Pierre Neidhardt <[email-masked]>
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`.

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

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