From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Recentish C-s M-y change Date: Thu, 28 Jan 2021 10:58:50 +0200 Organization: LINKOV.NET Message-ID: <87o8h9h1yo.fsf@mail.linkov.net> References: <87r1na4tyu.fsf@gnus.org> <87tus6tj7s.fsf@mail.linkov.net> <87a6txigm1.fsf@gnus.org> <874kk5lzew.fsf@mail.linkov.net> <87eej8ifll.fsf@mail.linkov.net> <87h7o3k5b5.fsf@mail.linkov.net> <87wnwslhdr.fsf@mail.linkov.net> <87sg74itrx.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="634"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 28 10:24:56 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l53Xq-000AZx-SD for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Jan 2021 10:24:54 +0100 Original-Received: from localhost ([::1]:49774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l53Xp-0007cM-T8 for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Jan 2021 04:24:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l53Wk-0006LZ-4y for emacs-devel@gnu.org; Thu, 28 Jan 2021 04:23:46 -0500 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:41055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l53Wi-0000Hg-99 for emacs-devel@gnu.org; Thu, 28 Jan 2021 04:23:45 -0500 Original-Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id E0B8D200015; Thu, 28 Jan 2021 09:23:40 +0000 (UTC) In-Reply-To: (Gregory Heytings's message of "Wed, 27 Jan 2021 22:01:29 +0000") Received-SPF: pass client-ip=217.70.178.232; envelope-from=juri@linkov.net; helo=relay12.mail.gandi.net X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, GAPPY_SUBJECT=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263542 Archived-At: >> I meant the global C-u M-y. But since its global meaning makes no sense >> in isearch, I added C-s C-u M-y as you suggested. > > Thank you! > > But... could you perhaps also add C-s C-u C-y, as I suggested? If not, why > not? The prefix argument is currently ignored by C-y. The current interface of isearch-yank-kill and isearch-yank-pop corresponds exactly to the global commands yank and yank-pop. So their behaviors are mirrors, but adding C-u to one of them will break consistency, i.e. C-u of yank and isearch-yank-kill would have a completely different meaning. The isearch command currently bound to C-s M-y is a mess for backward-compatibility, so a prefix argument C-u was necessary to add to it as a compromise to support the old behavior and the new feature of M-y. > I believe accessing the new feature with both C-s C-u C-y and C-s C-u M-y > is useful: C-s C-u C-y is useful to immediately enter an interactive > selection (it's convenient because it only uses the control modifier), and > C-s C-y M-y ... C-u M-y is useful to enter an interactive selection while > using the non-interactive selection. BTW, such sequence might not do what you want. I mean that often after typing C-s C-y M-y ... C-u M-y, the second C-u M-y doesn't replace the search string with a string from the kill-ring, it appends it. I don't know if this is ok to simply change the implementation to replace the search string instead of appending, or many users already prefer appending, I have no idea. Maybe to add a new argument to specify whether append or replace? Like the argument C-u of the global command yank defines whether to put point at beginning and mark at end.