help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: automatic selection during search


From: Yuri Khan
Subject: Re: automatic selection during search
Date: Thu, 26 Sep 2013 23:01:52 +0700

On Thu, Sep 26, 2013 at 10:43 PM, Drew Adams <drew.adams@oracle.com> wrote:

> It's fine for a given user to add such behavior via a hook, if s?he wants.
>
> But the behavior of extending the active region during Isearch should not be
> considered a bug.  A priori, Isearch should make no decisions about changing
> the region activation.  Leave it up to the user.

Extending after set-mark or cua-set-mark is understandable and intuitive.

Extending after kill-ring-save, copy-region-as-kill or cua-copy-region
is not. Before this thread showed up, I wasn’t even able to connect
the region extending with the act of copying. All I knew was that
isearch *sometimes* unpredictably causes the region to extend when I
expect it to deactivate.

> FWIW, Isearch+ gives you choices in behavior wrt the active region, decided by
> options `isearchp-deactivate-region-flag' and 
> `isearchp-restrict-to-region-flag'.
>
> * Non-nil `isearchp-deactivate-region-flag' means deactivate the region before
>   searching, so you can better see the text etc. If nil, you get the ordinary
>   Isearch behavior: no deactivation.
>
> * Non-nil `isearchp-restrict-to-region-flag' limits searching to the active
>   region.  If nil, you get the ordinary Isearch behavior: no restriction of
>   searching to the region.

Both options are only useful for persistent region. For us CUA types,
isearch should deactivate the region the same as every other point
movement command, *except* if the current region has explicitly been
made persistent by the user invoking set-mark.



reply via email to

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