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

From: Thierry Volpiatto <[email-masked]>
Date: Sat, 21 Oct 2023 03:34:43 +0000

Michael Heerdegen <[email-masked]> writes:

> Thierry Volpiatto <[email-masked]> writes:
>
>> > For keys like C-a you also need to hit C-q.  It's not 100%
>> > compatible.
>>
>> I don't understand, what C-a and C-q have to do here? Also, what C-q
>> is intended to do in minibuffer?
>
> Registers are characters.  Control characters are valid registers.  So
> you can for example do C-x r s C-a to save the region string into register
> `C-a'.  Your patch complicates inputting such registers.  Dunno if
> people use such registers, but I wanted to mention this.  It's a bit
> harder now to use non-printable characters as registers now.

Yes, probably this is one downside of this patch, but as you mentionned
one can use C-q C-a if really needed, I for one never used such
registers.

>
>> > But wait: What I find confusing is that I also need need to confirm for
>> > `jump-to-register'.  Is this intended?
>>
>> Do you mean RET? If so yes.
>
> For jumping?  Why is this useful?

Well, actually with original behavior you can jump to a register
recorded as a string, which returns an error of course because the
register is meant to use with insert.  Now the situation is better
because the candidates are filtered but you can still jump to an
unwanted place, read-from-minibuffer lets you the time to see where you
are going.

>
>> >> Note that now you can use M-n to select in minibuffer the available
>> >> keys (this only for setting or modifying a register).
>> >
>> > In Helm or in vanilla Emacs?  I don't see that for M-n in vanilla Emacs.
>>
>> Once the patch is applied, C-x r x M-n (repeat if necessary), same for
>> C-x r w/n etc...
>
> Is this part in the patch you had been posting in the first messages?
> Because I only get "End of history; no default available" with that
> patch installed.

No, I will prepare a patch later, when there is interest in this
feature, for now use the gist I maintain here as mentionned previously:

https://gist.github.com/thierryvolpiatto/2219f99ac96ed1b468fac204bca23b4a

Thanks.

-- 
Thierry