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: Sun, 04 Mar 2018 23:36:33 +0200 Organization: LINKOV.NET Message-ID: <87371f34m6.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1520200970 15387 195.159.176.226 (4 Mar 2018 22:02:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Mar 2018 22:02:50 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 04 23:02:46 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 1esbiO-0003CB-SF for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2018 23:02:44 +0100 Original-Received: from localhost ([::1]:46254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esbkR-000885-Hr for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2018 17:04:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esbi5-0006wg-5r for emacs-devel@gnu.org; Sun, 04 Mar 2018 17:02:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esbi4-0006su-0a for emacs-devel@gnu.org; Sun, 04 Mar 2018 17:02:25 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:35770 helo=homiemail-a75.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1esbhy-0006pt-B1; Sun, 04 Mar 2018 17:02:18 -0500 Original-Received: from homiemail-a75.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTP id 703D85EC07F; Sun, 4 Mar 2018 14:02:16 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-97-206.cust.tele2.ee [91.129.97.206]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 951885EC07C; Sun, 4 Mar 2018 14:02:15 -0800 (PST) In-Reply-To: <83o9k3u9ku.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 04 Mar 2018 17:47:13 +0200") X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [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:223269 Archived-At: >> "However, if you customize the variable =E2=80=98search-exit-option=E2= =80=99 to =E2=80=98nil=E2=80=99, >> the characters which you type that are not interpreted by the >> incremental search are simply appended to the search string. This i= s >> so you could include in the search string control characters, such a= s >> =E2=80=98C-a=E2=80=99, that would normally exit the search and invok= e the command >> bound to them on the buffer." >> >> But the comment in isearch-pre-command-hook says: >> >> ;; If search-exit-option is nil, run the command without exiting Ise= arch. >> >> So it's not clear what it should do for e.g. motion commands: >> just move point without exiting Isearch or append control characters >> of motion keys to the search string? > > Typing "C-s foo C-a" produces "foo^A" in the search string here, so I > think the manual is accurate, whereas the comment is wrong. Are you > saying that you don't see control characters being appended literally, > under this option? But point jumps to the beginning of the line, so the comment is correct as well: it runs the command without exiting Isearch, indeed. So actually it does both: appends control characters and runs the command, and doing both makes no sense. Then maybe we should create two separate options for search-exit-option: one to run the command and another to append control characters. But still it's unclear how to append control characters from such commands as e.g. bound to =E2=80=98right-char=E2=80=99, or =E2=80=98M-f=E2=80=99 bound to = =E2=80=98forward-word=E2=80=99. When typing them with search-exit-option customized to nil, I see such errors in *Messages= * Error in pre-command-hook (isearch-pre-command-hook): (wrong-type-argument characterp right) Error in pre-command-hook (isearch-pre-command-hook): (wrong-type-argument characterp 134217830)