bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47012: xref copies keymap properties to minibuffer


From: Juri Linkov
Subject: bug#47012: xref copies keymap properties to minibuffer
Date: Thu, 11 Mar 2021 22:58:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> 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 :-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]