bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66394: 29.1; Make register-read-with-preview more useful


From: Thierry Volpiatto
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Tue, 19 Dec 2023 17:40:59 +0000

Hello Stefan,

Stefan Monnier <monnier@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

Attachment: 0001-Don-t-confirm-with-RET-even-when-overwriting-in-regi.patch
Description: Text Data

Attachment: 0002-Provide-emacs-29-behavior-for-register-preview.patch
Description: Text Data

Attachment: 0003-Fix-issue-with-register-commands-in-kmacro.patch
Description: Text Data

Attachment: 0004-Fix-condition-in-register-read-with-preview-fancy.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]