unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19059: [PATCH] desktop-read re-enables desktop autosave when it shouldn't
       [not found] <emacs-mail-is-unusable-3>
@ 2015-01-23  3:45 ` Kelly Dean
  2015-02-18  0:41   ` bug#19059: " Kelly Dean
  0 siblings, 1 reply; 2+ messages in thread
From: Kelly Dean @ 2015-01-23  3:45 UTC (permalink / raw)
  To: 19059

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

Since patches are allowed now...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: desktop-auto-save-bug.patch --]
[-- Type: text/x-diff, Size: 1225 bytes --]

--- emacs-24.4/lisp/desktop.el
+++ emacs-24.4/lisp/desktop.el
@@ -1119,7 +1119,8 @@
 	      (desktop-buffer-fail-count 0)
 	      (owner (desktop-owner))
 	      ;; Avoid desktop saving during evaluation of desktop buffer.
-	      (desktop-save nil))
+	      (desktop-save nil)
+	      (desktop-autosave-was-enabled))
 	  (if (and owner
 		   (memq desktop-load-locked-desktop '(nil ask))
 		   (or (null desktop-load-locked-desktop)
@@ -1135,6 +1136,8 @@
 	    ;; Temporarily disable the autosave that will leave it
 	    ;; disabled when loading the desktop fails with errors,
 	    ;; thus not overwriting the desktop with broken contents.
+	    (setq desktop-autosave-was-enabled
+		  (memq 'desktop-auto-save-set-timer window-configuration-change-hook))
 	    (desktop-auto-save-disable)
 	    ;; Evaluate desktop buffer and remember when it was modified.
 	    (load (desktop-full-file-name) t t t)
@@ -1188,7 +1191,7 @@
 				  (set-window-prev-buffers window nil)
 				  (set-window-next-buffers window nil))))
  	    (setq desktop-saved-frameset nil)
-	    (desktop-auto-save-enable)
+	    (if desktop-autosave-was-enabled (desktop-auto-save-enable))
 	    t))
       ;; No desktop file found.
       (desktop-clear)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19059: desktop-read re-enables desktop autosave when it shouldn't
  2015-01-23  3:45 ` bug#19059: [PATCH] desktop-read re-enables desktop autosave when it shouldn't Kelly Dean
@ 2015-02-18  0:41   ` Kelly Dean
  0 siblings, 0 replies; 2+ messages in thread
From: Kelly Dean @ 2015-02-18  0:41 UTC (permalink / raw)
  To: 19059-done

Fixed in trunk.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-18  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <emacs-mail-is-unusable-3>
2015-01-23  3:45 ` bug#19059: [PATCH] desktop-read re-enables desktop autosave when it shouldn't Kelly Dean
2015-02-18  0:41   ` bug#19059: " Kelly Dean

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).