unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: charles@aurox.ch (Charles A. Roelli)
To: help-gnu-emacs@gnu.org
Subject: Re: killing the result of isearch
Date: Sat, 11 Nov 2017 16:36:39 +0100	[thread overview]
Message-ID: <m2o9o8q12w.fsf@aurox.ch> (raw)
In-Reply-To: <868tfganmj.fsf@zoho.com> (message from Emanuel Berg on Wed, 08 Nov 2017 14:47:16 +0100)

> From: Emanuel Berg <moasen@zoho.com>
> Date: Wed, 08 Nov 2017 14:47:16 +0100
> 
> It is called searching but many times what
> happens is it is a form of navigation - a goto
> in the text buffer, if you will.
> 
> Because I do this all the time, like one of the
> most common ways to position point, I get
> totally stressed out by the default
> "incremental" search.
> 
> Here is some code if anyone else is like me and
> hasn't got his own file already
> 
>     http://user.it.uu.se/~embe8573/emacs-init/wrap-search.el

I was also looking for a less nervous way to search through a buffer
recently, and I found that the "/" command in view-mode fits the bill
exactly.  You hit "/ foo RET", and you are brought to the next match
for "foo", starting from the bottom of the window.  You can hit "n"
and "p" to go forward and backward between matches.  What's useful is
the omission of some information when you navigate between matches --
only one match per screenful is highlighted, and when you hit "n" or
"p" the next time, the search starts from the end or start of the
window, respectively.  It's useful for getting a rough idea of the
matches for a regexp, without actually cycling through all the matches
with C-s.  And if you need a more fine-grained search, "s" and "r" are
bound to isearch-forward and isearch-backward.

"/" also comes with some other goodies, see:

  / runs the command View-search-regexp-forward (found in
  view-mode-map), which is an interactive compiled Lisp function in
  ‘view.el’.

  It is bound to /.

  (View-search-regexp-forward N REGEXP)

  Search forward for first (or prefix Nth) occurrence of REGEXP in View mode.

  Displays line found at center of window.  Sets mark at starting position and
  pushes mark ring.

  Characters @ and ! are special at the beginning of REGEXP.  They modify
  the search rather than become part of the pattern searched for.
  @ means search all the buffer i.e. start search at the beginning of buffer.
  ! means search for a line that contains no match for the pattern.
  If REGEXP is empty or only consist of these control characters, then
  an earlier remembered REGEXP is used, otherwise REGEXP is remembered
  for use by later search commands.



  reply	other threads:[~2017-11-11 15:36 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07  2:41 killing the result of isearch Jean-Christophe Helary
2017-11-07  5:34 ` Drew Adams
2017-11-07  6:01   ` Jean-Christophe Helary
2017-11-07  6:25     ` Søren Pilgård
     [not found]     ` <mailman.3103.1510035932.27995.help-gnu-emacs@gnu.org>
2017-11-07  7:07       ` Loris Bennett
2017-11-07  7:49         ` Jean-Christophe Helary
2017-11-07  8:43         ` Jean-Christophe Helary
     [not found]         ` <mailman.3106.1510044223.27995.help-gnu-emacs@gnu.org>
2017-11-07 10:49           ` Loris Bennett
2017-11-07 12:45             ` Jean-Christophe Helary
2017-11-07 15:26               ` Drew Adams
2017-11-07 15:51                 ` Jean-Christophe Helary
2017-11-07 16:46                   ` Drew Adams
2017-11-07 22:38                     ` Jean-Christophe Helary
2017-11-07 16:53                   ` Eric Abrahamsen
2017-11-07 17:24                     ` Drew Adams
2017-11-07 17:45                       ` Eric Abrahamsen
2017-11-08  8:21               ` Thien-Thi Nguyen
2017-11-08 13:47                 ` Emanuel Berg
2017-11-11 15:36                   ` Charles A. Roelli [this message]
     [not found]             ` <mailman.3114.1510058721.27995.help-gnu-emacs@gnu.org>
2017-11-07 15:08               ` Loris Bennett
2017-11-07 15:28                 ` Jean-Christophe Helary
2017-11-07 16:24                   ` Drew Adams
2017-11-07 22:34                     ` Jean-Christophe Helary
2017-11-07 22:54                       ` Drew Adams
2017-11-08 22:24                   ` Tomas Nordin
2017-11-08 22:44                     ` Jean-Christophe Helary
2017-11-08 23:07                       ` Emanuel Berg
2017-11-09 21:38                       ` Tomas Nordin
2017-11-10 13:11                         ` Jean-Christophe Helary
2017-11-10 16:54                           ` Drew Adams
2017-11-07  8:31     ` Marcin Borkowski
2017-11-07 15:26     ` Drew Adams
2017-11-07 20:59     ` Bob Proulx
2017-11-07 22:10       ` Drew Adams
2017-11-07 22:53         ` Bob Proulx
2017-11-07 23:15       ` Jean-Christophe Helary
2017-11-08  4:27         ` Bob Proulx
2017-11-08  5:29           ` Jean-Christophe Helary
2017-11-08 18:50             ` Bob Proulx
2017-11-07 17:53 ` Stefan Monnier
2017-11-07 22:59   ` Jean-Christophe Helary
2017-11-12 20:02     ` Tomas Nordin
2017-11-12 22:13       ` Emanuel Berg
2017-11-13 21:17         ` Tomas Nordin
2017-11-13 22:13           ` Emanuel Berg
2017-11-20  3:24           ` Emanuel Berg
2017-11-15 14:48       ` Emanuel Berg

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=m2o9o8q12w.fsf@aurox.ch \
    --to=charles@aurox.ch \
    --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).