bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67393: 29.1; Slow to open file if autosave exists


From: Ihor Radchenko
Subject: bug#67393: 29.1; Slow to open file if autosave exists
Date: Thu, 28 Dec 2023 13:59:49 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> > Such a command, if it existed, should perhaps provide a better
>> > opportunity for the users, like prompt them for whether to recover
>> > from each autosave file before continuing to the next one.
>> 
>> May you please elaborate how a command calling of `find-file' or similar
>> can provide such prompt?
>
> I'm not sure I understand what you mean, because the answer seems too
> obvious: just prompt after opening each file that has autosave data.
> But that's probably not what you had in mind.

It is actually what I had in mind, but I am concerned about several
possible caveats:

1. Introducing a query where there was none previously may break
   noninteractive Emacs and existing code that makes an assumption about
   `find-file' not querying user in most cases.

2. autosave data is just one of several cases when `after-find-file'
   uses `sit-for':
   - "File exists, but cannot be read"
   - "Symbolic link that points to nonexistent file"
   - "%s has auto save data; consider \\`M-x recover-this-file'"
   - "File not found and directory write-protected"
   - "Use M-x make-directory RET RET to create the directory and its parents"
   It is not clear if all of these cases should ask user immediately and
   wait for an answer or just some of them. And if just some of them,
   whether to leave the `sit-for' delay after displaying message or not.

>> After `set-multi-message' became a thing, I no longer need to consult
>> *Messages* often. `set-multi-message' was really an eye-opener on how
>> much useful information I miss when messages are coming in quick
>> succession.
>
> To each their own.  I think set-multi-message has its uses, but I
> don't think it can solve all of the cases, in particular those where
> we need to attract the users' attention to a particularly important
> message.

We are in agreement here. I also do not think that set-multi-message
should be used everywhere.

However, I do think that using `sit-for' to attract attention is not a
good idea and such approach should be replaced either with explicit user
prompt or, when the message is not as important, with something that
does not block Emacs (like my proposal or something else we can come up
with).

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]