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, 12 Dec 2023 10:16:52 +0000

Thierry Volpiatto <thievol@posteo.net> writes:

> Thierry Volpiatto <thievol@posteo.net> writes:
>
>> Dmitry Gutov <dmitry@gutov.dev> writes:
>>
>>> On 11/12/2023 19:32, Thierry Volpiatto wrote:
>>>> I made a little error in one of the patch when merging from a working
>>>> file for emacs-29.1, attaching here the two patches again with error
>>>> corrected (read `register-use-preview` instead of
>>>> `register-preview-use-preview`), sorry for this.
>>>
>>> JFYI, the second patch doesn't apply cleanly, which may make testing
>>> them a bit more difficult.
>>>
>>> It's because of commit 598ab9ca10d35d6 by Eli with documentation
>>> updates. When reverted, the second patch applies without problem.
>>
>> Dmitry thanks, here the patches again after rebasing.
>
> I found another (merge) error in patch 0001 with defmethod names (read
> register-command-info instead of register-preview-command-info), here
> the patches corrected.  Without this changes, and with
> register-use-preview == nil, confirmation is needed for copy-to-register
> and friends, now fixed.

Here a third patch that allows more precise configuration if needed.
For example if you have register-use-preview == nil, no confirmation
with RET is needed everywhere, even when overwriting a register.  If you
want to have a confirmation when overwriting but no confirmation when
jumping/inserting you can use this in addition of register-use-preview
== nil:

    (cl-defmethod register-command-info :after ((_command (eql 
copy-to-register)))
      (make-register-preview-info
       :types '(all)
       :msg "Copy to register `%s'"
       :act 'set))

You can modify other commands as well to your needs (point-to-register
etc...) with same method.

Sending here the serie of 3 patches to avoid errors when applying
patches.

I have also some minor errors (english in docstring, unnneded quotes
etc...) that I will fix later when polishing final patches.

-- 
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-Allow-users-overriding-register-use-preview-behavior.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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