[Top][All Lists]

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

RE: Occur should use the region as input if it's active

From: Drew Adams
Subject: RE: Occur should use the region as input if it's active
Date: Thu, 16 Jan 2014 11:51:41 -0800 (PST)

> > Yes and no.  The region can also be useful to delimit the
> > search without narrowing.
> I don't think it's really that useful for occur.

I let the user decide.

> Occur is usually used to find matches in a larger text.
> If you want to limit the search to a smaller region then you
> can already use isearch which hihighlights the additional
> matches or simply use narrowing.

The latter, yes.  Isearch is not the same as `occur'.

> If a configuration option like this is added then
> its default value should be using the active region for
> search because in my experience I use it very often and
> I only occasionally need to limit the search to a region
> which I can already do with narrowing.

The same argument could be made for (my) option
`search/replace-2nd-sel-as-default-flag', which uses the
secondary selection as default.  (The default value for both
options is nil.)

(FWIW, my `grep' code behaves a bit differently.  There, a
usable region is always used as the default search pattern.)

reply via email to

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