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

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

bug#23179: 25.0.92; Restore `M-,' to continue etags search


From: Dmitry Gutov
Subject: bug#23179: 25.0.92; Restore `M-,' to continue etags search
Date: Mon, 8 Apr 2019 02:07:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0a1

On 07.04.2019 23:27, Juri Linkov wrote:
    M-x project-search

      1. can't use M-n to get the default value such as a word under point
         like project-find-regexp does

fileloop-initialize-search could set up next-error-function, I suppose.

This is fine, but the point was about the minibuffer prompt.

Ah yes. Sorry (M-n calls next-error in my Emacs).

But the answer would be the same: it's not hard to implement for whoever is interested. The easiest fix would be to simply use project--read-regexp in the interactive spec, but it shows a different prompt, which might or might not be a problem (the prompts follow their commands' names).

    M-x fileloop-continue

      2. its name prefix is inconsistent with the prefix of its
         counterpart command project-search

It doesn't have to. fileloop-continue is intended to be used with different
commands (e.g. some with dired- prefix as well).

Maybe an alias with another prefix is in order?

I don't think so. Or else the next step would be to set up multiple different key bindings, one for each alias. Which is obviously silly.

      3. no keybinding

There's no keybinding for project-search either. The user is welcome to
choose some.

Maybe 'M-g M-n'?

That's 'next-error', isn't it?

Again, the user is welcome to choose whatever key binding that suits them.

project-find-regexp, which is a lot handier IMO, has no default key binding either. I'm using 'C-x g'.

    M-x project-find-regexp

      4. shouldn't it support an optional more compact grep-like output
         layout as well (where file names are on the same line with matches)?

You can implement that via a custom xref-show-xrefs-function. Not trivial,
but not a huge amount of work either.

Good to know that xref is so much customizable.

That's the original idea: to be customizable. Not sure if xref-show-xrefs-function in its current form facilitates it best, of course. We might add some other hooks in the future as well.





reply via email to

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