unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: materus213@gmail.com, yantar92@posteo.net, 67393@debbugs.gnu.org,
	stefankangas@gmail.com
Subject: bug#67393: 29.1; Slow to open file if autosave exists
Date: Wed, 27 Dec 2023 19:33:31 +0200	[thread overview]
Message-ID: <83h6k38s9g.fsf@gnu.org> (raw)
In-Reply-To: <86a5pv508o.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 27 Dec 2023 19:20:07 +0200)

> From: Juri Linkov <juri@linkov.net>
> Cc: yantar92@posteo.net,  stefankangas@gmail.com,  materus213@gmail.com,
>   67393@debbugs.gnu.org
> Date: Wed, 27 Dec 2023 19:20:07 +0200
> 
> >>     (ding) ; error message from ispell!
> >>     (message "Ispell error: %s" output)
> >>     (sit-for 5)
> >>
> >> So I need to waste 5 seconds several times during spell-checking.
> >
> > Only when there's an error, right?
> 
> Often during spell-checking it's really not an error, but a warning
> that text in some unsupported encoding can't be spell-checked.

"Unsupported encoding"?  Last time I saw this was when I was using
ispell as the speller.  Since I switched to Hunspell years ago, these
problems are gone for good, since Hunspell uses UTF-8.  How come you
still see this?

> I propose to refactor such code
> 
>   (message "Ispell error: %s" output)
>   (sit-for 5)
> 
> to a new separate function, e.g.
> 
>   (important-message 5 "Ispell error: %s" output)
> 
> with a simple implementation
> 
>   (defun important-message (seconds format-string &rest args)
>     (apply #'message format-string args)
>     (sit-for seconds))
> 
> Then users could easily override such annoying delay.
> Or maybe even the default implementation can check
> if set-message-functions already contains set-multi-message
> that ensures that the important message will not be missed,
> and not to use sit-for in this case.

I don't mind much, but is this really the best we can do?  Asking
users to customize Emacs by overriding functions is not very friendly,
and in this case we certainly could do better, for example by making 5
be a defcustom.





  reply	other threads:[~2023-12-27 17:33 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
2023-12-27 17:20               ` Juri Linkov
2023-12-27 17:33                 ` Eli Zaretskii [this message]
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=83h6k38s9g.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67393@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=materus213@gmail.com \
    --cc=stefankangas@gmail.com \
    --cc=yantar92@posteo.net \
    /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).