From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs Subject: bug#52389: 29.0.50; Imenu does not pop up the Completions eagerly Date: Fri, 17 Dec 2021 13:57:52 +0200 Message-ID: <87v8zncukf.fsf@protesilaos.com> References: <87bl1pj44k.fsf@protesilaos.com> <87mtl8znih.fsf@gnus.org> <87h7bfx1p6.fsf@gnus.org> <86h7belwxq.fsf@mail.linkov.net> <877dcacq2k.fsf@protesilaos.com> <86sfuxlo8g.fsf@mail.linkov.net> <87pmq1j7hs.fsf@protesilaos.com> <86r1agdfio.fsf@mail.linkov.net> 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="18635"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.34.1 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 52389@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 17 12:59:10 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 1myBtG-0004eY-Lz for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Dec 2021 12:59:10 +0100 Original-Received: from localhost ([::1]:45914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myBtF-0005Uh-Dn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Dec 2021 06:59:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myBt8-0005TD-ED for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2021 06:59:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myBt8-000459-6a for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2021 06:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myBt8-0007RW-0W for bug-gnu-emacs@gnu.org; Fri, 17 Dec 2021 06:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Dec 2021 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52389 X-GNU-PR-Package: emacs Original-Received: via spool by 52389-submit@debbugs.gnu.org id=B52389.163974228328532 (code B ref 52389); Fri, 17 Dec 2021 11:59:01 +0000 Original-Received: (at 52389) by debbugs.gnu.org; 17 Dec 2021 11:58:03 +0000 Original-Received: from localhost ([127.0.0.1]:38126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myBsB-0007Q8-Da for submit@debbugs.gnu.org; Fri, 17 Dec 2021 06:58:03 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myBs9-0007Pb-BB for 52389@debbugs.gnu.org; Fri, 17 Dec 2021 06:58:02 -0500 Original-Received: (Authenticated sender: public@protesilaos.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A9AB1E000D; Fri, 17 Dec 2021 11:57:53 +0000 (UTC) In-Reply-To: <86r1agdfio.fsf@mail.linkov.net> 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:222561 Archived-At: --=-=-= Content-Type: text/plain On 2021-12-13, 10:53 +0200, Juri Linkov wrote: >> Regarding this bug report, I am not sure what the status is. Should I >> rewrite the patch to specify a define-obsolete-variable-alias instead? >> Or is someone else taking care of it? > > It seems everyone agrees here it would be preferable to > rewrite the patch using define-obsolete-variable-alias. Please find attached the patch that implements the new user option. I did not include a NEWS entry as things should work the way they did before. The combined use of "not" and "no" concepts in this case feels awkward. I prefer my original approach of changing the logic, though I understand it would be backward-incompatible. -- Protesilaos Stavrou https://protesilaos.com --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Deprecate-Imenu-option-for-eager-completion-buffer.patch >From 2487aaba2f531563e1acc0979a738ade7bb322f2 Mon Sep 17 00:00:00 2001 Message-Id: <2487aaba2f531563e1acc0979a738ade7bb322f2.1639741622.git.info@protesilaos.com> From: Protesilaos Stavrou Date: Fri, 17 Dec 2021 13:46:29 +0200 Subject: [PATCH] Deprecate Imenu option for eager completion buffer The now-deprecated user option had confusing language as it produced the opposite effect of what it meant. Read bug#52389. * imenu.el (imenu-eager-completion-buffer): Remove old user option. (imenu-no-eager-completion-buffer): Write alias for the deprecated user option. (imenu--completion-buffer): Check for the new variable. --- lisp/imenu.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/imenu.el b/lisp/imenu.el index 22412d5f88..86f7d2d3ff 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -99,10 +99,15 @@ (defcustom imenu-use-popup-menu 'on-mouse (const :tag "Never" nil) (other :tag "Always" t))) -(defcustom imenu-eager-completion-buffer t - "If non-nil, eagerly popup the completion buffer." +(define-obsolete-variable-alias + 'imenu-eager-completion-buffer + 'imenu-no-eager-completion-buffer + "29.1") + +(defcustom imenu-no-eager-completion-buffer t + "If non-nil, do not eagerly popup the completion buffer." :type 'boolean - :version "22.1") + :version "29.1") (defcustom imenu-after-jump-hook nil "Hooks called after jumping to a place in the buffer. @@ -727,7 +732,7 @@ (defun imenu--completion-buffer (index-alist &optional prompt) name)))) (let ((minibuffer-setup-hook minibuffer-setup-hook)) ;; Display the completion buffer. - (if (not imenu-eager-completion-buffer) + (if (not imenu-no-eager-completion-buffer) (add-hook 'minibuffer-setup-hook 'minibuffer-completion-help)) (setq name (completing-read prompt prepared-index-alist -- 2.34.1 --=-=-=--