[Top][All Lists]

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

Re: Isearch in dired

From: Juri Linkov
Subject: Re: Isearch in dired
Date: Sun, 09 Nov 2008 19:59:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

> Although it's likely that the user wants to match the filename parts of
> the Dired buffer, there are two things to note:
>  (1) There is a significant probability that the user might want to
>      match the non-file parts.  For instance, the user may want to find
>      all files modified on a certain date.

Using isearch to find files with a certain date is not the easiest way
to accomplish this task, especially when the date format is not ISO.
There are better tools like M-( dired-mark-sexp and find-dired
with -mtime and -mmin options.  However, isearching dates and other parts
of a dired buffer will still be possible even with context-dependent
isearch - when point initially is not a file name.

>  (2) For most files, the chances of a filename search string matching
>      the non-file parts of the Dired buffer are very low.  Basically,
>      this happens only for corner cases, e.g. if the user wants to find
>      a file name "1".

The false matches also include owner and group names, month names in non-ISO
formats, and sometimes even file permissions.

> Given that, I don't think it's reasonable to change the behavior of key
> sequences like C-s from their defaults.
> However, one possibility is to define a standard "dwim search" key
> binding, and try to use that key binding everywhere we want a command
> that tries to guess where the user wants to search.  Then we can make a
> "dwim search" in Dired mean searching filenames.

Perhaps in this case it would be convenient to have one option that
enables a dwim search globally for all search types: file names in Dired,
function names in source code, etc.

Juri Linkov

reply via email to

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