From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Let's make C-M-w in isearch yank symbol, not delete character Date: Sat, 10 Mar 2018 23:15:19 +0200 Organization: LINKOV.NET Message-ID: <87ina3zl7c.fsf@mail.linkov.net> References: <87po4slrg4.fsf@mail.linkov.net> <831sh82zyf.fsf@gnu.org> <87h8q2w29i.fsf@mail.linkov.net> <83tvu1zsru.fsf@gnu.org> <87tvtzjvh4.fsf@mail.linkov.net> <83tvtyx55a.fsf@gnu.org> <87efl0pz4d.fsf@mail.linkov.net> <83o9k3u9ku.fsf@gnu.org> <87371f34m6.fsf@mail.linkov.net> <83bmg3tczk.fsf@gnu.org> <83606atswi.fsf@gnu.org> <87d10i8bal.fsf@mail.linkov.net> <83ina9sx0o.fsf@gnu.org> <878tb4vowd.fsf@mail.linkov.net> <87tvtn3hkm.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520717337 13097 195.159.176.226 (10 Mar 2018 21:28:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Mar 2018 21:28:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , emacs-devel@gnu.org To: John Shahid Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 10 22:28:52 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 1eum2t-0003Kv-UD for ged-emacs-devel@m.gmane.org; Sat, 10 Mar 2018 22:28:52 +0100 Original-Received: from localhost ([::1]:52004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eum4w-0008Po-II for ged-emacs-devel@m.gmane.org; Sat, 10 Mar 2018 16:30:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eulx9-0002T7-AH for emacs-devel@gnu.org; Sat, 10 Mar 2018 16:22:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eulx8-0003Mn-8g for emacs-devel@gnu.org; Sat, 10 Mar 2018 16:22:55 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:34824 helo=homiemail-a15.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eulx4-0003LF-Dg; Sat, 10 Mar 2018 16:22:50 -0500 Original-Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id 10C0776C065; Sat, 10 Mar 2018 13:22:48 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPSA id 0C70476C069; Sat, 10 Mar 2018 13:22:46 -0800 (PST) In-Reply-To: <87tvtn3hkm.fsf@gmail.com> (John Shahid's message of "Sat, 10 Mar 2018 13:34:49 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 69.163.253.7 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:223599 Archived-At: > Does it make sense to set the `isearch-move' property on some common > forward commands, e.g. `forward-char', `forward-symbol' & > `forward-word'. I just compiled and tried the latest master to test this > feature and it wasn't immediately obvious that I had to set the property > for those commands. I was confused because I expected the built-in > functions to work out of the box with this new feature. Maybe better to put the `isearch-move' property on the common commands only when you customize `search-exit-option' to `move' like in this patch: diff --git a/lisp/isearch.el b/lisp/isearch.el index 4f5f494..c0f9025 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -86,6 +86,14 @@ search-exit-option (const :tag "Extend the search string by shifted motion keys" shift-move) (const :tag "Append control characters to the search string" append) (const :tag "Don't terminate incremental search" nil)) + :set #'(lambda (sym val) + (when (eq val 'move) + (dolist (sym '(right-char right-word forward-char forward-word + forward-symbol forward-sexp next-line move-end-of-line + left-char left-word backward-char backward-word + backward-symbol backward-sexp previous-line)) + (put sym 'isearch-move t))) + (set-default sym val)) :version "27.1") (defcustom search-slow-window-lines 1