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


View this message in rfc822 format

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

> > (ii) Start a second emacs session.

[ .... ]

> > 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?

Sorry, I should have said this.  With a .emacs containing exactly one
line:

    (desktop-save-mode 1)

and with no existing .emacs.desktop, I started Emacs, visited two files,
did M-x desktop-save, and exited Emacs.

Then I started, successively, two Emacs sessions like this:

    /path/to/emacs --no-site-file

, where the emacs was a CVS version from last night.  I tried this (i) on
two Linux tty's; (ii) From an X-Windows (GNOME) terminal, 

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

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 14 years and 14 days ago.

Previous Next


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