From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomasz =?UTF-8?Q?Ho=C5=82ubowicz?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74437: 30.0.92; completion-preview-idle-delay is delayed by flyspell Date: Tue, 19 Nov 2024 17:56:46 +0100 Message-ID: <87frnnkvqp.fsf@alternateved.com> References: <87cyirbfpd.fsf@alternateved.com> Reply-To: Tomasz =?UTF-8?Q?Ho=C5=82ubowicz?= Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7588"; mail-complaints-to="usenet@ciao.gmane.io" To: me@eshelyaron.com, Tomasz@debbugs.gnu.org, =?UTF-8?Q?Ho=C5=82ubowicz@debbugs.gnu.org, ?= via, Bug@debbugs.gnu.org, reports@debbugs.gnu.org, for@debbugs.gnu.org, GNU@debbugs.gnu.org, Emacs@debbugs.gnu.org, 74437@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 19 17:58:18 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 1tDRYO-0001lQ-EM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Nov 2024 17:58:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDRYC-0007xy-Vx; Tue, 19 Nov 2024 11:58: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 1tDRYA-0007x7-RB for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 11:58: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 1tDRYA-0006Tm-G5 for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 11:58:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=CTfG9NewLzSkyx9Q3bKYRSaa2SwGoLqH/GYWiDfBFCs=; b=TnbRhOYZm05lTyoQxgk6IM99EvHn/QVNBHtpCIFxKnAZlzdfxJvfRkNnsvEoQ1HnMP1+I0327ReP6DGi/IYEVYTEPcTAzHqGym8dfeZVlxDCc5MIgEGPKSXLfbrybiuDZR9hh8u5rmtbpaRkwfnUNGxi4jAOHhhrZrM/yyURXux8jHvudNkkZEsEPYT9gjdpUGerHFvPB83Sp4CKGN0krlxzcHOYqxvpGa/dd4t62NaEGaTty+ATQBgGUJfTW+y13kdtwjlO7IeGR+WetpkoaxrmEEKtXi54Nkvzif+olD3PbpqlTk7sY2lVFbp7zEYuJBeHgYVm9jF1uxF+d8/Mtg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDRY9-0007c8-Rm for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 11:58:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tomasz =?UTF-8?Q?Ho=C5=82ubowicz?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Nov 2024 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74437 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Eshel Yaron , Tomasz =?UTF-8?Q?Ho=C5=82ubowicz?= via Bug reports for GNU Emacs, the Swiss army knife of text editors X-Debbugs-Original-Cc: 74437@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173203542729177 (code B ref -1); Tue, 19 Nov 2024 16:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Nov 2024 16:57:07 +0000 Original-Received: from localhost ([127.0.0.1]:43836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDRXH-0007aX-2h for submit@debbugs.gnu.org; Tue, 19 Nov 2024 11:57:07 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:34990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDRXE-0007aO-IM for submit@debbugs.gnu.org; Tue, 19 Nov 2024 11:57: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 1tDRXC-0007uW-Ih for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 11:57:02 -0500 Original-Received: from out-185.mta0.migadu.com ([2001:41d0:1004:224b::b9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDRXA-0006MS-4q for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2024 11:57:02 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alternateved.com; s=key1; t=1732035416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CTfG9NewLzSkyx9Q3bKYRSaa2SwGoLqH/GYWiDfBFCs=; b=ZYo0nTzth/iTp/5ibfW878nNrtYRmAlpd4NbjeY3eWiOD5+8R6IIge2x199CHDwt6gG2yB KlgvEwkp1okokL4ggifMcm1MCyNk/g05pbztED/aPizOB0D157k/QMqZo/fCpjWffHahR3 JZeHSHsOVBi6/s/eHtCsMDoUhq+uMolmtDqGOqTFoWodIaaHsph8/A9tk6UOiecf8pSrf+ EN09QzFkcZ8u337FUOL46kFKIllDD5drEEHdp1V4nvmBgYo8hYqIzM/A+9a0kHHNl5/FRh j6Gqb6uJ3qPSbMu6tMwbfPXUkWu2+8JLD96lbsd4KEp5BDr35Ee5tWptdU3/ug== In-Reply-To: X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::b9; envelope-from=mail@alternateved.com; helo=out-185.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:295647 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, On Tue, Nov 19 2024, Eshel Yaron wrote: > Side note: it is better to use (completion-preview-active-mode -1) > instead of (completion-preview-hide) to dismiss the preview, since > disabling the minor mode performs additional cleanup. Perhaps I should > mention that in the documentation somewhere... :) > Thank you for that tip! > Thank you for this report. I can reproduce the extended delay here. > (In the future, please provide a minimal recipe to reproduce the issue > starting from emacs -Q, if possible.) Apologies for a bit noisy report, I wrote it in a bit of a rush. If anyone would like to reproduce this issue, I believe below recipe should be helpful: (require 'flyspell) (add-hook 'org-mode-hook #'flyspell-mode) (require 'completion-preview) (setopt completion-preview-idle-delay 0.2) (push 'org-self-insert-command completion-preview-commands) (global-completion-preview-mode 1) After that open an Org file and try to trigger completion-preview by writing a part of a word. Completion results most likely depend on the contents of file pointed by ispell-alternate-dictionary value. If that file is empty there might be no completions available. > 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. > > As a stopgap, you can try setting flyspell-delay to 0. Thank you for help and explanation. I will try flyspell-delay 0 for a time (or stick with completion-preview-mode only for prog-mode buffers at it seems more appropriate). Kind wishes, Tomasz Ho=C5=82ubowicz --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIwEARYKADQWIQRIVmsvIMl2XHZKlC7XvHvDVbxH+AUCZzzDThYcbWFpbEBhbHRl cm5hdGV2ZWQuY29tAAoJENe8e8NVvEf4RXUA/A8DdiQjP26e+fzCIj05LuVU/2CF tLHFR+pBl10OPCamAQCsTQplI4mTctKYOmMt/idyOzWM97jHosQLqtXKS10SBA== =Swyk -----END PGP SIGNATURE----- --==-=-=-- --=-=-=--