Subject: bug#16651: 24.3.50; desktop saves temporary buffers

From: Juri Linkov <[email-masked]>
Date: Thu, 06 Feb 2014 10:44:35 +0200

>> I see two possible solutions: skip saving all buffers with the
>> leading space in the buffer name,
>
> I cannot imagine any reason why such buffers should ever be saved in a
> desktop.

Such buffers can be skipped by this patch.  I hope this
doesn't contradict the arguments made in bug#3833.

=== modified file 'lisp/desktop.el'
--- lisp/desktop.el	2014-01-31 06:42:29 +0000
+++ lisp/desktop.el	2014-02-06 08:38:32 +0000
@@ -350,11 +353,11 @@ (defcustom desktop-locals-to-save
   :type '(repeat symbol)
   :group 'desktop)
 
-(defcustom desktop-buffers-not-to-save nil
+(defcustom desktop-buffers-not-to-save "^ "
   "Regexp identifying buffers that are to be excluded from saving."
   :type '(choice (const :tag "None" nil)
 		 regexp)
-  :version "23.2"                       ; set to nil
+  :version "24.4"		    ; skip invisible temporary buffers
   :group 'desktop)
 
 ;; Skip tramp and ange-ftp files