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:51:41 -0800 (PST) Message-ID: <21c8d379-ebb5-40e8-84e4-4a61e8ee8c20@default> 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 1389901920 16866 80.91.229.3 (16 Jan 2014 19:52:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2014 19:52:00 +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:52:07 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 1W3syy-0005fg-UB for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 20:52:05 +0100 Original-Received: from localhost ([::1]:34720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3syy-00065a-JU for ged-emacs-devel@m.gmane.org; Thu, 16 Jan 2014 14:52:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3syo-00061E-Jq for emacs-devel@gnu.org; Thu, 16 Jan 2014 14:52:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3syf-0000dD-LA for emacs-devel@gnu.org; Thu, 16 Jan 2014 14:51:54 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:51487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3syf-0000d9-En for emacs-devel@gnu.org; Thu, 16 Jan 2014 14:51:45 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0GJpg0J022826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Jan 2014 19:51:43 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0GJpfU8018667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 16 Jan 2014 19:51:42 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 s0GJpftd009420; Thu, 16 Jan 2014 19:51:41 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: acsinet22.oracle.com [141.146.126.238] 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:168572 Archived-At: > > Yes and no. The region can also be useful to delimit the > > search without narrowing. >=20 > I don't think it's really that useful for occur. I let the user decide. > Occur is usually used to find matches in a larger text. > If you want to limit the search to a smaller region then you > can already use isearch which hihighlights the additional > matches or simply use narrowing. The latter, yes. Isearch is not the same as `occur'. > If a configuration option like this is added then > its default value should be using the active region for > search because in my experience I use it very often and > I only occasionally need to limit the search to a region > which I can already do with narrowing. The same argument could be made for (my) option `search/replace-2nd-sel-as-default-flag', which uses the secondary selection as default. (The default value for both options is nil.) (FWIW, my `grep' code behaves a bit differently. There, a usable region is always used as the default search pattern.)