GNU bug report logs - #1226
Desktop holds second Emacs session hostage; C-x C-c doesn't work properly.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Wed, 22 Oct 2008 10:05:05 UTC

Severity: minor

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 1226 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lawrence Mitchell <wence <at> gmx.li>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 1226 <at> debbugs.gnu.org
Subject: Re: bug#1226: Desktop holds second Emacs session hostage; C-x C-c doesn't work properly.
Date: Wed, 22 Oct 2008 12:12:28 +0100
Alan Mackenzie wrote:
> (i) With desktop enabled, start emacs.

> (ii) Start a second emacs session.

> Emacs2 detects Emacs1 and the danger of contention over .emacs.desktop.
> It prompts thusly:

>     "Warning: desktop file appears to be in use by PID 3616.
>      Using it may cause conflicts.  Use it anyway? (y or n)"

> (iii) Type n.

> (iv) Attempt C-c C-x.

> Emacs2 decides, because desktop is "enabled", that it wants to save a
> desktop file, and prompts:

>     "Directory for desktop file: ~/"

> At this point, C-g aborts the "end Emacs" command.  One now has the
> unpleasant choice of killing Emacs2 from the (operating system) console
> or typing in some random directory to dump the empty .emacs.desktop to.

> This is a bug.

I cannot reproduce with the following sequence to enable desktop:

;; start an emacs that creates a desktop file and quit
$ emacs -Q --eval '(progn (setq desktop-path (list "/tmp/"))
(desktop-save-mode 1) (desktop-read) (dired "/tmp/")
(save-buffers-kill-emacs))'

;; now start an emacs to read the desktop file (acquiring a lock)
$ emacs -Q --eval '(progn (setq desktop-path (list "/tmp/"))
(desktop-save-mode 1) (desktop-read))' &

;; start a second emacs
$ emacs -Q --eval '(progn (setq desktop-path (list "/tmp/"))
(desktop-save-mode 1) (desktop-read))'

;; This one prompts

Warning: desktop file appears to be in use by PID XXXXX.
Using it may cause conflicts.  Use it anyway? (y or n)

;; I answer "n", the desktop file is not loaded.

;; Now I do save-buffers-kill-emacs and am asked:

Save desktop? (y or n)

;; I hit "n", the desktop is not saved and Emacs quits as
   expected.


How have you enabled desktop in your emacs session to produce
this problem?

-- 
Lawrence Mitchell <wence <at> gmx.li>




This bug report was last modified 13 years and 347 days ago.

Previous Next


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