GNU bug report logs - #17351
Trunk emacs splats .emacs.desktop at startup

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sat, 26 Apr 2014 18:09:02 UTC

Severity: important

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17351 in the body.
You can then email your comments to 17351 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sat, 26 Apr 2014 18:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 26 Apr 2014 18:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Trunk emacs splats .emacs.desktop at startup
Date: Sat, 26 Apr 2014 18:04:27 +0000
Hello,  Emacs.

This is horrible.  I started a GUI emacs session, and there were errors
loading the desktop.  I loaded the file .emacs.desktop into my emacs
session to see what the problem was.  And lo and behold, that file had
already been overwritten by Emacs.  :-(

This is crazy.  What's the point of overwriting .emacs.desktop at
startup?  It's either going to be overwriting itself with a functionally
identical copy, or (as in the current case) its going to be losing
information needed for debugging.

This is surely a bug.

My trunk is at revision number 116992.

-- 
Alan Mackenzie.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 27 Apr 2014 08:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 27 Apr 2014 11:22:39 +0300
> This is horrible.  I started a GUI emacs session, and there were errors
> loading the desktop.  I loaded the file .emacs.desktop into my emacs
> session to see what the problem was.  And lo and behold, that file had
> already been overwritten by Emacs.  :-(

I lost my desktop too. :-(  After starting a GUI session, loading the
desktop failed to read \.\.\. characters.  I see the only way how
\.\.\. got into the desktop: some mode temporarily changed the buffer-local
value of `print-length' that abbreviated a value while saving the desktop.
I added precautions against this problem on the emacs-24 branch.

But the remaining problem is that it overwrote the desktop with the
broken file while leaving no backups of the previous desktop.

> This is crazy.  What's the point of overwriting .emacs.desktop at
> startup?  It's either going to be overwriting itself with a functionally
> identical copy, or (as in the current case) its going to be losing
> information needed for debugging.

If after startup you paused for 30 seconds then auto-saving overwrote
your desktop indeed.  It seems we need to keep a backup of the desktop
from the previous session when saving the desktop in a new session
for the case when the desktop gets broken by the errors in it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 27 Apr 2014 09:20:02 GMT) Full text and rfc822 format available.

Message #11 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Juri Linkov <juri <at> jurta.org>
Cc: 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 27 Apr 2014 09:15:55 +0000
Morning, Juri.

On Sun, Apr 27, 2014 at 11:22:39AM +0300, Juri Linkov wrote:
> > This is horrible.  I started a GUI emacs session, and there were errors
> > loading the desktop.  I loaded the file .emacs.desktop into my emacs
> > session to see what the problem was.  And lo and behold, that file had
> > already been overwritten by Emacs.  :-(

> I lost my desktop too. :-(  After starting a GUI session, loading the
> desktop failed to read \.\.\. characters.  I see the only way how
> \.\.\. got into the desktop: some mode temporarily changed the buffer-local
> value of `print-length' that abbreviated a value while saving the desktop.
> I added precautions against this problem on the emacs-24 branch.

> But the remaining problem is that it overwrote the desktop with the
> broken file while leaving no backups of the previous desktop.

> > This is crazy.  What's the point of overwriting .emacs.desktop at
> > startup?  It's either going to be overwriting itself with a functionally
> > identical copy, or (as in the current case) its going to be losing
> > information needed for debugging.

> If after startup you paused for 30 seconds then auto-saving overwrote
> your desktop indeed.  It seems we need to keep a backup of the desktop
> from the previous session when saving the desktop in a new session
> for the case when the desktop gets broken by the errors in it.

Yes, I think so.  This needs to be mentioned in the manual, too.  30
seconds seems a very short time (by default) to trigger this saving of
the desktop.  Especially when there's been no change since the previous
save.

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 27 Apr 2014 09:56:01 GMT) Full text and rfc822 format available.

Message #14 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 27 Apr 2014 12:52:01 +0300
>> If after startup you paused for 30 seconds then auto-saving overwrote
>> your desktop indeed.  It seems we need to keep a backup of the desktop
>> from the previous session when saving the desktop in a new session
>> for the case when the desktop gets broken by the errors in it.
>
> Yes, I think so.  This needs to be mentioned in the manual, too.  30
> seconds seems a very short time (by default) to trigger this saving of
> the desktop.

30 seconds of idle time before desktop auto-saving is the default value
inherited from `auto-save-timeout' used for file auto-saving.  But they
don't need to be the same.  In ~/.emacs I customized it to 60 seconds,
and maybe this default value would be better for everyone.

> Especially when there's been no change since the previous save.

Actually auto-saving already checks for changes and doesn't write the
identical desktop.  In practice this happens rarely, only when the session
left inactive, because any minuscule change in window configuration
(such as displaying a buffer with error messages) causes the desktop file
to be overwritten with new contents.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 27 Apr 2014 14:32:01 GMT) Full text and rfc822 format available.

Message #17 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 27 Apr 2014 10:31:35 -0400
>> Yes, I think so.  This needs to be mentioned in the manual, too.  30
>> seconds seems a very short time (by default) to trigger this saving of
>> the desktop.

No, it's not long at all.  It only looks that way when the event is
threatening, so the problem is the threat, not the delay.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 27 Apr 2014 22:14:02 GMT) Full text and rfc822 format available.

Message #20 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 27 Apr 2014 18:13:34 -0400
> No, it's not long at all.  It only looks that way when the event is
               ^^^^
               short
Sorry,


        Stfean




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 22 Jun 2014 07:06:01 GMT) Full text and rfc822 format available.

Message #23 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Juri Linkov <juri <at> jurta.org>, Alan Mackenzie <acm <at> muc.de>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 22 Jun 2014 03:05:24 -0400
As a stopgap, how about disabling the autosave (with a warning, eg
"error loading desktop; automatic save disabled until next manual save")
if there were errors loading the desktop at startup?

More generally, why does the autosaving actually save directly into the
real desktop file? Why doesn't it use the normal autosave mechanism, ie
write to a #desktop# file? Naively, it seems like this would be both
simpler to implement and give better results.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Sun, 22 Jun 2014 23:29:02 GMT) Full text and rfc822 format available.

Message #26 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Mon, 23 Jun 2014 02:01:16 +0300
> As a stopgap, how about disabling the autosave (with a warning, eg
> "error loading desktop; automatic save disabled until next manual save")
> if there were errors loading the desktop at startup?

It's not clear where to catch errors and handle them,
because they can occur everywhere and it's better to leave
the default error processing that enters the debugger.

But without such warning message, it's possible to disable
autosaving when loading desktop with a simple patch below.

> More generally, why does the autosaving actually save directly into the
> real desktop file? Why doesn't it use the normal autosave mechanism, ie
> write to a #desktop# file? Naively, it seems like this would be both
> simpler to implement and give better results.

This would keep the desktop file open all the time,
and users might not like to see it in the buffer list.
If this is not desirable then a backup copy needs to be saved
once per session after reading the desktop.

=== modified file 'lisp/desktop.el'
--- lisp/desktop.el	2014-06-06 23:38:40 +0000
+++ lisp/desktop.el	2014-06-22 22:52:31 +0000
@@ -174,11 +174,8 @@ (define-minor-mode desktop-save-mode
   :global t
   :group 'desktop
   (if desktop-save-mode
-      (when (and (integerp desktop-auto-save-timeout)
-		 (> desktop-auto-save-timeout 0))
-	(add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer))
-    (remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
-    (desktop-auto-save-cancel-timer)))
+      (desktop-auto-save-enable)
+    (desktop-auto-save-disable)))
 
 (defun desktop-save-mode-off ()
   "Disable `desktop-save-mode'.  Provided for use in hooks."
@@ -219,9 +216,8 @@ (defcustom desktop-auto-save-timeout aut
          (set-default symbol value)
          (ignore-errors
 	   (if (and (integerp value) (> value 0))
-	       (add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
-	     (remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
-	     (desktop-auto-save-cancel-timer))))
+	       (desktop-auto-save-enable value)
+	     (desktop-auto-save-disable))))
   :group 'desktop
   :version "24.4")
 
@@ -1132,6 +1128,7 @@ (defun desktop-read (&optional dirname)
 		(unless desktop-dirname
 		  (message "Desktop file in use; not loaded.")))
 	    (desktop-lazy-abort)
+	    (desktop-auto-save-disable)
 	    ;; Evaluate desktop buffer and remember when it was modified.
 	    (load (desktop-full-file-name) t t t)
 	    (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))
@@ -1184,6 +1181,7 @@ (defun desktop-read (&optional dirname)
 				  (set-window-prev-buffers window nil)
 				  (set-window-next-buffers window nil))))
  	    (setq desktop-saved-frameset nil)
+	    (desktop-auto-save-enable)
 	    t))
       ;; No desktop file found.
       (desktop-clear)
@@ -1230,6 +1228,15 @@ (defun desktop-save-in-desktop-dir ()
 ;; Auto-Saving.
 (defvar desktop-auto-save-timer nil)
 
+(defun desktop-auto-save-enable (&optional timeout)
+  (when (and (integerp (or timeout desktop-auto-save-timeout))
+	     (> (or timeout desktop-auto-save-timeout) 0))
+    (add-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)))
+
+(defun desktop-auto-save-disable ()
+  (remove-hook 'window-configuration-change-hook 'desktop-auto-save-set-timer)
+  (desktop-auto-save-cancel-timer))
+
 (defun desktop-auto-save ()
   "Save the desktop periodically.
 Called by the timer created in `desktop-auto-save-set-timer'."





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Mon, 23 Jun 2014 00:06:01 GMT) Full text and rfc822 format available.

Message #29 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 22 Jun 2014 20:05:52 -0400
Juri Linkov wrote:

> This would keep the desktop file open all the time,
> and users might not like to see it in the buffer list.

So read it into an invisible buffer, set buffer-file-name, and enable
auto-save-mode.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Mon, 23 Jun 2014 23:32:02 GMT) Full text and rfc822 format available.

Message #32 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Tue, 24 Jun 2014 01:57:52 +0300
>> This would keep the desktop file open all the time,
>> and users might not like to see it in the buffer list.
>
> So read it into an invisible buffer, set buffer-file-name, and enable
> auto-save-mode.

auto-save-mode doesn't seem necessary because the contents of the
desktop file buffer has to be generated at the given time interval
anyway, so at the end it can be saved as well like in this patch:

=== modified file 'lisp/desktop.el'
--- lisp/desktop.el	2014-06-06 23:38:40 +0000
+++ lisp/desktop.el	2014-06-23 22:45:20 +0000
@@ -1038,8 +1038,15 @@ (defun desktop-save (dirname &optional r
 			     (point))))
 		 (checksum (and beg (md5 (current-buffer) beg (point-max) 'emacs-mule))))
 	    (unless (and checksum (equal checksum desktop-file-checksum))
-	      (let ((coding-system-for-write 'emacs-mule))
-		(write-region (point-min) (point-max) (desktop-full-file-name) nil 'nomessage))
+	      (let ((coding-system-for-write 'emacs-mule)
+		    (buffer-string (buffer-string)))
+		(with-current-buffer (find-file-noselect (desktop-full-file-name))
+		  ;; Make the buffer invisible
+		  (unless (eq (aref (buffer-name) 0) ?\s)
+		    (rename-buffer (concat " " (buffer-name))))
+		  (erase-buffer)
+		  (insert buffer-string)
+		  (save-buffer)))
 	      (setq desktop-file-checksum checksum)
 	      ;; We remember when it was modified (which is presumably just now).
 	      (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name)))))))))))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Tue, 24 Jun 2014 18:31:01 GMT) Full text and rfc822 format available.

Message #35 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Tue, 24 Jun 2014 14:30:13 -0400
Juri Linkov wrote:

> auto-save-mode doesn't seem necessary because the contents of the
> desktop file buffer has to be generated at the given time interval
> anyway, so at the end it can be saved as well like in this patch:

As I see it, the point is that normal auto-save distinguishes automatic
save from a manual save initiated by the user, by using separate files.
Whereas desktop's version of auto-save removes that distinction.
(But I'm not familiar with the details.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Tue, 24 Jun 2014 23:28:02 GMT) Full text and rfc822 format available.

Message #38 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Wed, 25 Jun 2014 02:23:54 +0300
> As I see it, the point is that normal auto-save distinguishes automatic
> save from a manual save initiated by the user, by using separate files.
> Whereas desktop's version of auto-save removes that distinction.
> (But I'm not familiar with the details.)

It's possible to periodically update the desktop file buffer,
but not to save it, thus allowing normal auto-save to create
a #desktop# backup.  But this might cause some problems, e.g.
modes that call `save-some-buffers' like `compilation-mode'
will ask whether to save the updated desktop file.  Also it's
not clear how to restore the auto-saved backup copy after a crash.

OTOH, saving the desktop file buffer will create a desktop~ backup
that the user can restore when something goes wrong.  This is
implemented in the latest patch that is intended for the trunk.

Meanwhile, I installed the patch that temporarily disables the
autosave in `desktop-read' into the emacs-24 branch, so people
won't lose the desktop in case of errors.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Thu, 26 Jun 2014 19:32:02 GMT) Full text and rfc822 format available.

Message #41 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Thu, 26 Jun 2014 15:31:47 -0400
Juri Linkov wrote:

> But this might cause some problems, e.g. modes that call
> `save-some-buffers' like `compilation-mode' will ask whether to save
> the updated desktop file.

I iamgine a solution could be found.

I could equally well say that using save-buffer will cause the desktop
to be included in the recentf list, which some people may dislike.
(Cf http://debbugs.gnu.org/17155)

> Also it's not clear how to restore the auto-saved backup copy after a
> crash.

Using the normal "file foo has auto-save, recover it" prompt?


(This topic makes me wonder if desktop could have used the standard
interlock mechanism, rather than inventing its own version of that too.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Fri, 27 Jun 2014 00:49:02 GMT) Full text and rfc822 format available.

Message #44 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Fri, 27 Jun 2014 02:44:01 +0300
> I could equally well say that using save-buffer will cause the desktop
> to be included in the recentf list, which some people may dislike.
> (Cf http://debbugs.gnu.org/17155)

A solution in bug#17155 was to replace `save-buffer' with `write-region'
that is already currently used by desktop.el.  This means continuing
using low-level `write-region' would be less problematic than `save-buffer'
(and normal auto-saving of a file buffer that still requires `save-buffer'
at the end of the session).

> (This topic makes me wonder if desktop could have used the standard
> interlock mechanism, rather than inventing its own version of that too.)

This would be possible if the desktop file used `save-buffer' on
a normal file buffer instead of `write-region'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Thu, 03 Jul 2014 00:22:02 GMT) Full text and rfc822 format available.

Message #47 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Thu, 03 Jul 2014 02:52:41 +0300
> Meanwhile, I installed the patch that temporarily disables the
> autosave in `desktop-read' into the emacs-24 branch, so people
> won't lose the desktop in case of errors.

This handles the case when there are errors in the desktop file.

But another case is when the errors are in the init file, and the buffer
*Warnings* is displayed.  The remaining problem is that the buffer
*Warnings* becomes hidden behind the restored window configuration,
so the user has no indication about the errors in the init file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Thu, 03 Jul 2014 02:43:01 GMT) Full text and rfc822 format available.

Message #50 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Wed, 02 Jul 2014 22:42:18 -0400
Juri Linkov wrote:

> But another case is when the errors are in the init file, and the buffer
> *Warnings* is displayed.  The remaining problem is that the buffer
> *Warnings* becomes hidden behind the restored window configuration,
> so the user has no indication about the errors in the init file.

That seems unrelated to this report?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Thu, 03 Jul 2014 23:36:01 GMT) Full text and rfc822 format available.

Message #53 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Fri, 04 Jul 2014 02:35:00 +0300
>> But another case is when the errors are in the init file, and the buffer
>> *Warnings* is displayed.  The remaining problem is that the buffer
>> *Warnings* becomes hidden behind the restored window configuration,
>> so the user has no indication about the errors in the init file.
>
> That seems unrelated to this report?

Fortunately, it doesn't cause the desktop file corruption,
so I created a separate bug#17927.

It seems for this bug#17351 to be closed, what remains to do is
to generate a backup copy of the desktop file.  I see two ways:

1. manually write a backup file once after reading the desktop
   and locking it.  This solution fits into the current design
   of desktop.el.

2. Use normal mechanisms of making a backup and locking
   by using save-buffer instead of write-region, but this
   will cause more problems (including in the recentf list, etc.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17351; Package emacs. (Mon, 11 Aug 2014 01:19:02 GMT) Full text and rfc822 format available.

Message #56 received at 17351 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351 <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Sun, 10 Aug 2014 21:18:23 -0400
I lost track of this.
Did the "starting Emacs may delete your deskop file" aspect get fixed?
If so, this can be downgraded to severity normal (or closed).




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Tue, 12 Aug 2014 06:54:02 GMT) Full text and rfc822 format available.

Notification sent to Alan Mackenzie <acm <at> muc.de>:
bug acknowledged by developer. (Tue, 12 Aug 2014 06:54:02 GMT) Full text and rfc822 format available.

Message #61 received at 17351-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Alan Mackenzie <acm <at> muc.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17351-done <at> debbugs.gnu.org
Subject: Re: bug#17351: Trunk emacs splats .emacs.desktop at startup
Date: Tue, 12 Aug 2014 09:52:12 +0300
> I lost track of this.
> Did the "starting Emacs may delete your deskop file" aspect get fixed?
> If so, this can be downgraded to severity normal (or closed).

The fixes already installed in the emacs-24 branch were intended
to reduce the number of cases that might break the desktop file,
so I'm closing this bug report.

The remaining feature to create a backup copy is optional and could be
implemented later for the trunk in a new separate feature request.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 09 Sep 2014 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 242 days ago.

Previous Next


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