2009-08-10

emacs 23's dired-isearch-filenames redundant?

Hi Richard,

On Aug 9, 7:05 pm, Richard Riley wrote:
> Xah Lee writes:
> > in emacs 23's dired, there's
>
> > dired-isearch-filenames (Alt+s f Ctrl+s)
>
> > and
>
> > dired-isearch-filenames-regexp (Alt+s f Ctrl+Alt+s)
>
> > what's the use for these?
>
> > user can simply do isearch (Ctrl+s) as usual, no?
>
> They can, but it might be a pain if the dired display contains words
> in, say, the group or owner fields which match.
>
> The command only searches filename text.

that seems too much trouble. It's rare that one'd need to search for a file name where the string happens to be in the owner or group or date output from “ls -l”.

A guy Eric informed me of this manual entry:

(info "(emacs) Dired Navigation")

which indicatse that if one puts:

(setq dired-isearch-filenames t)

then C-s will automacially just focus on the file names.
If one puts

(setq dired-isearch-filenames 'dwim)

then C-s it will focus on the file name only if the cursor is at file names column, and on the whole dired text if the cursor is on the other part.

This is fantastic.

Thinking about this, i think it'd be even better, if
(setq dired-isearch-filenames t)
behavior just always assumed.

I'm thinking that it's even better if C-s does what it always does, and completely get rid of dired-isearch-filenames or dired-isearch-filenames-regexp. Because i think these 2 functions are rarely needed, and when user needs to search thru file names only, or with regex, there are lots of ways with grep or variant methods that does it.

... am guessing things are the way it is now because i vaguely recall in emacs dev list in recent months that emacs devers are moving dired-x things into dired... so in a short rush to release emacs 23 (which is great), not full thought has been put into this...

Xah
∑ http://xahlee.org/

No comments:

Post a Comment