all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 18371@debbugs.gnu.org
Subject: bug#18371: desktop-read: do not (desktop-clear) when no .emacs.desktop file is found
Date: Sun, 31 Aug 2014 20:05:17 +0000	[thread overview]
Message-ID: <87tx4stog2.fsf@violet.siamics.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 303 bytes --]

--- 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.")

             reply	other threads:[~2014-08-31 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-31 20:05 Ivan Shmakov [this message]
2015-01-23 15:29 ` bug#18371: desktop-read: do not (desktop-clear) when no .emacs.desktop file is found Ivan Shmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tx4stog2.fsf@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=18371@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.