[Top][All Lists]

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

Re: RFC: [PATCH] isearch enhancements: symbol mode; syntactic filtering

From: Juri Linkov
Subject: Re: RFC: [PATCH] isearch enhancements: symbol mode; syntactic filtering
Date: Fri, 08 Jul 2011 03:20:20 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> - Syntactic filtering: control whether to match in comments, strings, and
> normal text.

This is easier to implement using `isearch-filter-predicate' as shown in

Unfortunately, I failed to find a good keybinding for this feature,
so it sunk into obscurity.

> - Symbol search: like word search, but looks only at symbol boundaries

This is much needed.  But I think it should have a keybinding separate
from word search.  Currently, `M-s w' toggles word search,
so a new keybinding `M-s _' could toggle symbol search.

> - One ring: optionally share a search ring between normal and regular
> expression searches. The additional history storage described below allows
> this mode to work reliably.

Maybe sharing a search ring between normal and regexp searches
would be better to implement in the same way as sharing
`from' and `to' histories is implemented in `query-replace'?
Like two variables `query-replace-from-history-variable' and
`query-replace-to-history-variable', isearch could provide
two variables `isearch-ring-variable' and `isearch-regexp-ring-variable'.

> The patch also changes some behavior:
> - With the patch, we store isearch state in the history ring alongside the
> actual search strings.  This information allows us to exactly recreate
> searches when we pull them from history.

Yes, storing more information about searches is a good change.

> Other behavior changes
> ----------------------
> - Case sensitivity is now displayed alongside other isearch settings in the
> isearch prompt.  Previously, the only indication we gave of case
> sensitivity was a fleeing message displayed briefly each time the user
> toggled the setting.

This is a good change as well, but one possible problem is that
its message string "case-insensitive " (17 characters) is too long
for the isearch prompt.

> - isearch no longer prints "pending". I don't see why this message would
> be useful.

"pending" reminds the user that the actual search position doesn't
correspond to the search parameters displayed in the search prompt.
This happens after e.g. changing the search type to regexp or word.
Updating the search position might be more surprising for users.

reply via email to

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