unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Tom <adatgyujto@gmail.com>, emacs-devel@gnu.org
Subject: RE: Occur should use the region as input if it's active
Date: Thu, 16 Jan 2014 11:36:19 -0800 (PST)	[thread overview]
Message-ID: <b3b12554-c83a-4f79-bc00-40ad5a7b1732@default> (raw)
In-Reply-To: <a1edd7e4-c492-4a50-b0bd-f1b6004a82d5@default>

> > in my experience most of the occur searches are
> > of these kind (searching for something I see) and it's less
> > often that I actualy need to type in the search term.
> 
> Yes and no.  The region can also be useful to delimit the
> search without narrowing.
> 
> FWIW, in my code, a user option decides this:

I should also have added, with reference to your point about
searching for something you see, that with this option turned
off the default input is the name of the (non-nil) symbol
nearest point.

That, plus the usefulness of using the region to delimit the
search, is the reason that searching for the region text by
default is turned off by default.

In addition, if you use Icicles then you can use `M-.' in the
minibuffer anytime to insert text near point from the buffer.
Repeating `M-.' gives you different "things" from the buffer
or it accumulates successive things of the same type from the
buffer.  So `M-.' gives you a way to pick up more than just
the nearest symbol from the buffer.

All of that confirms that I agree with you that most of the
time one wants to search for text (typically nearby) seen in
the buffer.



  parent reply	other threads:[~2014-01-16 19:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 18:55 Occur should use the region as input if it's active Tom
2014-01-16 19:23 ` Drew Adams
2014-01-16 19:32   ` Tom
2014-01-16 19:51     ` Drew Adams
2014-01-16 19:36   ` Drew Adams [this message]
2014-01-16 20:11     ` Tom
2014-01-17  8:11       ` Juri Linkov
2014-01-17  0:52 ` Tak Kunihiro

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=b3b12554-c83a-4f79-bc00-40ad5a7b1732@default \
    --to=drew.adams@oracle.com \
    --cc=adatgyujto@gmail.com \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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