From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#47012: xref copies keymap properties to minibuffer Date: Thu, 11 Mar 2021 22:58:44 +0200 Organization: LINKOV.NET Message-ID: <87a6r9v24b.fsf@mail.linkov.net> References: <87czw9tnu9.fsf@mail.linkov.net> <3aad442a-7319-5db5-2fc6-560bb032c34d@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7358"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 47012@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 11 22:02:16 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 1lKSRj-0001na-Aw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Mar 2021 22:02:15 +0100 Original-Received: from localhost ([::1]:56638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKSRi-0003lL-Bq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Mar 2021 16:02:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKSRW-0003kG-Oz for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 16:02:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKSRW-0001aN-Hu for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 16:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lKSRW-00042j-Fs for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 16:02:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87czw9tnu9.fsf@mail.linkov.net> Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Mar 2021 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47012 X-GNU-PR-Package: emacs Original-Received: via spool by 47012-submit@debbugs.gnu.org id=B47012.161549651815519 (code B ref 47012); Thu, 11 Mar 2021 21:02:02 +0000 Original-Received: (at 47012) by debbugs.gnu.org; 11 Mar 2021 21:01:58 +0000 Original-Received: from localhost ([127.0.0.1]:55016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKSRS-00042F-97 for submit@debbugs.gnu.org; Thu, 11 Mar 2021 16:01:58 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:39451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKSRP-00041y-6o for 47012@debbugs.gnu.org; Thu, 11 Mar 2021 16:01:56 -0500 Original-Received: from mail.gandi.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 3A9AA100007; Thu, 11 Mar 2021 21:01:46 +0000 (UTC) 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:202097 Archived-At: >> 0. emacs -Q >> 1. C-x p g expose_frame RET >> 2. put point e.g. on "tab_bar_window" >> 3. C-x p g M-n >> 4. click mouse on the default value >> Instead of moving point to the clicked position, it visits the xref hit. >> This is because the copied default value is not stripped from the >> text property 'keymap'. >> I noticed this problem after adding RET binding to xref--button-map, >> so typing RET on the default value doesn't accept it for new search, >> but uses its local keymap to visit old reference. > > Thanks for the report, should now be fixed in master, commit 8538108132836. Confirmed, thanks. > FWIW, it's was project.el's problem, not xref's. I thought it's the xref's problem because Help says it's in xref.el. Typing 'C-h f project--read-regexp RET' shows: project--read-regexp is a Lisp function in ‘xref.el’. But this is because I tried to override this function in the init file: ;; Redefine to use `minibuffer-history': (with-eval-after-load 'project (defun project--read-regexp () (let ((sym (thing-at-point 'symbol t))) (read-regexp "Find regexp" (and sym (regexp-quote sym)) 'minibuffer-history)))) Oh, well, need to find another way to do this (no feature request for this :-)