unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Barry Margolin <barmar@alum.mit.edu>, help-gnu-emacs@gnu.org
Subject: RE: automatic selection during search
Date: Thu, 26 Sep 2013 08:43:19 -0700 (PDT)	[thread overview]
Message-ID: <67ac7987-7f15-4603-a34f-7e5dbc366265@default> (raw)
In-Reply-To: <<barmar-A2B1E2.10465526092013@news.eternal-september.org>>

> > > But, the same behaviour is also shown in emacs -Q: When something is
> > > selected and the point is inside this selection and you start isearch,
> > > then the selection is automatically extended. I could imagine that an
> > > isearch hook could help which first switches off the selection…
> >
> > Yes, (add-hook 'isearch-mode-hook 'deactivate-mark) seems to do the trick.
> 
> That will break the common sequence C-@ C-s which *should* mark the
> region from where you started to where the search completes.

Yes.

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.

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.

Isearch+ is here (and on MELPA):
 Code:        http://www.emacswiki.org/emacs-en/download/isearch%2b.el
 Description: http://www.emacswiki.org/IsearchPlus



  parent reply	other threads:[~2013-09-26 15:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25  6:38 automatic selection during search Bostjan Vilfan
2013-09-25 14:52 ` Peter Dyballa
2013-09-25 15:22   ` Drew Adams
2013-09-26  3:51   ` Yuri Khan
2013-09-26  8:38     ` Peter Dyballa
2013-09-26  9:08       ` Tassilo Horn
     [not found]       ` <mailman.2906.1380186548.10748.help-gnu-emacs@gnu.org>
2013-09-26 14:46         ` Barry Margolin
     [not found]           ` <mailman.2924.1380210221.10748.help-gnu-emacs@gnu.org>
2013-09-26 17:17             ` Barry Margolin
     [not found]               ` <mailman.2941.1380216751.10748.help-gnu-emacs@gnu.org>
2013-09-26 18:53                 ` Barry Margolin
     [not found]             ` <<barmar-B00378.13172226092013@news.eternal-september.org>
2013-09-26 17:32               ` Drew Adams
2013-09-26 18:44           ` Peter Dyballa
     [not found]         ` <<barmar-A2B1E2.10465526092013@news.eternal-september.org>
2013-09-26 15:43           ` Drew Adams [this message]
2013-09-26 16:01             ` Yuri Khan
2013-09-26 17:27               ` Stefan Monnier
     [not found]   ` <mailman.2894.1380167482.10748.help-gnu-emacs@gnu.org>
2013-09-30 19:59     ` Kai Grossjohann
2013-09-30 20:05       ` Barry Margolin
2013-10-01  3:56         ` Yuri Khan
2013-10-01 12:47           ` Stefan Monnier
2013-09-25 15:40 ` Eli Zaretskii
     [not found] ` <mailman.2858.1380123666.10748.help-gnu-emacs@gnu.org>
2013-09-25 15:51   ` Barry Margolin
     [not found] <<CAAm34zryY6rrua7nQGHXAgHvofjTkOob9Eet9t9LcJ=Xw2bZ5A@mail.gmail.com>
     [not found] ` <<83a9j0hptk.fsf@gnu.org>
2013-09-25 16:25   ` Drew Adams
     [not found] <mailman.2845.1380113901.10748.help-gnu-emacs@gnu.org>
2013-09-27  6:26 ` bjvilfan
2013-09-27 15:20   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67ac7987-7f15-4603-a34f-7e5dbc366265@default \
    --to=drew.adams@oracle.com \
    --cc=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).