GNU bug report logs - #66394
29.1; Make register-read-with-preview more useful

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Sat, 7 Oct 2023 19:07:01 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 66394 <at> debbugs.gnu.org
Subject: bug#66394: 29.1; Make register-read-with-preview more useful
Date: Thu, 19 Oct 2023 06:16:13 +0000
[Message part 1 (text/plain, inline)]
Hello Michael,

Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Thierry Volpiatto <thievol <at> 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
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.