From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: killing the result of isearch Date: Tue, 7 Nov 2017 07:26:32 -0800 (PST) Message-ID: <4c3d56b0-5151-4244-8b1b-fb4376b4fa88@default> References: <433bd3d0-a506-4d89-9d10-dcbfb0e23be0@default> <852BAA28-2A50-4AD9-B8D6-9F06905A4395@gmail.com> <87r2tava5x.fsf@hornfels.zedat.fu-berlin.de> <87y3nigy86.fsf@hornfels.zedat.fu-berlin.de> <8B436DA2-1C8B-471F-8D90-08C282864A70@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510068459 17374 195.159.176.226 (7 Nov 2017 15:27:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2017 15:27:39 +0000 (UTC) To: Jean-Christophe Helary , Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 07 16:27:35 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC5mp-0004Jz-72 for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Nov 2017 16:27:35 +0100 Original-Received: from localhost ([::1]:53964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5mu-0002Rl-Om for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Nov 2017 10:27:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5lx-0002NU-7N for help-gnu-emacs@gnu.org; Tue, 07 Nov 2017 10:26:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC5ls-00034C-K5 for help-gnu-emacs@gnu.org; Tue, 07 Nov 2017 10:26:41 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:41607) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eC5ls-00033c-BB for help-gnu-emacs@gnu.org; Tue, 07 Nov 2017 10:26:36 -0500 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA7FQXRh031978 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2017 15:26:34 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA7FQXv3001591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2017 15:26:33 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA7FQXs3025934; Tue, 7 Nov 2017 15:26:33 GMT In-Reply-To: <8B436DA2-1C8B-471F-8D90-08C282864A70@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114771 Archived-At: > > So doesn't searching-and-replace with an empty replacement work? >=20 > It works to accomplish the same result but it takes many more step as I > wrote earlier: >=20 > isearch string > isearch-query-replace > (replace with nothing) ... > The problem with emacs and searches, is that you only search, you don't > *find*, as in the action of searching does not result in an object that y= ou > can act upon. Which defeats the purpose of searching. It does result in an object you can act upon, if you want that. Isearch+ gives you that possibility, including the possibility of setting the region on that object. > A simple "search" does nothing but put the point at the end of the match. > it is nice to navigate the document but it does nothing about the match. > isearch is even more treacherous since it makes it look like you are > finding something, when actually you have also just moved the point in th= e > buffer and nothing more. >=20 > A simple "search" should at least be able to create a region on the match= , > it doesn't even do that. Have you actually tried Isearch+? As I mentioned, I think it offers what you're requesting. As for those who propose query-replace as a substitute for acting on search hits during Isearch: * q-r is OK for replacing, but that's the only action it knows * q-r is one-directional, and not embedded in Isearch: The search pattern and replacement patterns are fixed, once and for all. The search-hit replacement (or other action) provided by Isearch+ is on-demand, and you can change what it acts on (search pattern, hence search hits) and the replacement text at any time. Q-r is nice, and it's good you can invoke it from Isearch, but it is not the same thing as on-demand replacement during search.