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: Thu, 19 Oct 2023 06:16:13 +0000

Hello Michael,

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Thierry Volpiatto <thievol@posteo.net> writes:
>
>> When using `copy-to-register`, it is hard to see which register is
>> already taken in the preview buffer.  This patch highlight the
>> register entered at prompt if it is already taken otherwise a
>> minibuffer message is sent to notify user the register is available.
>> If any interest here is the patch, feel free to modify if needed.
>
> I am not sure what's the best way to address this kind of problem.  If
> your version is accepted, I would vote for an option to get the old
> behavior back.  Your intended behavior is safer but requires more keys
> (at least confirmation with RET).  Some people might prefer the old way.

There is only RET as additional key and it is a good thing IMO as it let
the time to user to see what he is doing.  Anyway using a real
minibuffer with its keymap is much better and allows further
modifications in the future to fit the needs of everybody. Using
read-key doesn't allow more alternatives.

> I'm also not sure about the visual feedback.  If you use lots of
> registers you might miss your register highlighting in the preview
> buffer.

It's easy to make the selection always visible, now fixed, thanks.

> Maybe using the minibuffer always for the visual feedback might be
> better, I don't know.  Or give only feedback when the register is
> already taken?  Or maybe require the user to hit RET two times to
> confirm overwriting?

Don't think it is necessary with the register highlighting, and with the
real minibuffer, we must hit RET at least one time to exit wich act as a
confirmation (previously read-key was exiting immediately).
>
> Personally I hacked the code so that I can lock registers I don't want
> to overwrite.  I can also restore registers.  That takes away a bit of
> the pressure.

Ok, that's another approach but doesn't help to see what is available or
not.
Note that now you can use M-n to select in minibuffer the available keys (this
only for setting or modifying a register).

> There also had been a request to be able to delete register bindings,
> but it had been rejected.

You can delete your registers with helm, but this is unrelated to this
thread.

> In any way there should be some way to allow a cleaner working with
> registers.

Probably what I propose is not perfect but it is a first step to have
something better than what we have actually.

Thanks for your feedback.

> Just my two cents.
>
>
> Michael.


-- 
Thierry

Attachment: signature.asc
Description: PGP signature


reply via email to

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