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: Michael Heerdegen
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Mon, 23 Oct 2023 06:09:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Thierry Volpiatto <thievol@posteo.net> writes:

> > 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.

Ah - ok.  Then that's definitely useful.  Haven't yet tried the complete
code, but I had a look at the link you posted.

It would not be good to carve the current register type system
into stone.  Instead of your `register-type' function I would prefer
something extensible, for the case of new register types being added
(even a normal user might want to do this).  So, when one wants to add a
new register type, it is necessary that one is able to declare, in some
way, whether registers of this type should be included or not for
`insert-register' (and maybe also `jump-to-register').

Instead of a detour via type names a better way seems to be adding new
predicate methods that accept one argument, a register, and should
return non-nil when the argument register can be inserted, or jumped to.

I can try to modify your patch accordingly if you are interested.


Thx,

Michael.





reply via email to

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