From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Let's make C-M-w in isearch yank symbol, not delete character Date: Wed, 28 Feb 2018 05:40:05 +0200 Message-ID: <83tvu1zsru.fsf@gnu.org> References: <87po4slrg4.fsf@mail.linkov.net> <831sh82zyf.fsf@gnu.org> <87h8q2w29i.fsf@mail.linkov.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1519789115 7926 195.159.176.226 (28 Feb 2018 03:38:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2018 03:38:35 +0000 (UTC) Cc: dancol@dancol.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 28 04:38:31 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eqsZa-0001UI-B7 for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2018 04:38:30 +0100 Original-Received: from localhost ([::1]:42047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqsbc-0000zo-Nc for ged-emacs-devel@m.gmane.org; Tue, 27 Feb 2018 22:40:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqsb4-0000zQ-Dj for emacs-devel@gnu.org; Tue, 27 Feb 2018 22:40:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqsb0-0007Sc-F0 for emacs-devel@gnu.org; Tue, 27 Feb 2018 22:40:02 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqsb0-0007SU-BC; Tue, 27 Feb 2018 22:39:58 -0500 Original-Received: from [176.228.60.248] (port=2922 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eqsaz-00050T-Jx; Tue, 27 Feb 2018 22:39:58 -0500 In-reply-to: <87h8q2w29i.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 27 Feb 2018 23:28:41 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:223153 Archived-At: > From: Juri Linkov > Cc: dancol@dancol.org, emacs-devel@gnu.org > Date: Tue, 27 Feb 2018 23:28:41 +0200 > > >> Fortunately, it's easy to add support for yanking an expression: > >> in addition to the existing option 'edit' of 'search-exit-option' > >> we can also provide a new option 'move' that will sync the current > >> search string with the new position in the buffer after moving point > >> using all standard motion commands, e.g. `C-f' will add the next char > >> to the end of the search string, `C-M-f' will add the next expression, > >> `M-f' will add the next word, `C-b' will delete text from the end of > >> the search string, etc. Here is the implementation: > > > > Thanks. I think this needs a documentation update as well. > > I updated the documentation in the docstring of search-exit-option below. This should be in NEWS as well. What about the manual? > +(defcustom search-exit-option 'move > + "Defines what control characters do in incremental search. > +If t, random control and meta characters terminate the search > +and are then executed normally. > +If `edit', edit the search string instead of exiting. > +If `move', use motion commands to extend the search string. > +If nil, run the command without exiting Isearch." > + :type '(choice (const :tag "Terminate incremental search" t) > + (const :tag "Edit the search string" edit) > + (const :tag "Extend the search string by motion commands" move) > + (const :tag "Don't terminate incremental search" nil))) Please add a :version tag to this defcustom. Thanks.