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#74437: 30.0.92; completion-preview-idle-delay is delayed by flyspell Date: Tue, 19 Nov 2024 19:19:29 +0200 Message-ID: <86bjybta3i.fsf@gnu.org> References: <87cyirbfpd.fsf@alternateved.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21314"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74437@debbugs.gnu.org, mail@alternateved.com To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 19 18:20:24 2024 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 1tDRtn-0005P5-5V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Nov 2024 18:20:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDRtV-0000R3-Ah; Tue, 19 Nov 2024 12:20:05 -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 1tDRtS-0000PY-Pq for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 12:20: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 1tDRtS-00033C-GO for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 12:20:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=Se2M9fB+9TW9w6Yspi/TnmRkWeb3v46dzh8eXSPuaMQ=; b=pHjMxzYyXVCQyYI50C2NjPDDXiD1WEuCBMdJb4RoEzDHxoVlPNXGusAZQCZw6LnhCp/QPMB5Nw+B0FtFUtdc5cFpfboYA8DAbRf2TH8sWRvDIr2nAE+uBIHOu9v9CNvees3ohhB3I5i0Hq0DG2IwRIeznP6Vp4vE2Hgtd7NvTkR+fyMGWC4OeUeAIBsA/JLWBlYQDywbOoWMQbL3KoIURAZ8as3Xt1atcbOpvKykZZ3+c4MYB6FySH5JcDHgv3GHeYgYpucbBLdWaB1UEtrdiN4gwxnisG72g3GrSltq6QKX+jweAudxbadjrHBaaX9BPyTlm3nLRcXHw3392qgXPw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDRtS-000051-4v for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 12:20: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: Tue, 19 Nov 2024 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74437 X-GNU-PR-Package: emacs Original-Received: via spool by 74437-submit@debbugs.gnu.org id=B74437.173203678132734 (code B ref 74437); Tue, 19 Nov 2024 17:20:02 +0000 Original-Received: (at 74437) by debbugs.gnu.org; 19 Nov 2024 17:19:41 +0000 Original-Received: from localhost ([127.0.0.1]:43872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDRt6-0008Vt-IS for submit@debbugs.gnu.org; Tue, 19 Nov 2024 12:19:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDRt4-0008Vg-MM for 74437@debbugs.gnu.org; Tue, 19 Nov 2024 12:19:39 -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 1tDRsy-0002xx-1t; Tue, 19 Nov 2024 12:19:32 -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=Se2M9fB+9TW9w6Yspi/TnmRkWeb3v46dzh8eXSPuaMQ=; b=U0+JDrwJybHo FOLyr6vjZYLvn3+bzWZGHePvXaEVykmJCxbwbORPGLN0+OJLX6uOSkHV4Rg0suEWEsr3WV9j6Q26s QnRXmw4tnZgxIm/G31UHeuPWtth+xL+A6FcS3+cFwLEfw84Zkp9Tbk9m2NqG8KUz2CEO0qdksErzs 9Zhoyw74/x9jTm8fvHj0a4ZHR7Qx2CcD1mrDa2NmUEnuGXOTkyIq2hPcHeUoHRb401CpnvFiaHund pRymTr69Lg4chX3JbcCjCluK/NoaiG9PvjlSIpRrB3JnecM+hXUT4qtO465XrMKus86USNRmDcPR3 zrqUXjX8DGU72CGeRofwMA==; In-Reply-To: (bug-gnu-emacs@gnu.org) 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:295649 Archived-At: > Cc: mail@alternateved.com > Date: Tue, 19 Nov 2024 17:13:16 +0100 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > The root cause is a peculiarity of flyspell-mode: it calls sit-for and > blocks Emacs for 3 whole seconds (by default, see flyspell-delay) after > certain commands, including after (org-)self-insert-command. This also > blocks the idle timer that Completion Preview mode uses, unfortunately. > > A quick search shows that this behavior of flyspell affects other > features as well. For example, IIUC, auto completion in Corfu switched > to using run-at-time instead of run-with-idle-timer due to this issue. > > I think flyspell should be modified to use a timer instead of sit-for, > so as to avoid blocking idle timers. I can come up with such a patch, > but it's not quite trivial, so I wonder what others think about this > issue and how it should be addressed. This is likely to cause differences in behavior that some users will be unhappy about (how do you support delaying only after some commands? and how do you interact with async subprocess from an idle timer?). So if you want to install such a patch, it must be an opt-in feature, so we could let users try it for some time before we decide whether to retire the old behavior based on sit-for. > As a stopgap, you can try setting flyspell-delay to 0. That will make flyspell-mode get in the way of fast typing, AFAIU, but maybe the OP doesn't care about that.