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, 25 Mar 2021 11:40:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> Actually, can't do this without feature request,
>> and can't use it as is, because never use regexp
>> while searching in project, whereas it pollutes
>> the regexp history for commands where I really
>> use regexps, not just strings.
>> A simple patch could be a saver to use with e.g.
>> (setq project-regexp-history-variable 'minibuffer-history):
>
> The idea makes sense, but perhaps we shouldn't add one more way of doing
> this and just copy what grep-read-regexp does. Meaning, define
> a project-specific var and then use it. We could use 'grep-regexp-history
> there too, as another alternative.
>
> But having a var called project-regexp-history seems more powerful, and
> even no less powerful than your suggested approach, because one can always
> turn that variable into a defalias, if they so wish.

Sharing regexp history between grep and project-find-regexp would be
the most desirable.  How better to achieve this?

Some commands already use variable *-history-variable, so adding
project-regexp-history-variable wouldn't cause a new precedent.

Whereas using defalias is something new, maybe it could work too:

  (defalias 'grep-regexp-history 'project-regexp-history)





reply via email to

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