GNU bug report logs - #66394
29.1; Make register-read-with-preview more useful

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Sat, 7 Oct 2023 19:07:01 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: michael_heerdegen <at> web.de, dmitry <at> gutov.dev, Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefankangas <at> gmail.com>, 66394 <at> debbugs.gnu.org
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Tue, 19 Dec 2023 17:40:59 +0000
[Message part 1 (text/plain, inline)]
Hello Stefan,

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> It should be possible to use post-command-hook, I didn't use it because
>> it makes harder the communication between the minibuffer and the preview
>> buffer.
>
> The patch below seems to work for my extremely limited testing.

Could have some time to test register with your post-command-hook patch.
I had to make on more little change to make it working in all
conditions, here what I tried so far:

1) (customize-set-variable 'register-use-preview t)
We have here confirmation with RET everywhere, works fine in all
commands and test macro.

2) (customize-set-variable 'register-use-preview nil)
We have here no confirmation (RET) at all, works fine in all commands
and test macro.

3) (customize-set-variable 'register-use-preview nil) and modification
with a defmethod so that we have no confirmation in insert/jump and
confirmation with increment-register:

    (cl-defmethod register-command-info ((_command (eql increment-register)))
      (make-register-preview-info
       :types '(all)
       :msg "Increment to register `%s'"
       :act 'set
       :smatch t
       :noconfirm t))

Works fine everywhere and in test macro as well.

4) (customize-set-variable 'register-use-preview 'never)

Same behavior as in 2) and 3) in same conditions.


[The test macro was adding a number at beginning and end of each lines in
a text and increment this number at every turn, this involve
insert-register (twice) and increment-register (once).]

So it seems we have now something working fine in all conditions :-)

Here the serie of patches (the first 3 are unchanged). 


-- 
Thierry
[0001-Don-t-confirm-with-RET-even-when-overwriting-in-regi.patch (text/x-diff, attachment)]
[0002-Provide-emacs-29-behavior-for-register-preview.patch (text/x-diff, attachment)]
[0003-Fix-issue-with-register-commands-in-kmacro.patch (text/x-diff, attachment)]
[0004-Fix-condition-in-register-read-with-preview-fancy.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.