emacs-devel
[Top][All Lists]
Advanced

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

Re: isearch in Dired


From: Stefan Monnier
Subject: Re: isearch in Dired
Date: Thu, 24 Jul 2008 09:53:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> Isearch in Dired limited to filenames only is a good feature, so I'd like
> to finish it with the patch below.

> The main point is that it doesn't change default Isearch key bindings
> C-s and C-M-s.  It provides two ways to limit Isearch to filenames:

> 1. new user option `dired-isearch-filenames'.
>    It is nil by default, but when custimized to non-nil,
>    C-s and C-M-s search only in filenames.

> 2. new commands `'dired-do-isearch-filenames' and
>    `dired-do-isearch-regexp-filenames' bound to the
>    keys `M-s f C-s' and `M-s f M-C-s'.
>    Two similar key bindings from another patch are for
>    demonstration purposes: `M-s a C-s' and `M-s a M-C-s'
>    are placed on the same prefix key and they start Isearch
>    in all marked files.

> For this feature to work reliably it was necessary to put text
> properties `filename' on file name areas.  Tramp already puts it
> in Tramp buffer, and it seems the `filename' property in all Dired
> buffers doesn't conflict with Tramp.

ls-lisp uses `dired-filename'.  And IIRC wdired.el as well.
Not sure why Tramp uses something else, but that should probably be
investigated and explained/fixed.

The other comment I have is that I'd like to be able to toggle the kind
of search from within isearch.  Currently within `isearch', we have M-c,
M-r to toggle the case sensitivity and the use of regexps, and it would
make sense to provide additional such toggles for "word search" (tho it
might rather be folded into the regexp-toggle since there are really
only 3 possible states, not 4), and (in dired buffers) toggle-filename
and in some other buffers, other such things would make sense.
We should come up with a prefix key in isearch to replace M-c and M-r
and to give us space for extra toggles.


        Stefan




reply via email to

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