From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eshel Yaron via "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Sat, 02 Dec 2023 14:02:52 +0100
Message-ID: <m1a5qs21vn.fsf@dazzs-mbp.home>
References: <87il7ib6cu.fsf@posteo.net> <875y3386ep.fsf@posteo.net>
 <87a5sddh14.fsf@web.de> <8734y5vnj7.fsf@posteo.net>
 <87bkcslr18.fsf@web.de> <87y1fwtyrl.fsf@posteo.net>
 <87y1fut1wp.fsf@web.de> <87ttqgpjiz.fsf@posteo.net>
 <87wmvbibpr.fsf@web.de> <877cnb2n63.fsf@posteo.net>
 <8734xyc8z0.fsf@web.de> <87zg05rewi.fsf@posteo.net>
 <87ttqcg8gw.fsf@web.de> <87h6mcr8ol.fsf@posteo.net>
 <87r0l73029.fsf@web.de> <877cmdx8ud.fsf@posteo.net>
 <87v89hufbw.fsf@gnu.org> <87zfytdj86.fsf@posteo.net>
 <87plzo3n5o.fsf@bzg.fr> <87ttp0es35.fsf@posteo.net>
 <87msusepvv.fsf@posteo.net>
Reply-To: Eshel Yaron <me@eshelyaron.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="34244"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cc: jonas@bernoul.li, Michael Heerdegen <michael_heerdegen@web.de>,
 Bastien Guerry <bzg@gnu.org>, stefankangas@gmail.com, 66394@debbugs.gnu.org,
 monnier@iro.umontreal.ca
To: Thierry Volpiatto <thievol@posteo.net>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 02 14:04:25 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1r9PfV-0008gF-3r
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Dec 2023 14:04:25 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1r9Pf7-0007Fe-T2; Sat, 02 Dec 2023 08:04:01 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r9Pf6-0007F4-Gq
 for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2023 08:04:00 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r9Pez-0000mx-AK
 for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2023 08:04:00 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r9Pf7-0006bQ-Ip
 for bug-gnu-emacs@gnu.org; Sat, 02 Dec 2023 08:04:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Eshel Yaron <me@eshelyaron.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 02 Dec 2023 13:04:01 +0000
Resent-Message-ID: <handler.66394.B66394.170152218725315@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 66394
X-GNU-PR-Package: emacs
Original-Received: via spool by 66394-submit@debbugs.gnu.org id=B66394.170152218725315
 (code B ref 66394); Sat, 02 Dec 2023 13:04:01 +0000
Original-Received: (at 66394) by debbugs.gnu.org; 2 Dec 2023 13:03:07 +0000
Original-Received: from localhost ([127.0.0.1]:56878 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1r9PeF-0006aF-4m
 for submit@debbugs.gnu.org; Sat, 02 Dec 2023 08:03:07 -0500
Original-Received: from mail.eshelyaron.com ([107.175.124.16]:33666 helo=eshelyaron.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@eshelyaron.com>) id 1r9PeD-0006a7-CS
 for 66394@debbugs.gnu.org; Sat, 02 Dec 2023 08:03:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com;
 s=mail; t=1701522175;
 bh=S6ffT0gH7rQxnEchSR60j/xURQLayaRPvwmrC7/65Cg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=E6BgONpubtueFF0TeHGjpMBXwSUmB6Z+doUaIX4E9dftyP2GX1Ye5sOsujJPkl6Ds
 pxwq037vhWGZVzAGsxNX0RYCO9XvyCfhtwUdYLD10Gr6SLV+EY4oL8tgZcnF2iJhVn
 Uh4e1fnF779kcxpSHoMJ33CKgcIFYew6jA2JEtAQFXteQnM/Y8aIgTN93SOYv7fOdz
 jvxy6hKUPW16/NPbeDqoky2TdTTE5RZGk1ZMPdOiJ+YPD2VV6Qkd5qDJnAQSauqTal
 M/k8GnEtW7MmqP2lB4BdkNxSjRhFFt5lcZgODfKuzGRsRgVcLFuO3Yy3MmAIZ86+ea
 YYk5xk+8YZygg==
In-Reply-To: <87msusepvv.fsf@posteo.net> (Thierry Volpiatto's message of "Sat, 
 02 Dec 2023 12:43:32 +0000")
X-Hashcash: 1:20:231202:thievol@posteo.net::J9xRit3Qr/SJN9m/:1LwS
X-Hashcash: 1:20:231202:bzg@gnu.org::/4WNT2EEYXTnZV2y:Uok
X-Hashcash: 1:20:231202:michael_heerdegen@web.de::qzvfilRJow2A6lRc:iVS
X-Hashcash: 1:20:231202:jonas@bernoul.li::iG5p378sE75vVymM:2iZJ
X-Hashcash: 1:20:231202:stefankangas@gmail.com::QC7pVY7F2a/mjqsj:2nZv
X-Hashcash: 1:20:231202:monnier@iro.umontreal.ca::TxxWkng4C09ngEBj:3sPS
X-Hashcash: 1:20:231202:66394@debbugs.gnu.org::iiaC0yZhazuTyqFz:AvyU
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.bugs:275375
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/275375>

Thierry Volpiatto <thievol@posteo.net> writes:

> Thierry Volpiatto <thievol@posteo.net> writes:
>
>> Hi Bastien and Eshel,
>>
>> I see, you want to go fast.

Thanks, but this not only about speed.
Using a minibuffer to read a key has other disadvantages: it limits
the range of keys that can be easily used as registers since now
specifying the `C-a` register is much harder (as Michael mentioned).
This also makes register commands less convenient or and even
impossible (when `enable-recursive-minibuffers` is nil) to use inside
an existing minibuffer.

>> Using read-key+minibuffer, as I said would be a pain to implement,
>> hopefully (IIUC) we can use only minibuffer and exit immediately and it
>> is simple to implement (3 lines):
>>
>> 1) Set register-use-preview to nil.

Hmm, but this disables the automatic register preview, which I still want
to see, preferably after a short delay, just like before.

>> 2) Apply this patch on register.el:
>> ...
>>
>> Let me know if this is acceptable for you.
>
> Even better is this patch which ask for confirmation when overwriting a
> register but not when jumping, inserting or setting a new register:
>
> ...

That's improves things a bit, but see above.  I can see how confirmation
could be helpful for some people, but not everyone would appreciate the
added friction.  I basically suggest reverting to the previous behavior
(or otherwise restoring full compatibility), and making any involvement
of the minibuffer in reading registers optional, for example by
providing a new user option `register-read-from-minibuffer`.


Best,

Eshel