From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#38024: 27.0.50; icomplete sometimes fails to show completions after backward-killing words Date: Mon, 05 Apr 2021 16:59:32 -0400 Message-ID: References: <874kznwa11.fsf@gmail.com> <8736f7nfki.fsf@gmail.com> <83o8xuk9tb.fsf@gnu.org> <87y2wymt14.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21806"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Mendler , 38024@debbugs.gnu.org, kevin.legouguec@gmail.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 05 23:00:17 2021 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 1lTWKW-0005ZO-Mu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Apr 2021 23:00:16 +0200 Original-Received: from localhost ([::1]:55234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTWKV-0002Oi-Il for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Apr 2021 17:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTWKK-0002OZ-Bu for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 17:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTWKI-0006qt-Ef for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 17:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTWKI-0005DS-BE for bug-gnu-emacs@gnu.org; Mon, 05 Apr 2021 17:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Apr 2021 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38024 X-GNU-PR-Package: emacs Original-Received: via spool by 38024-submit@debbugs.gnu.org id=B38024.161765638219987 (code B ref 38024); Mon, 05 Apr 2021 21:00:02 +0000 Original-Received: (at 38024) by debbugs.gnu.org; 5 Apr 2021 20:59:42 +0000 Original-Received: from localhost ([127.0.0.1]:38745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTWJx-0005CJ-QN for submit@debbugs.gnu.org; Mon, 05 Apr 2021 16:59:42 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTWJw-0005C2-WF for 38024@debbugs.gnu.org; Mon, 05 Apr 2021 16:59:41 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id AB99F80055; Mon, 5 Apr 2021 16:59:35 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id AFD4680420; Mon, 5 Apr 2021 16:59:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1617656373; bh=IFpCxp/+8iAYgyPoDzqSZcO9KlBd7FmQ375cgBg3Q8g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eH2BVVyKxQKeDuNtD+T/D6QqgQkCoZdLZweC3NUdvLQWMkgnytCN/a9lhbVV6/QVr Hb6oakAo9wAGxVNuM3GMtbVPitRXYAAB0YTIb32qzs+AKPBCPzDUuOezABnIJBmjUr zl1GV7yWZF6bku/K5esbXuuj7vcUu1pedb8Jx9k/TjwOuSdN2oPawx7677GfpMqW8c FfAF5Y4WcNgwQCq22reS11+Fhl31rOfRcptL7O6Z5vYNHsBcCtMaGsmSunmXmmha96 pbjFB45Xa+hU+0mjNPpvdQmHM+bwLx+ek6lPm8qkdLc2pXYHX+Pm8a1zd8zE4ZTeY8 ALGSZ00C31Szg== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7189112027F; Mon, 5 Apr 2021 16:59:33 -0400 (EDT) In-Reply-To: <87y2wymt14.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sat, 02 Nov 2019 11:12:07 +0000") 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" Xref: news.gmane.io gmane.emacs.bugs:203616 Archived-At: [ Resending, as usual, since the bug was archived. Sorry. ] Jo=E3o T=E1vora [2019-11-02 11:12:07] wrote: > Eli Zaretskii writes: >> In end of data: >> icomplete.el:669:1:Warning: the function `while-no-input-ignore-events= ' is not >> known to be defined. >> while-no-input-ignore-events is not a function, it's a variable. > Sorry, > This was a merge blunder when reordering commits. The reference appears > again in the corrct variable form below. I've now fixed the problem in > 6911ef3da69333cb7adc1a7fb0a0fc001220a0c4. Hmm... so the patch installed was basically: commit 88f193ed05649b8c622867b8b2623b8cb08fdc96 Author: Jo=E3o T=E1vora Date: Sat Nov 2 02:29:56 2019 +0000 =20=20=20=20 Improve fix for icomplete's backward-kill-word bug#38024 =20=20=20=20=20=20=20=20 * lisp/icomplete.el (icomplete-exhibit): Use while-no-input-ignore-events, not redisplay. =20=20=20=20=20=20=20=20 Co-authored-by: Stefan Monnier =20=20=20=20 diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 02eae55a19..89318ca4c7 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -399,8 +399,6 @@ icomplete-exhibit See `icomplete-mode' and `minibuffer-setup-hook'." (when (and icomplete-mode (icomplete-simple-completing-p)) ;Shouldn't be necessary. - (redisplay) ; FIXME: why is this sometimes needed when moving - ; up dirs in a file-finding table? (save-excursion (goto-char (point-max)) ; Insert the match-status info= rmation: @@ -420,6 +418,11 @@ icomplete-exhibit ;; embarking on computing completions: (sit-for icomplete-compute-delay))) (let* ((field-string (icomplete--field-string)) + ;; Not sure why, but such requests seem to come + ;; every once in a while. It's not fully + ;; deterministic but `C-x C-f M-DEL M-DEL ...' + ;; seems to trigger it fairly often! + (while-no-input-ignore-events '(selection-request)) (text (while-no-input (icomplete-completions field-string but I don't understand why that would help and/or be needed: `selection-request` is (and has been for many years) in the default value of `while-no-input-ignore-events` (as set in `subr.el`), so what this patch ends up doing is forcing `while-no-input` to exit with value t in more cases (i.e. whenever one of the events in (focus-in focus-out help-echo iconify-frame make-frame-visible) comes in) rather than the opposite. What am I missing? Stefan