From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Shahid Newsgroups: gmane.emacs.devel Subject: Re: Let's make C-M-w in isearch yank symbol, not delete character Date: Mon, 12 Mar 2018 13:38:52 -0400 Message-ID: <87bmftkxcj.fsf@gmail.com> 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> <87ina3zl7c.fsf@mail.linkov.net> <87bmfup9dx.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520877337 8351 195.159.176.226 (12 Mar 2018 17:55:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2018 17:55:37 +0000 (UTC) User-Agent: mu4e 1.0-alpha3; emacs 27.0.50 Cc: Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 12 18:55:33 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 1evRfU-0001t3-3w for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2018 18:55:28 +0100 Original-Received: from localhost ([::1]:33618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evRhU-0005Ia-UW for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2018 13:57:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evRPc-00071t-OE for emacs-devel@gnu.org; Mon, 12 Mar 2018 13:39:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evRPX-0001u7-Ru for emacs-devel@gnu.org; Mon, 12 Mar 2018 13:39:04 -0400 Original-Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:36251) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evRPX-0001tj-Ne for emacs-devel@gnu.org; Mon, 12 Mar 2018 13:38:59 -0400 Original-Received: by mail-qk0-x22c.google.com with SMTP id d206so12343935qkb.3 for ; Mon, 12 Mar 2018 10:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Uvnv02KhHzKXG7NwV5DLU0PEVYx1EoNYXNl4O0dX9Hc=; b=addIhsol+7qw6DX0hb+KX8sJSUkjng1WdE87zVFBf2GLYK0QVb/Y9DBRfsbahn7YnR 66/1vxjz+21iRap7EQfvooJtCjzDGJMzwBDZPXK2Whcz6I1X+Q2kTQeYlJAJMk7spXdJ J1z2LRCeRsYgPS0MQfV2uZiadLb1JlMFneyORfgCUiIFjrjGtXEhE+EylFELkBQurP0A xJCXQn5yPprjpZQLR+l0T7OSxh8p8D/Rf+xG7f+Une3y0oorUvco0LNKnzvAoLrwq4QD KoB27t6qoM02jn/x82GUXj4dZHwVNtE6k2G8v7JZ+3g1h0UbchVIZapq0o9cKBhEijSa 0HIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Uvnv02KhHzKXG7NwV5DLU0PEVYx1EoNYXNl4O0dX9Hc=; b=mIznUStj8oCpJZWdTFzpRf6L/ko/ml56yQIsTiMx+7hlVopCIcJQzs+DNnBAIe87/S rmNH+6H+zlr2cAkqaojY4vXUrjuQEhcH0QRPamsh4bBIpyM6LbYrdD0Lp4txjiyspa2W vMAQS5cJvTFZF+KBnK9PVCcmMqZT3KJ2SpW5FKA4Po4A+6jaqeWvkMlIvh13hBBa6Qdz NvcFvT6gtEHmKWH/YMJQe3D33PfeGZtYy4vkGM20HE9H6vobxMazJ6HC9Dy4vaXAsV9b nZ9shqMzgG1+0PDCIj7MzyOubMJgiDyDMLOeE4mtTv9gjWBFxUMJTlnhcoH0D9WLv5+9 JtHw== X-Gm-Message-State: AElRT7Gg9w+caseriayWfGuw5DG26l3kdVhOiLZxQZKeF/QGWDTb5g5A utNj1s3rsYYh/O4paQzwGgjkLnrn X-Google-Smtp-Source: AG47ELsngAS+B7MWAkgqq6VOCZs7vK6L/4IanovyDn6DXmB5JH9EuQyLQLQ9fJWJqf8uSYt+zhQEww== X-Received: by 10.55.157.195 with SMTP id g186mr4244530qke.80.1520876338624; Mon, 12 Mar 2018 10:38:58 -0700 (PDT) Original-Received: from amun (cpe-184-152-54-116.nyc.res.rr.com. [184.152.54.116]) by smtp.gmail.com with ESMTPSA id w201sm5371991qkb.52.2018.03.12.10.38.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 10:38:57 -0700 (PDT) In-reply-to: <87bmfup9dx.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22c 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:223650 Archived-At: +1 Juri Linkov writes: >> Why only set those properties in the :setter rather tan just do it at >> top-level? Also, would it be possible to avoid having to list those >> commands and instead treat as `isearch-move` any command which uses the >> handle-shift-selection? > > Supporting only commands which use the handle-shift-selection > makes the most sense. I tested this to confirm it works as expected: > > diff --git a/lisp/isearch.el b/lisp/isearch.el > index 84b121a..245bf8a 100644 > --- a/lisp/isearch.el > +++ b/lisp/isearch.el > @@ -2433,8 +2448,8 @@ isearch-pre-command-hook > (setq this-command 'isearch-edit-string)) > ;; Don't terminate the search for motion commands. > ((or (and (eq search-exit-option 'move) > - (symbolp this-command) > - (eq (get this-command 'isearch-move) t)) > + (stringp (nth 1 (interactive-form this-command))) > + (string-match-p "^^" (nth 1 (interactive-form this-command)))) > (and (eq search-exit-option 'shift-move) > this-command-keys-shift-translated)) > (setq this-command-keys-shift-translated nil)