From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Occur should use the region as input if it's active Date: Thu, 16 Jan 2014 11:36:19 -0800 (PST) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389901001 5543 80.91.229.3 (16 Jan 2014 19:36:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2014 19:36:41 +0000 (UTC) To: Tom , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 16 20:36:47 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W3sk9-0006LK-2l for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 20:36:45 +0100 Original-Received: from localhost ([::1]:34681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3sk8-0001kX-6A for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 14:36:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3sjw-0001jd-Hn for emacs-devel@gnu.org; Thu, 16 Jan 2014 14:36:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3sjn-0004dG-S9 for emacs-devel@gnu.org; Thu, 16 Jan 2014 14:36:32 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:43324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3sjn-0004dA-Lh for emacs-devel@gnu.org; Thu, 16 Jan 2014 14:36:23 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0GJaL9q004583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Jan 2014 19:36:22 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s0GJaK4n018511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 16 Jan 2014 19:36:21 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0GJaKSX000248; Thu, 16 Jan 2014 19:36:20 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168569 Archived-At: > > 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. >=20 > Yes and no. The region can also be useful to delimit the > search without narrowing. >=20 > 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.