From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Thierry Volpiatto <thievol@posteo.net>
Newsgroups: gmane.emacs.bugs
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Thu, 21 Dec 2023 18:04:02 +0000
Message-ID: <87edff3019.fsf@posteo.net>
References: <87il7ib6cu.fsf@posteo.net> <871qbsk5le.fsf@posteo.net>
 <f7f749d1-3a2d-0ea0-a106-6c586f4faca7@gutov.dev>
 <87v894hr2e.fsf@posteo.net> <87cyvbepi0.fsf@posteo.net>
 <87bkavk9nv.fsf@posteo.net>
 <8eebbb30-9366-e869-a39a-8100638cb99a@gutov.dev>
 <87o7etgxeb.fsf@posteo.net> <83v891qlcn.fsf@gnu.org>
 <jwvfs04hjm9.fsf-monnier+emacs@gnu.org>
 <CADwFkmm3H9+-nrYi0JQM9YT0_ZYU3SYvcqfmEnEpJWWaZzHTGQ@mail.gmail.com>
 <87r0jn4j8i.fsf@posteo.net> <jwv8r5vfqo6.fsf-monnier+emacs@gnu.org>
 <87jzpf48k5.fsf@posteo.net> <jwvplz73vpg.fsf-monnier+emacs@gnu.org>
 <87plz6xp3m.fsf@posteo.net> <jwvzfya2mk9.fsf-monnier+emacs@gnu.org>
 <8734vym6ok.fsf@posteo.net> <83ttodgjtk.fsf@gnu.org>
 <87cyv0hjp9.fsf@posteo.net> <83wmt7g4k8.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="31639"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: michael_heerdegen@web.de, dmitry@gutov.dev, 66394@debbugs.gnu.org,
 monnier@iro.umontreal.ca, stefankangas@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 21 19:05:26 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 1rGNQE-0007y0-0G
	for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Dec 2023 19:05:26 +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 1rGNPn-0000cK-GR; Thu, 21 Dec 2023 13:04:59 -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 1rGNPm-0000bt-5p
 for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:04:58 -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 1rGNPl-0002A5-Sh
 for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:04:57 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rGNPp-0007OL-KB
 for bug-gnu-emacs@gnu.org; Thu, 21 Dec 2023 13:05:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Thierry Volpiatto <thievol@posteo.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 21 Dec 2023 18:05:01 +0000
Resent-Message-ID: <handler.66394.B66394.170318186528367@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.170318186528367
 (code B ref 66394); Thu, 21 Dec 2023 18:05:01 +0000
Original-Received: (at 66394) by debbugs.gnu.org; 21 Dec 2023 18:04:25 +0000
Original-Received: from localhost ([127.0.0.1]:45387 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rGNPE-0007NS-D6
 for submit@debbugs.gnu.org; Thu, 21 Dec 2023 13:04:24 -0500
Original-Received: from mout01.posteo.de ([185.67.36.65]:47185)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <thievol@posteo.net>) id 1rGNPB-0007NC-80
 for 66394@debbugs.gnu.org; Thu, 21 Dec 2023 13:04:22 -0500
Original-Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id B800A240027
 for <66394@debbugs.gnu.org>; Thu, 21 Dec 2023 19:04:10 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1703181850; bh=jNKPKaajBC63Kru0XPjz7/A+XKzCVRCq4gDpcANnDWM=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Autocrypt:OpenPGP:
 From;
 b=Ll2lLO9gXbHvTf/FzVciO5qXyxEPWqzC/NhyyttbUUyTHsqC+sNub/FPAKmP0Z/le
 l0eBX0h2TB8Bx4KlB3Sw+d0F5PTO7EtumipTIsF1zaNxGVMk7ehutVABoLb37Q6b5k
 fnwsrTFGoVMKtvKSSfK+Pi6EYdPMrt+J32BQKz9LISc/WGWP99yeT50qHSSfnrRHW+
 gYUrYW9nPVaQiwQkByCbmFf8SL8VawqwNfCoySbnK7hlUt8HzSu1BfffOS+FQvdepf
 pWIFlZQ8+sMhfo0FTt8GUou+yI233yoU1R8AK09HUozv0QDUJ9WpzgFCiZoLPLvyKy
 Rpk4CpSbaXW6A==
Original-Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Swyx45bMKz6tsg;
 Thu, 21 Dec 2023 19:04:08 +0100 (CET)
In-Reply-To: <83wmt7g4k8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Dec
 2023 13:47:51 +0200 (5 hours, 29 minutes, 29 seconds ago)")
Autocrypt: addr=thievol@posteo.net; prefer-encrypt=mutual;
 keydata=xsDNBF8ylcIBDADG+hy+zR6L4/vbdDDZuSaMmSrU3A5QZJpeBCvxTr7MpzzruZbhLPW1K3R6N2MA
 edi8Y+C8o27FVRIjpdbaKMGu9je7JV/TbUQYo3SOwCK1vM4LUn4V6ZLzSYkuiEt4eyMoiDdyvN0p
 kcK6P9x9DCetcEVszXzQg+yzCVrQ2hXWDXWT4M18EC3wtO7RHPouMqGiwBFhBAYErCqFWFxQHkfb
 tG/4yGyJ58rglb65O3qijjMWvYwcWZun9/7qm8Z4/4mHopmo2zgU+OrptnLSZfkZGz3Y7Uf452xQ
 GVq0Fv75NPvQru7y+DYVhuVXXyAmGxt+vf4rIiixMBbhKEPjcxEPAa2LTzex2IsTZR+QVG9uDnqC
 WcgaOEQ58fzXNvNhtwwF/Rgio2XWAJVdmFWS59/k9W58CIUSNKBMZh2XeGdEmtHvDtCxW3z6FJha
 36RzOM3fMNNiAGdFZJA84gcdloJR+sHCDTTPT3784fjr+V8An7sI581NGFzkRQqPvEQCZbUAEQEA
 Ac0SdGhpZXZvbEBwb3N0ZW8ubmV0wsEOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA
 FiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmL3HCoACgkQDsVtFB0W75OVEAv/f6XxmtIFz08fUb8h
 Bp/zJP6IC4/rhhh+0GMRIRzLN8DK0jV8JCzYdFHiRJOy2lNIOpmrrCmjRRxferc2G42+ePFIsslx
 hU46VSz1Z83NwIG3mpdYNV5WUTUdgzxExHTNTFCd7NKv0nlHKQaA 
OpenPGP: url=https://posteo.de/keys/thievol@posteo.net.asc; preference=encrypt
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:276640
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/276640>

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Thierry Volpiatto <thievol@posteo.net>
>> Cc: monnier@iro.umontreal.ca,  stefankangas@gmail.com,  dmitry@gutov.dev,
>>   michael_heerdegen@web.de,  66394@debbugs.gnu.org
>> Date: Wed, 20 Dec 2023 17:23:14 +0000
>>=20
>> >   . I suggest to rename all the "*basic" symbols to "*traditional"
>> >     instead (including such words in some doc strings)
>>=20
>> Ok, done.  Have a look though to verify if docstring is correct.
>>=20
>> >   . I think we need to update the NEWS entry, and in particular
>> >     describe there the two different "styles" of entering the register
>> >     names and the preview modes
>>=20
>> I would prefer you do this, it will be better written.
>>=20
>> > (I'm okay with doing these minor changes myself, once you install the
>> > changes.)
>>=20
>> Ok, now merged, Thanks.
>
> Thanks, I have a question:
>
> The doc string of register-use-preview says:
>
>   This has no effect when the value of `register--read-with-preview-funct=
ion'
>   is `register-read-with-preview-traditional'.
>
> However, customizing register-use-preview to the value 'traditional
> has the exact effect of setting register--read-with-preview-function
> to register-read-with-preview-traditional.  OTOH, when
> register-use-preview is set to 'traditional, one can set it to a
> different value, and then the behavior will change.  So I wonder what
> that sentence is about and what I missed?  Is that perhaps a leftover
> from previous versions, and should now be deleted?

Yes exactly, it can be deleted.

> I updated the documentation and NEWS.  I'd appreciate if you could
> spare a few minutes to review the changes and point out any
> inaccuracies or mistakes.

About the documentation or register-use-preview in the manual:

Another difference with the old behavior (traditional) is that the
preview is filtered according to type of registers used by command.  For
example insert-register show only the registers that can be inserted,
not windows, markers etc... Same for jump.

    -  "Returns a function to format a register for previewing.
    -This according to the value of READ-PREVIEW-FUNCTION.")
    +  "Return a function to format a register for previewing.
    +This is according to the value of `read-preview-function'.")

Here READ-PREVIEW-FUNCTION is the argument of function and not a
variable, so IMO it should be upcased and not quoted.

     (cl-defstruct register-preview-info
       "Store data for a specific register command.
    -TYPES are the types of register supported.
    -MSG is the minibuffer message to send when a register is selected.
    +TYPES are the supported types of registers.
    +MSG is the minibuffer message to show when a register is selected.
     ACT is the type of action the command is doing on register.
    -SMATCH accept a boolean value to say if command accept non matching re=
gister."
    +SMATCH accept a boolean value to say if the command accepts non-matchi=
ng
    +registers."
       types msg act smatch noconfirm)

NOCONFIRM is not documented (my fault).
When set to nil don't request confirmation with RET.

Otherwise all looks good to me, thanks.

=2D-=20
Thierry

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmWEfhITHHRoaWV2b2xA
cG9zdGVvLm5ldAAKCRAOxW0UHRbvk/gOC/9tYyotKuW1Dv2MdVBWbdBbOC53NT3e
uXgTQvlz15PLpSR2AxnbyyT1RGCGYRUQAGBHeiPfEkctxnD1BuPqq7yzF9D4B7wf
uGr8ur3euoexZ5gI66bHvTmYVaryeYT88L5nMB8/QnFHI3wWUXLMwOEEb/vx8YXN
dCNKl+ynG598ahqUWv6kzywkFexe1p8nzAMnwALQHxQd1fZ+001Gt0XvpuRSbJZ+
l4FNMkLJ8I8IDNt3SU/5k3zgyMPnjygBDuc9/gkNMBw0CBZ42u0Hbgqkw2366gIK
ucg0cblaoHMiaTl77rQW7V8qSK2rW1tDbd0X85N1lzBHUX4yVkmwQXMa3N88S535
+8ZeMD2VEM8adlDHhBuF78LZJVU+vPW4cxvmbF9GCW7grD+hr5x6/vKz+wlS6Mp0
U4eLP2nmNPCACRQFEo58NN0Kpy0Z+98vqYb42hQ4fc7I6uuhAFAq96tmwYBTTdYJ
0Lzd0hGch/+10V0ven+R4a4seB7DklXug08=
=YNRX
-----END PGP SIGNATURE-----
--=-=-=--