From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67393: 29.1; Slow to open file if autosave exists Date: Wed, 27 Dec 2023 19:33:31 +0200 Message-ID: <83h6k38s9g.fsf@gnu.org> References: <83a5r5gdxk.fsf@gnu.org> <87frztc7iy.fsf@localhost> <867cl4kg4l.fsf@mail.linkov.net> <87cyuwdcb4.fsf@localhost> <868r5jse0m.fsf@mail.linkov.net> <83r0jbbg2z.fsf@gnu.org> <86a5pv508o.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27289"; mail-complaints-to="usenet@ciao.gmane.io" Cc: materus213@gmail.com, yantar92@posteo.net, 67393@debbugs.gnu.org, stefankangas@gmail.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 27 18:34:35 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rIXne-0006ui-Ms for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Dec 2023 18:34:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIXnA-0000Tw-Fm; Wed, 27 Dec 2023 12:34:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIXn9-0000Tn-Lk for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2023 12:34:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIXn9-0004yq-CT for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2023 12:34:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIXn8-0006G5-3d for bug-gnu-emacs@gnu.org; Wed, 27 Dec 2023 12:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Dec 2023 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67393 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 67393-submit@debbugs.gnu.org id=B67393.170369843624043 (code B ref 67393); Wed, 27 Dec 2023 17:34:02 +0000 Original-Received: (at 67393) by debbugs.gnu.org; 27 Dec 2023 17:33:56 +0000 Original-Received: from localhost ([127.0.0.1]:37717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIXn1-0006Fj-HE for submit@debbugs.gnu.org; Wed, 27 Dec 2023 12:33:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIXmz-0006FR-2l for 67393@debbugs.gnu.org; Wed, 27 Dec 2023 12:33:54 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIXmu-0004vx-DK; Wed, 27 Dec 2023 12:33:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QA1qFf6s4D55NhWyGjRDJ2h65iICZFVqDQATBr7ULxI=; b=I0YJug4g7Fpd QEZ5zZEPLkZx99rPJFhjByMfZ6hDxyxVqKW4PXHHqVJyNDDQQ4qErbSSyH1CR2uqpjebvD2iNo5ua 8uaMYJIpAsTXACet92Dze+E8FTVqXNy1UJwSqIe9hQHuTbDN35oBU5WL0ruKjdpB4RSGy8imKoWQE PmCV+ZruozwPui5yh3+9LvdLUESDfi7ze2Sb+1NMa/xuMjsKEiAgl01au3PAe/xn75g5wmH5J/EkG VKfiQ2rT48HXR38eipbVVZFx+bgw/fDiARtRI+Orvm5FS9hBiMk6g1OLsa/+uVkZXvm0uDNX3fQf7 75urSy8SqI7Hui+oXJYI0w==; In-Reply-To: <86a5pv508o.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 27 Dec 2023 19:20:07 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276944 Archived-At: > From: Juri Linkov > 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.