GNU bug report logs - #18371
desktop-read: do not (desktop-clear) when no .emacs.desktop file is found

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Sun, 31 Aug 2014 20:06:02 UTC

Severity: normal

Tags: patch

Fixed in version 25.1

Done: Ivan Shmakov <ivan <at> siamics.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ivan Shmakov <ivan <at> siamics.net>
Subject: bug#18371: closed (Re: bug#18371: desktop-read: do not
 (desktop-clear) when no .emacs.desktop file is found )
Date: Fri, 23 Jan 2015 15:30:05 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#18371: desktop-read: do not (desktop-clear) when no .emacs.desktop file is found 

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 18371 <at> debbugs.gnu.org.

-- 
18371: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18371
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ivan Shmakov <ivan <at> siamics.net>
To: 18371-done <at> debbugs.gnu.org
Subject: Re: bug#18371: desktop-read: do not (desktop-clear) when no
 .emacs.desktop file is found 
Date: Fri, 23 Jan 2015 15:29:38 +0000
Version: 25.1

>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

[…]

 > Given that desktop-read does /not/ call desktop-clear in the
 > “.emacs.desktop is found” branch, and that in that case, desktop-read
 > /appends/ to the current session (rather than /replacing/ it), I see
 > no good reason to call desktop-clear from desktop-read in the other
 > case, either.

 > Please thus consider the (trivial) patch MIMEd.

	Pushed; closing.

commit e391d88705efd3897996ed81e1f37b936dc3aa21
CommitDate: 2015-01-17 19:35:22 +0000

    Do not clear the session when trying to read a non-existent desktop file.

    * lisp/desktop.el (desktop-read): Do not call desktop-clear when no
    desktop file is found.

    Fixes: debbugs:18371

-- 
FSF associate member #7257  np. Liar — Motorhead        … 3013 B6A0 230E 334A

[Message part 3 (message/rfc822, inline)]
From: Ivan Shmakov <ivan <at> siamics.net>
To: submit <at> debbugs.gnu.org
Subject: desktop-read: do not (desktop-clear) when no .emacs.desktop file is
 found 
Date: Sun, 31 Aug 2014 20:05:17 +0000
[Message part 4 (text/plain, inline)]
Package:  emacs
Tags: patch

	As currently implemented, desktop-read calls desktop-clear when
	no .emacs.desktop file is found:

  1114	    (if (file-exists-p (desktop-full-file-name))
⋯
  1192	      ;; No desktop file found.
  1193	      (desktop-clear)
  1194	      (let ((default-directory desktop-dirname))
  1195	        (run-hooks 'desktop-no-desktop-file-hook))
  1196	      (message "No desktop file.")

	While this is likely to be a no-op when desktop-read is called
	from user’s ~/.emacs, – this may actually affect user’s session
	if desktop-read gets called from within an established session.

	And even more so a session containing any “process interaction”
	buffers, – like those one gets with M-x run-scheme or M-x erc.
	(Unless desktop-clear-preserve-buffers is suitably customized
	beforehand, that is.  However, as it seems, that may easily spin
	off the limits of convenience, which may be a bug by itself.)

	Given that desktop-read does /not/ call desktop-clear in the
	“.emacs.desktop is found” branch, and that in that case,
	desktop-read /appends/ to the current session (rather than
	/replacing/ it), I see no good reason to call desktop-clear from
	desktop-read in the other case, either.

	Please thus consider the (trivial) patch MIMEd.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
[Message part 5 (text/diff, inline)]
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1190,7 +1190,6 @@
 	    (desktop-auto-save-enable)
 	    t))
       ;; No desktop file found.
-      (desktop-clear)
       (let ((default-directory desktop-dirname))
         (run-hooks 'desktop-no-desktop-file-hook))
       (message "No desktop file.")

This bug report was last modified 10 years and 205 days ago.

Previous Next


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