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 09:24:51 -0800 (PST) Message-ID: <9848de48-1894-4a0c-99be-de3c4718d6b2@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> <4c3d56b0-5151-4244-8b1b-fb4376b4fa88@default> <92E2F0E3-E2FD-46A7-97C5-292894D08B5C@gmail.com> <87tvy6114b.fsf@ericabrahamsen.net> 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 1510075831 17421 195.159.176.226 (7 Nov 2017 17:30:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2017 17:30:31 +0000 (UTC) To: Eric Abrahamsen , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 07 18:30:25 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 1eC7hb-00042j-Hn for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Nov 2017 18:30:19 +0100 Original-Received: from localhost ([::1]:54719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC7hh-0006SM-7O for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Nov 2017 12:30:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC7ca-00024s-2F for help-gnu-emacs@gnu.org; Tue, 07 Nov 2017 12:25:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC7cU-0005Mp-E0 for help-gnu-emacs@gnu.org; Tue, 07 Nov 2017 12:25:08 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:41275) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eC7cU-0005Ma-7G for help-gnu-emacs@gnu.org; Tue, 07 Nov 2017 12:25:02 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA7HOrxK015727 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2017 17:24:54 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA7HOrMD025444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Nov 2017 17:24:53 GMT Original-Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA7HOqmb011686; Tue, 7 Nov 2017 17:24:53 GMT In-Reply-To: <87tvy6114b.fsf@ericabrahamsen.net> 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: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 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:114786 Archived-At: > Several years ago, when I wanted to do this, I wrote the following: >=20 > (define-key isearch-mode-map (kbd "M-m") 'my-isearch-mark-search-as-regio= n) > (defun my-isearch-mark-search-as-region () > (interactive) > (if (not isearch-mode) > (message "This is only useful during isearch") > (isearch-exit) > (push-mark isearch-other-end) > (activate-mark))) That's essentially the same thing used in Isearch+: (defun isearchp-set-region-around-search-target () "Set the region around the last search or query-replace target." (interactive) (case last-command ((isearch-forward isearch-backward isearch-forward-regexp isearch-backward-regexp) (push-mark isearch-other-end t 'activate)) (t (push-mark (match-beginning 0) t 'activate))) (setq deactivate-mark nil)) > I guess that's just a tiny half-step in the direction that isearch+ is > headed. Isearch+ isn't really headed anywhere. ;-) I just add/change things as they come to me. > Another very good facility to get comfortable with is recursive editing: > type "C-r" during search mode, do whatever editing you like, then > "C-M-c" to go back into search mode. +1 But that's not in vanilla Emacs, AFAIK. (It's certainly not bound to `C-r' by default - `C-r' is ` isearch-repeat-backward'.) With Isearch+, `C-x o' during Isearch opens a recursive edit. And `C-M-c' (`exit-recursive-edit') resumes searching. > I think what people are trying to say is that Emacs' defaults can often > seem lacking, but it makes up for it by giving you enormous power to > create your ideal behavior yourself... I think we all expect that we > need to go the last half-mile ourselves. +1 But sometimes it's not so much that we need to go the last half mile ourselves. Sometimes it's more that we want to go the next N miles, for fun and learning.