unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62817: Extension request: Must-Recover flag for files with auto-save information
@ 2023-04-13 16:42 Johann Höchtl
  2023-04-15  8:23 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Johann Höchtl @ 2023-04-13 16:42 UTC (permalink / raw)
  To: 62817

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

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

[-- Attachment #2: Type: text/html, Size: 1264 bytes --]

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

* bug#62817: Extension request: Must-Recover flag for files with auto-save information
  2023-04-13 16:42 bug#62817: Extension request: Must-Recover flag for files with auto-save information Johann Höchtl
@ 2023-04-15  8:23 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-04-15  8:23 UTC (permalink / raw)
  To: Johann Höchtl; +Cc: 62817

> From: Johann Höchtl <johann.hoechtl@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?





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

end of thread, other threads:[~2023-04-15  8:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 16:42 bug#62817: Extension request: Must-Recover flag for files with auto-save information Johann Höchtl
2023-04-15  8:23 ` Eli Zaretskii

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