emacs-devel
[Top][All Lists]
Advanced

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

RE: isearch multiple buffers


From: Drew Adams
Subject: RE: isearch multiple buffers
Date: Sat, 27 Oct 2007 17:10:22 -0700

> Another useful type of isearch in Buffer List or Dired is the search
> restricted to the file name column.  This type of isearch should search
> text only in file names.  But the same obstacle prevents installing this
> useful feature: there is no clear way of starting this type of isearch.
>
> This suggests adding a new prefix key for starting different
> isearch types. I think a good mnemonic prefix key would be `M-s'.
> So we could have the following keybindings:
>
> `M-s *' - start multi-buffer isearch in Buffer List
>           or multi-file isearch in Dired;
>
> `M-s |' - start isearch restricted to file names or buffer names
>
> `M-s w' - start word search instead of using the ugly hack of
>           typing C-w as the first keystroke in the minibuffer
>           for editing the search string.

It's true that searching in Dired is not a corner case, unlike searching in
Buffer List.

That convinces me that the other alternative I suggested is better: C-s in
Dired or Buffer List should just ignore the marks. If you want a
multi-(file-)buffer search, then leave Dired or Buffer List before you hit
C-s. That's easy enough (C-x o). And the feedback is immediate, if you
forget, and a quick `C-g' leaves you where you started.

Why would adding special key bindings in Dired and Buffer List be better
than this?

The question of a key binding to search only file names in Dired has come up
before. We discussed generalizing that to the other Dired "fields", if they
ever get defined. I mentioned that I just hide everything except the file
names (one keystroke) before searching. It's true, however, that sometimes
you want to see the other info (e.g. date) at the same time.

A separate key binding is not a bad idea, I guess. I don't see that it needs
to have a dedicated prefix key, however. How about just `M-s'? Or `M-f' (for
file-name)? Or `F'? Or `f' (redundant binding)? Or `C-i' (for isearch), that
is, TAB (only half kidding)? Or `M-i'?

And I don't see that a key for file-name searching has any relation to
multiple-buffer isearch.

Likewise, the inconvenience of entering incremental word search is not
related to multi-buffer isearch. You once advocated an isearch binding for
that, and I agreed. In my own code, I use `C-s M-w', which is simple and
mnemonic. I think RMS opposed it because he wants `M-w' to end the search
and copy the region. If not that key, then another?

This question (incremental word search) comes up again and again - it came
up again yesterday on help-gnu-emacs. We've at least documented the
mysterious `C-s M-e C-w ... C-s' incantation now. I agree with you that it's
time we gave this a proper (simple) binding.








reply via email to

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