X-Loop: help-debbugs@HIDDEN Subject: bug#74404: [PATCH] Give Completion Preview bindings higher precedence Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 17 Nov 2024 16:31:02 +0000 Resent-Message-ID: <handler.74404.B.17318610569345 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 74404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 74404 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.17318610569345 (code B ref -1); Sun, 17 Nov 2024 16:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Nov 2024 16:30:56 +0000 Received: from localhost ([127.0.0.1]:58255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tCiAp-0002Qf-Tv for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 11:30:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:32780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tCiAn-0002QW-OC for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 11:30:54 -0500 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 <me@HIDDEN>) id 1tCiAn-0003uo-0q for bug-gnu-emacs@HIDDEN; Sun, 17 Nov 2024 11:30:53 -0500 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1tCiAl-0005Yd-JQ for bug-gnu-emacs@HIDDEN; Sun, 17 Nov 2024 11:30:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1731861049; bh=7PDLbA2C0TT6G/s/VJbInWFoC+5IWwIe2M+qJWKvQuE=; h=From:To:Subject:Date:From; b=fZr5YRmnyg1NfMC4eMKDylKNYJER8ypnHt685CLyqYwkbtIT+CrEZp9xrxsMdh98t obJM4qe5dY3TeCFYy5zRlZCnWJX8igpV6moCdWW9RD6HatqyDat2nKx4/h3ozrQBzi U3agy4bQdZEJYAqODxNVmpr8GN1uX3VJiBm7/Yxro4m2Szwxn9e7tYTqe2Y1i+BoPd vKQtOP6LTk44bJ0G2ixH0+LXEvvhe/oGs5gt+jqNKMQmLpel9XSqZxzQjBQv7tFDtl OZ64Tjcejf1SOEKOU3TJjgGsNXTSW2ovmFDau3lrMykaL1Gyyzx6jn5Tcg5ANKgR4T k+3u3aGa7FA8w== From: Eshel Yaron <me@HIDDEN> X-Hashcash: 1:20:241117:bug-gnu-emacs@HIDDEN::wFlDTZpzQKKrTonm:Btou Date: Sun, 17 Nov 2024 17:30:47 +0100 Message-ID: <m1jzd1j008.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN; helo=eshelyaron.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch Whenever Completion Preview mode shows a completion preview, it also activates keybindings for commands that interact with that preview, most notably TAB is bound to completion-preview-insert, which inserts the suggested completion. This is implemented via a minor mode completion-preview-active-mode whose keymap provides these bindings, and which is enabled when the preview is displayed. This all works well, except for when another minor mode, foo-mode, is enabled, whose keybindings conflict with these active preview bindings. If foo-mode is defined after completion-preview-active-mode, i.e. if foo.el is loaded after completion-preview.el, then foo-mode comes first in minor-mode-map-alist and takes precedence over the bindings in completion-preview-active-mode-map. This happens, for example, with eshell-cmpl-mode, a minor mode that is enabled by default in Eshell, which binds TAB to completion-at-point. So currently Completion Preview mode doesn't work as expected in Eshell: when you try to accept the suggested completion (with TAB), you get completion-at-point instead of completion-preview-insert. To fix this issue, we need to give the active completion preview bindings higher precedence than keymaps of minor modes that where defined after loading completion-preview.el. The patch below does that by using minor-mode-overriding-map-alist. Any thoughts? --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Give-Completion-Preview-bindings-higher-precedence.patch From 951df80d3749b2e82072f397dd7c7b5ce256f36d Mon Sep 17 00:00:00 2001 From: Eshel Yaron <me@HIDDEN> Date: Sun, 17 Nov 2024 16:55:30 +0100 Subject: [PATCH] Give Completion Preview bindings higher precedence * lisp/completion-preview.el (completion-preview-active-mode): add keymap to 'minor-mode-overriding-map-alist' so it takes precedence over other minor mode maps that bind TAB, such as 'eshell-cmpl-mode' in Eshell. --- lisp/completion-preview.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index 4564812e8a9..e5be3197032 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -322,8 +322,13 @@ completion-preview-active-mode "Mode for when the completion preview is shown." :interactive nil (if completion-preview-active-mode - (add-hook 'window-selection-change-functions - #'completion-preview--window-selection-change nil t) + (progn + (add-hook 'window-selection-change-functions + #'completion-preview--window-selection-change nil t) + ;; Give keymap precedence over other minor mode maps. + (setf (alist-get 'completion-preview-active-mode + minor-mode-overriding-map-alist) + completion-preview-active-mode-map)) (remove-hook 'window-selection-change-functions #'completion-preview--window-selection-change t) (completion-preview-hide))) -- 2.46.2 --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Eshel Yaron <me@HIDDEN> Subject: bug#74404: Acknowledgement ([PATCH] Give Completion Preview bindings higher precedence) Message-ID: <handler.74404.B.17318610569345.ack <at> debbugs.gnu.org> References: <m1jzd1j008.fsf@HIDDEN> X-Gnu-PR-Message: ack 74404 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 74404 <at> debbugs.gnu.org Date: Sun, 17 Nov 2024 16:31:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 74404 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 74404: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74404 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#74404: [PATCH] Give Completion Preview bindings higher precedence Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 17 Nov 2024 17:05:02 +0000 Resent-Message-ID: <handler.74404.B74404.173186308715306 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eshel Yaron <me@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 74404 <at> debbugs.gnu.org Received: via spool by 74404-submit <at> debbugs.gnu.org id=B74404.173186308715306 (code B ref 74404); Sun, 17 Nov 2024 17:05:02 +0000 Received: (at 74404) by debbugs.gnu.org; 17 Nov 2024 17:04:47 +0000 Received: from localhost ([127.0.0.1]:58373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tCiha-0003yo-KR for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 12:04:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tCihY-0003yY-Kv for 74404 <at> debbugs.gnu.org; Sun, 17 Nov 2024 12:04:45 -0500 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 <eliz@HIDDEN>) id 1tCihR-00035I-Ne; Sun, 17 Nov 2024 12:04:38 -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=ReiN9FsgCGLHAOG1LNt9pMDqZRTgY4iGkxwNN4dLcsM=; b=luak+wpA9b9R KdyRjVOGaB7asObmGmkKuBGA00/YGBZqF2Lp65RXZRPgUe3+1rPmab8cKrg1XxVt9ujxarqWEtDhO RnvYRt3prxZaNJ6+NbfqqdkZ1G01+2YDYDSoxn453utX7FoBJTlRU/o1Cq1GZNivLpfo6aFf9CbAH /6ud13HZkFqcb3vN8Ysf3Q6UGb35YOhobuqUXy0JyaZ7xNiA8sGsikbTBksPFQTV3/4QQL6U4JLOR +LyL7a7JzED9ibIy5qBuggCyPniqmsYzCnV0MCgnRCT2hSpj8HYaoLSDTvyKcwoOcSUfSR+/xWpEV ikxOqjZ0wbWwN+rhItiXgQ==; Date: Sun, 17 Nov 2024 19:04:33 +0200 Message-Id: <86ttc5vljy.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <m1jzd1j008.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) References: <m1jzd1j008.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Sun, 17 Nov 2024 17:30:47 +0100 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Whenever Completion Preview mode shows a completion preview, it also > activates keybindings for commands that interact with that preview, most > notably TAB is bound to completion-preview-insert, which inserts the > suggested completion. This is implemented via a minor mode > completion-preview-active-mode whose keymap provides these bindings, and > which is enabled when the preview is displayed. > > This all works well, except for when another minor mode, foo-mode, is > enabled, whose keybindings conflict with these active preview bindings. > If foo-mode is defined after completion-preview-active-mode, i.e. if > foo.el is loaded after completion-preview.el, then foo-mode comes first > in minor-mode-map-alist and takes precedence over the bindings in > completion-preview-active-mode-map. > > This happens, for example, with eshell-cmpl-mode, a minor mode that is > enabled by default in Eshell, which binds TAB to completion-at-point. > So currently Completion Preview mode doesn't work as expected in Eshell: > when you try to accept the suggested completion (with TAB), you get > completion-at-point instead of completion-preview-insert. > > To fix this issue, we need to give the active completion preview > bindings higher precedence than keymaps of minor modes that where > defined after loading completion-preview.el. The patch below does that > by using minor-mode-overriding-map-alist. Any thoughts? Can't you instead use the 'keymap' text or overlay property? That would avoid the "arms race" of precedences. Adding Stefan, in case he has comments or suggestions.
X-Loop: help-debbugs@HIDDEN Subject: bug#74404: [PATCH] Give Completion Preview bindings higher precedence Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 17 Nov 2024 17:17:02 +0000 Resent-Message-ID: <handler.74404.B74404.173186380217666 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii <eliz@HIDDEN> Cc: 74404 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN> Received: via spool by 74404-submit <at> debbugs.gnu.org id=B74404.173186380217666 (code B ref 74404); Sun, 17 Nov 2024 17:17:02 +0000 Received: (at 74404) by debbugs.gnu.org; 17 Nov 2024 17:16:42 +0000 Received: from localhost ([127.0.0.1]:58409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tCit7-0004as-QI for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 12:16:42 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1tCit5-0004ae-1J for 74404 <at> debbugs.gnu.org; Sun, 17 Nov 2024 12:16:40 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87639807F5; Sun, 17 Nov 2024 12:16:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731863791; bh=Ov8C7cRXuJHSB8Z9hjk+eNoydzE2yviGk/IetYe7iY4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gTN9hCVE3IVI0fDp+TJ86TwPCDe+ANqhBTpfKT84xDs7L+MIJAmiILsbpGdkswUHt syUuLXVM1mgCE9ON1bGOlv2OCsBuwGsMJ2tKvuPMRKEbYwNV9OhAxeL0Pei9Y6Jsn8 R9nlLAZRD5bbthIpkCn155GoLpiRZBwJYl3CbCRp+jdTPh0J/LTTdYHjWcTrOqw4sQ o/9HA3t5ehkgtnYmz0Z538ndNjIswBCsnhBLi1Wk6hRcvIrfJU+P4iPW7yqFnOxveR 3T8EWfLZVzvrYQVFDzYY8dfZKtlbAbN48gvZLRZ4oCDobdCMIIw421tXG6FebYIM0z ZcFwJ+6iaQLWA== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B203E80672; Sun, 17 Nov 2024 12:16:31 -0500 (EST) Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 155B31203DB; Sun, 17 Nov 2024 12:16:31 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <86ttc5vljy.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 17 Nov 2024 19:04:33 +0200") Message-ID: <jwvserpyefx.fsf-monnier+emacs@HIDDEN> References: <m1jzd1j008.fsf@HIDDEN> <86ttc5vljy.fsf@HIDDEN> Date: Sun, 17 Nov 2024 12:16:29 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.006 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) >> To fix this issue, we need to give the active completion preview >> bindings higher precedence than keymaps of minor modes that where >> defined after loading completion-preview.el. The patch below does that >> by using minor-mode-overriding-map-alist. Any thoughts? > > Can't you instead use the 'keymap' text or overlay property? That > would avoid the "arms race" of precedences. > > Adding Stefan, in case he has comments or suggestions. Assuming the minor mode is disabled as soon as point moves away from the completion, I wouldn't have a clear preference between `keymap` and `minor-mode-overriding-map-alist`. BTW, maybe we should add some notion of minor mode precedence since such problems are actually fairly common. We could do something similar to what we do with `add-hook`, so `add-minor-mode` takes care of obeying the ordering constraints. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#74404: [PATCH] Give Completion Preview bindings higher precedence Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 17 Nov 2024 17:32:01 +0000 Resent-Message-ID: <handler.74404.B74404.173186467020326 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier <monnier@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 74404 <at> debbugs.gnu.org Received: via spool by 74404-submit <at> debbugs.gnu.org id=B74404.173186467020326 (code B ref 74404); Sun, 17 Nov 2024 17:32:01 +0000 Received: (at 74404) by debbugs.gnu.org; 17 Nov 2024 17:31:10 +0000 Received: from localhost ([127.0.0.1]:58446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tCj78-0005Hi-3M for submit <at> debbugs.gnu.org; Sun, 17 Nov 2024 12:31:10 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:45166 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tCj74-0005HY-P5 for 74404 <at> debbugs.gnu.org; Sun, 17 Nov 2024 12:31:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1731864666; bh=FI3ZreQa9iajvJ3O6IeWvFFGbQSWnFIwjVc0uFpWvvo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MGcWAMH4wwU3c3QfeHyYjQenF2wtZqcX4ZQNyY6Oe2fVxkZ8X2NzqmD44+PYDoJha nkEP9DgJhtJGFMpJmpbCEkoRvnCtapomrm8TwWW9bUOt+1H9XQf65WK0LvlwWQKegV KgwYPYyoEZDTlZ/TolEbkudW36MhL5JPKcCpaJyaOv+1upP3mNBci3LIpsV/EnaHe6 fUxS7oyNbQ4P7pHCQJWNhIGGMW7IhZ3ueqmrraAdcWJcyfAadg6onvBxsl1XZ3f2/M 7XyayCaefhPJEEMtyDfsHJndCA7JaPnnkdpAvnWmptXOfDnG7KH23BXmpGXL1Z6XjR AxUBd85EgxzwA== From: Eshel Yaron <me@HIDDEN> In-Reply-To: <jwvserpyefx.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message of "Sun, 17 Nov 2024 12:16:29 -0500") References: <m1jzd1j008.fsf@HIDDEN> <86ttc5vljy.fsf@HIDDEN> <jwvserpyefx.fsf-monnier+emacs@HIDDEN> Date: Sun, 17 Nov 2024 18:31:03 +0100 Message-ID: <m14j45ix7s.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Stefan Monnier <monnier@HIDDEN> writes: >>> To fix this issue, we need to give the active completion preview >>> bindings higher precedence than keymaps of minor modes that where >>> defined after loading completion-preview.el. The patch below does that >>> by using minor-mode-overriding-map-alist. Any thoughts? >> >> Can't you instead use the 'keymap' text or overlay property? That >> would avoid the "arms race" of precedences. I thought about that, but no, we can't easily use that, since the overlay is not necessarily at point: it is generally at the end of the symbol, and point may be at the middle of the symbol. >> Adding Stefan, in case he has comments or suggestions. > > Assuming the minor mode is disabled as soon as point moves away from the > completion, I wouldn't have a clear preference between `keymap` and > `minor-mode-overriding-map-alist`. Indeed, the minor mode is disabled as soon as the completion preview is dismissed for whatever reason, including moving point elsewhere. > BTW, maybe we should add some notion of minor mode precedence since such > problems are actually fairly common. We could do something similar to > what we do with `add-hook`, so `add-minor-mode` takes care of obeying > the ordering constraints. That'd be nice, I think. Thanks, Eshel
X-Loop: help-debbugs@HIDDEN Subject: bug#74404: [PATCH] Give Completion Preview bindings higher precedence Resent-From: Sean Whitton <spwhitton@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 22 Nov 2024 10:09:01 +0000 Resent-Message-ID: <handler.74404.B74404.17322701395290 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>, 74404 <at> debbugs.gnu.org, Eshel Yaron <me@HIDDEN> Received: via spool by 74404-submit <at> debbugs.gnu.org id=B74404.17322701395290 (code B ref 74404); Fri, 22 Nov 2024 10:09:01 +0000 Received: (at 74404) by debbugs.gnu.org; 22 Nov 2024 10:08:59 +0000 Received: from localhost ([127.0.0.1]:53105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tEQaw-0001NG-LS for submit <at> debbugs.gnu.org; Fri, 22 Nov 2024 05:08:58 -0500 Received: from sendmail.purelymail.com ([34.202.193.197]:35066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1tEQau-0001Mw-0b for 74404 <at> debbugs.gnu.org; Fri, 22 Nov 2024 05:08:57 -0500 DKIM-Signature: a=rsa-sha256; b=yeEJGu947eHh7U5PnO4DtphC7Kpf+ajF1aJxay7Yf36SZmfcp4sIT+h5odLiTAXaR2OoTzCsqx4lNv8ZULoGQj1jCbdpH5NrSXP21ue005+9jjXUUEWSnaL61xfm3q1q1K7agWvDbI2CE9Hj2mCDjbzeQA44+izVaRotAM5DjamYcNZ06wK27+MNfdqrtZYOk4WT/IQXu+YFqrEXOoFRDnYTk9fBVMSNQ1SYzFXeeyryvVr6FquG1jdKND1iOAQs1t5+pji9dwjm4zwGlAIXCYejVq1cbwhnLAtZFtCgGIg8sdTXpzVSXbyMR0dvqXybXmvQxIJEjNcOcs+LQRWnbA==; s=purelymail3; d=spwhitton.name; v=1; bh=+8GrkYWqain6r8lg81wAw6hDpIfEu1C0L4hIeQXaRso=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=jddjnLZmTIzI3uhNpLM0J6WbDTKTizj4/qu0/A58St66qkC2+yrDYtqscwvGJ7YTHgcXJkya9U9HoD3MdZNxcZvW4jBRzVyoU7nE4sUnQBCnzNfmvqdfQkOYK3AeWJej/t4bUFJXHbZDNWKuDABiBWV+75hqmNkbdbIxv8Otmb/KzUQt2dr0lMxC12nKhgD9spHrdSsgwl1f+6qonRCa2Lg18VHhg4zs83vkVZGC7b7rWsYUcdRg7l68Tse8CpVmh2tZs77wogWMrRUCkTrKGwwRdJLAl5yIJOErS/rRJaexLrW+hl/7pKRV9PYuU/gwIbHlaVGZfPSVEpcA1u0/jw==; s=purelymail3; d=purelymail.com; v=1; bh=+8GrkYWqain6r8lg81wAw6hDpIfEu1C0L4hIeQXaRso=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 74404 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1054700279; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 22 Nov 2024 10:08:49 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 234C47E10B1; Fri, 22 Nov 2024 18:08:47 +0800 (CST) From: Sean Whitton <spwhitton@HIDDEN> In-Reply-To: <jwvserpyefx.fsf-monnier+emacs@HIDDEN> (Stefan Monnier via's message of "Sun, 17 Nov 2024 12:16:29 -0500") References: <m1jzd1j008.fsf@HIDDEN> <86ttc5vljy.fsf@HIDDEN> <jwvserpyefx.fsf-monnier+emacs@HIDDEN> Date: Fri, 22 Nov 2024 18:08:47 +0800 Message-ID: <87mshry40g.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello, On Sun 17 Nov 2024 at 12:16pm -05, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: > BTW, maybe we should add some notion of minor mode precedence since such > problems are actually fairly common. We could do something similar to > what we do with `add-hook`, so `add-minor-mode` takes care of obeying > the ordering constraints. We could also have a customisation option that allows the user to override the default priorities. As minor modes are always interned symbols, this would be possible in a way that it isn't for hook priorities. -- Sean Whitton
X-Loop: help-debbugs@HIDDEN Subject: bug#74404: [PATCH] Give Completion Preview bindings higher precedence Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 23 Nov 2024 14:04:01 +0000 Resent-Message-ID: <handler.74404.B74404.1732370583812 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 74404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Sean Whitton <spwhitton@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 74404 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 74404-submit <at> debbugs.gnu.org id=B74404.1732370583812 (code B ref 74404); Sat, 23 Nov 2024 14:04:01 +0000 Received: (at 74404) by debbugs.gnu.org; 23 Nov 2024 14:03:03 +0000 Received: from localhost ([127.0.0.1]:57216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tEqj0-0000D1-MA for submit <at> debbugs.gnu.org; Sat, 23 Nov 2024 09:03:02 -0500 Received: from mail.eshelyaron.com ([107.175.124.16]:59804 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1tEqiy-0000CT-7d; Sat, 23 Nov 2024 09:03:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1732370579; bh=AHF61jvcCDwEmYO0CpnP047aRB1BAo07fzWm3T8I+/8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qS7pNAefzz/w0d0Ua/l1S6DPx+kr5qrzAzCsnExFnaYGgEbRGGaxlU7gUENsRk0ht rrewOVvPzx5FBqfZsjRiBnhq38Ia8d10QZ31DoSn1tc3rNDOjx5WS16sUk8Z0keeXl XJiXz0YEQIy8ij38lTE49ONiRCSaxigoKxyX76bjqBpcgAo93ldTt7NVorc6txNGbS 4yd7jRJRncU1eIC5+DdSFdSXiJTh3Wg7FBb3GYAfl6XL7sYKs514h4Hnfq5U9rn+VR Eu8fVAKAIG57DL5Xi9LkMk9ORb9zcdw7EsjJX/Ddl8xvPR5Zm5EfwxIjzMWKk2PIGE p5vgzT8YKItuw== From: Eshel Yaron <me@HIDDEN> In-Reply-To: <87mshry40g.fsf@HIDDEN> (Sean Whitton's message of "Fri, 22 Nov 2024 18:08:47 +0800") References: <m1jzd1j008.fsf@HIDDEN> <86ttc5vljy.fsf@HIDDEN> <jwvserpyefx.fsf-monnier+emacs@HIDDEN> <87mshry40g.fsf@HIDDEN> Date: Sat, 23 Nov 2024 15:02:56 +0100 Message-ID: <m1y11a9hf3.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) close 74492 31.1 quit Hi, Sean Whitton <spwhitton@HIDDEN> writes: > Hello, > > On Sun 17 Nov 2024 at 12:16pm -05, Stefan Monnier via "Bug reports for > GNU Emacs, the Swiss army knife of text editors" wrote: > >> BTW, maybe we should add some notion of minor mode precedence since such >> problems are actually fairly common. We could do something similar to >> what we do with `add-hook`, so `add-minor-mode` takes care of obeying >> the ordering constraints. > > We could also have a customisation option that allows the user to > override the default priorities. As minor modes are always interned > symbols, this would be possible in a way that it isn't for hook > priorities. I've opened bug#74492 to discuss this broader topic of explicit minor mode precedence. For now, I've pushed my patch solving this particular issue with Completion Preview mode to master (commit 30bcba27c8c). With that, I'm closing this bug. Thanks, Eshel
Received: (at control) by debbugs.gnu.org; 2 Jan 2025 02:00:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 01 21:00:22 2025 Received: from localhost ([127.0.0.1]:41386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tTAVa-0002Om-La for submit <at> debbugs.gnu.org; Wed, 01 Jan 2025 21:00:22 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:48280) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>) id 1tTAVY-0002Ob-A1 for control <at> debbugs.gnu.org; Wed, 01 Jan 2025 21:00:20 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5d7e3f1fdafso22341593a12.0 for <control <at> debbugs.gnu.org>; Wed, 01 Jan 2025 18:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735783219; x=1736388019; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=/QLhme9wmEKi+Tt4eVA4cYRYeuNqJL9GdOqCg48P63o=; b=Cv/YWpR6n120yYIfvtFvJ5cakFQHCFWxOVN+4CCUvp4F1HKn588EZuhS3NWjWe2lrt c5ckeTbljjxv0jyiwFu8RvvK5aytECWkV34eA6Zoy867iUcenMKDKqzBuJmqeJpHc9v+ Mmr5Wz+4KE95AGq8jIcUsuNPvOcJFDXgDPSn/hcBxEXrhrH2W4TN0S/Vgixlk/4AR93j b73RMGdolYfD/Pt6UstSAFUltxZa3ycE7JOh0dmZpE/Mk6SPvcC6jyMQrkvwIdnU9X5R 66S3r+hrxRhbLK0XlEaRT5XXEssKyWO5tcuqLgJlK6KtgZR+KLQohAp2aWFT5iChcRC3 vsFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735783219; x=1736388019; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/QLhme9wmEKi+Tt4eVA4cYRYeuNqJL9GdOqCg48P63o=; b=sq+2mLZEHDGvHozTmgotGRkzv5KJ91SV3mVi1QnyP2IFJcumL5ewypaC0PMDj0popE P/+lokOQAoNW9ttgPvRmes0uK6cj3MoVpZomL1nSNCHyOkihGNSXW1DZSocbPmeRO/hM qQ9ErmDHrbag/m26v+1Z89Noz04KH8tjGMoLUZ+3O89VXPe0SA5l5TjBRJzkfA28cMbH krYRHkXC2PZWUMBgYA0pM7WWRhEg1vUT3ODhrUbYguoCWrokcIGacY73tQVkQGIuGxUn VPm5zIvY5wIfgl7XJIJ+jncySbidab1IzPMRqG+7ZQbeHEaPikcAUFz9IGAD2R2XSmbH yQZg== X-Gm-Message-State: AOJu0YxwP8wMBR9IFzLQDl51KXud4M0l67nLg0HxTho5j7NWUjsekFPQ Q80lS7ViT3x7JU3Aim5q241/yXdPEsQzU9Zxwx5IQbZX839qxj6w9m+7Cbr/rPZlXdJ9v4cjBL0 v6DbZ2ju7evxZJXG0NCyZL4tT9h3qxr4A X-Gm-Gg: ASbGncu4lqSQR2Gqi7hjypdH0mSVOBoSUgRPjtUW0JbfI6Ntk+L/9Q+nrDnTHQpjDs/ eWwOAIoQc+15KTIU4Wd2hDzQmVl7BLJ0CKSm4GT8q X-Google-Smtp-Source: AGHT+IHJy/ax3ob2ZnTbXNid8l7WQaOtAM+PMmSUiyqPiFOtnExTisiMqeuJxnH9GaFJK8GJxV85uFybrurBd5kM3ZM= X-Received: by 2002:a05:6402:210a:b0:5d0:81af:4a43 with SMTP id 4fb4d7f45d1cf-5d81dc797b5mr35870983a12.0.1735783219172; Wed, 01 Jan 2025 18:00:19 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 1 Jan 2025 20:00:18 -0600 From: Stefan Kangas <stefankangas@HIDDEN> MIME-Version: 1.0 Date: Wed, 1 Jan 2025 20:00:18 -0600 Message-ID: <CADwFkmmEwcYheR9FE0vP0NvFTdUueD0wFGwG72XN4qYqJ4rJ5Q@HIDDEN> Subject: control message for bug #74404 To: control <at> debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) severity 74404 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.