GNU bug report logs -
#66394
29.1; Make register-read-with-preview more useful
Previous Next
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
Thierry Volpiatto <thievol <at> posteo.net> writes:
> Not sure to understand what you want to do here.
Maybe it's easier if I post a patch. Will try to do this tomorrow.
What I want to do is that `register-read-with-preview' accepts another
argument, a predicate, that is used to filter the registers to be
included in the preview.
And the hierarchy defining which registers support which operations I
want to define implicitly using method specializers, not explicitly
using types.
Because I think using generics is more flexible. When the type system
you propose defines, for example, that string registers can be inserted,
and appendend and prepended to (we have commands for that), and
then, say, somebody wants to define a wrapper register type "read-only
register" that can hold anything a register can hold but with the
difference that the read-only register can't be modified, you want to
fall back to the filtering of the base type (which can be anything, so
this has to be done dynamically) - but disallow append and prepend for
string registers, for example.
Just an example, but such wrappers can be useful for registers. You can
define registers with annotations for example: the annotations are
displayed in the preview but don't affect the behavior of the base
register.
Such things are hard to code using a type system. Of course there are
more changes to be made to allow everything I outlined, but I want that
we don't do anything that limits what could be added to register.el in
the future.
Michael.
This bug report was last modified 1 year and 210 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.