unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: materus213@gmail.com, 67393@debbugs.gnu.org,
	stefankangas@gmail.com, juri@linkov.net
Subject: bug#67393: 29.1; Slow to open file if autosave exists
Date: Thu, 28 Dec 2023 13:59:49 +0000	[thread overview]
Message-ID: <875y0iwhpm.fsf@localhost> (raw)
In-Reply-To: <83wmsz964m.fsf@gnu.org>

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	other threads:[~2023-12-28 13:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23  0:28 bug#67393: 29.1; Slow to open file if autosave exists materus213
2023-11-23  6:51 ` Eli Zaretskii
2023-12-22 14:56   ` Stefan Kangas
2023-12-23 14:34     ` Ihor Radchenko
2023-12-23 17:23       ` Juri Linkov
2023-12-23 18:05         ` Ihor Radchenko
2023-12-24 17:34           ` Juri Linkov
2023-12-24 18:39             ` Eli Zaretskii
2023-12-24 19:03               ` Ihor Radchenko
2023-12-24 19:28                 ` Eli Zaretskii
2023-12-24 19:49                   ` Ihor Radchenko
2023-12-24 20:19                     ` Eli Zaretskii
2023-12-25 16:50                       ` Ihor Radchenko
2023-12-25 16:58                         ` Eli Zaretskii
2023-12-25 17:18                           ` Ihor Radchenko
2023-12-25 17:34                             ` Eli Zaretskii
2023-12-25 18:40                               ` Ihor Radchenko
2023-12-25 19:08                                 ` Eli Zaretskii
2023-12-25 20:17                                   ` Ihor Radchenko
2023-12-27 12:34                                     ` Eli Zaretskii
2023-12-28 13:59                                       ` Ihor Radchenko [this message]
2023-12-27 17:20               ` Juri Linkov
2023-12-27 17:33                 ` Eli Zaretskii
2023-12-28  7:57                   ` Juri Linkov
2024-01-16 16:36                     ` Juri Linkov
2024-01-16 17:10                       ` Eli Zaretskii
2024-01-16 17:43                         ` Juri Linkov
2024-01-16 18:51                           ` Eli Zaretskii
2024-01-17 16:48                             ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875y0iwhpm.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=67393@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=materus213@gmail.com \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).