unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Increment Search in a Certain Region?
@ 2007-04-04 21:56 Daniel
  2007-04-04 22:46 ` Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel @ 2007-04-04 21:56 UTC (permalink / raw)
  To: help-gnu-emacs

Hi All,

While doing increment search, can we do it in a certain region?

When I do C-s for increment search, it searches whole buffer. What I
want it to search only in a certain region. Can it be possible?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Increment Search in a Certain Region?
  2007-04-04 21:56 Increment Search in a Certain Region? Daniel
@ 2007-04-04 22:46 ` Drew Adams
  2007-04-05  0:25   ` Eric Hanchrow
       [not found]   ` <mailman.1774.1175733718.7795.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2007-04-04 22:46 UTC (permalink / raw)
  To: help-gnu-emacs

> When I do C-s for increment[al] search, it searches whole buffer. What I
> want it to search only in a certain region. Can it be possible?

You can narrow the buffer to the region: `C-x n n', then search: `C-s'. When
you are done, you can widen the buffer: `C-x n w'.

Otherwise, I don't think it's possible to tell `C-s' to limit itself to the
region.

An alternative, which does limit search to the region (if it is active and
non-empty): `C-`' in Icicles:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Search_Enhancements#IciclesS
earchCommands

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Increment Search in a Certain Region?
  2007-04-04 22:46 ` Drew Adams
@ 2007-04-05  0:25   ` Eric Hanchrow
       [not found]   ` <mailman.1774.1175733718.7795.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Hanchrow @ 2007-04-05  0:25 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "Drew" == Drew Adams <drew.adams@oracle.com> writes:

    Drew> You can narrow the buffer to the region: `C-x n n', then
    Drew> search: `C-s'.  When you are done, you can widen the buffer:
    Drew> `C-x n w'.

    Drew> Otherwise, I don't think it's possible to tell `C-s' to
    Drew> limit itself to the region.

Au contraire!  Quoth (info "(emacs)Replace"):

    The replace commands normally operate on the text from point to
    the end of the buffer; however, in Transient Mark mode (*note
    Transient Mark::), when the mark is active, they operate on the
    region.
-- 
I'd like to see Rush Limbaugh tell Omar he can't get
married.
        --Alex Kotlowitz.  You hadda be there

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Increment Search in a Certain Region?
       [not found]   ` <mailman.1774.1175733718.7795.help-gnu-emacs@gnu.org>
@ 2007-04-05  7:28     ` Joost Kremers
  2007-04-05 17:07       ` Eric Hanchrow
  0 siblings, 1 reply; 5+ messages in thread
From: Joost Kremers @ 2007-04-05  7:28 UTC (permalink / raw)
  To: help-gnu-emacs

Eric Hanchrow wrote:
>>>>>> "Drew" == Drew Adams <drew.adams@oracle.com> writes:
>    Drew> Otherwise, I don't think it's possible to tell `C-s' to
>    Drew> limit itself to the region.
>
> Au contraire!  Quoth (info "(emacs)Replace"):
>
>     The replace commands normally operate on the text from point to
>     the end of the buffer; however, in Transient Mark mode (*note
>     Transient Mark::), when the mark is active, they operate on the
>     region.

have you actually *tried* it? C-s is *not* a replace command, but an
incremental search, which is quite a different beast. you'll notice, for
example, that the incremental search commands are *not* discussed in the
section that you got this quote from.

setting a mark in transient mark mode and subsequently entering an
incremental search just moves point, keeping the region active. the search
is not limited to the region, however.

-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Increment Search in a Certain Region?
  2007-04-05  7:28     ` Joost Kremers
@ 2007-04-05 17:07       ` Eric Hanchrow
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Hanchrow @ 2007-04-05 17:07 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "Joost" == Joost Kremers <joostkremers@yahoo.com> writes:

    Joost> have you actually *tried* it?  

Oops.  Didn't read closely enough.

-- 
I'd like to see Rush Limbaugh tell Omar he can't get
married.
        --Alex Kotlowitz.  You hadda be there

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-05 17:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-04 21:56 Increment Search in a Certain Region? Daniel
2007-04-04 22:46 ` Drew Adams
2007-04-05  0:25   ` Eric Hanchrow
     [not found]   ` <mailman.1774.1175733718.7795.help-gnu-emacs@gnu.org>
2007-04-05  7:28     ` Joost Kremers
2007-04-05 17:07       ` Eric Hanchrow

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).