GNU bug report logs - #62817
Extension request: Must-Recover flag for files with auto-save information

Previous Next

Package: emacs;

Reported by: Johann Höchtl <johann.hoechtl <at> gmail.com>

Date: Thu, 13 Apr 2023 16:43:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 62817 AT debbugs.gnu.org.

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#62817; Package emacs. (Thu, 13 Apr 2023 16:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johann Höchtl <johann.hoechtl <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Apr 2023 16:43:01 GMT) Full text and rfc822 format available.

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

From: Johann Höchtl <johann.hoechtl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Extension request: Must-Recover flag for files with auto-save
 information
Date: Thu, 13 Apr 2023 18:42:15 +0200
[Message part 1 (text/plain, inline)]
Currently when Emacs crashes, it keeps a list of affected files in
auto-save-list. Alternatively when opening a file where auto-save
information is more current than the actual file, emacs will display a
message in the status buffer and keep the entry in messages.

However, for novice users, this helpful hint can be easily missed, eg. if a
verbose mode prints messages in the status buffer, like lsp-modes comes to
mind. In such a case the hint that a more recent autosave file exists is
displayed and will get quickly replaced with other messages. If the user is
not aware of recover-this-file, he will likely overwrite more recent
auto-save information with subsequent edits.

I propose that this is bad behaviour and a configuration exists which halts
any further processing until the user actively finishes what a manual
recover-this-file would offer him to do. This feature makes sense,
especially as of Emacs 29? auto-save-files can be reliably deleted by Emacs
itself.

As discussed on reddit
https://www.reddit.com/r/emacs/comments/z6ulwe/comment/iyb6bzm/?context=3
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62817; Package emacs. (Sat, 15 Apr 2023 08:24:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johann Höchtl <johann.hoechtl <at> gmail.com>
Cc: 62817 <at> debbugs.gnu.org
Subject: Re: bug#62817: Extension request: Must-Recover flag for files with
 auto-save information
Date: Sat, 15 Apr 2023 11:23:17 +0300
> From: Johann Höchtl <johann.hoechtl <at> gmail.com>
> Date: Thu, 13 Apr 2023 18:42:15 +0200
> 
> Currently when Emacs crashes, it keeps a list of affected files in auto-save-list. Alternatively when
> opening a file where auto-save information is more current than the actual file, emacs will display a
> message in the status buffer and keep the entry in messages.
> 
> However, for novice users, this helpful hint can be easily missed, eg. if a verbose mode prints
> messages in the status buffer, like lsp-modes comes to mind. In such a case the hint that a more
> recent autosave file exists is displayed and will get quickly replaced with other messages. If the user is
> not aware of recover-this-file, he will likely overwrite more recent auto-save information with
> subsequent edits.
> 
> I propose that this is bad behaviour and a configuration exists which halts any further processing until
> the user actively finishes what a manual recover-this-file would offer him to do. This feature makes
> sense, especially as of Emacs 29? auto-save-files can be reliably deleted by Emacs itself.

I don't think delaying initialization is a good idea.  Instead, how
about using the warnings facility for showing these messages?  See the
"Warnings" node in the ELisp Reference manual for more details.  In
particular, we have a "delayed warnings" feature, which allows to
delay the actual display of the warnings till after the running
command finishes.

Would you like to work on a patch along these lines?




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 04 Sep 2023 08:38:02 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 285 days ago.

Previous Next


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