bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35133: 26.1; 1) `:tag' for `restricted-sexp' (not in a choice, set,


From: Drew Adams
Subject: bug#35133: 26.1; 1) `:tag' for `restricted-sexp' (not in a choice, set, etc.), 2) Remove `Value Menu' if a no-op
Date: Wed, 9 Dec 2020 15:30:43 -0800 (PST)

> Not much time until the weekend, I'm afraid.
>
> Dropping the tag is intentional, in custom-variable-value-create:
> (push (widget-create-child-and-convert
>   widget type
>   :format value-format
>    ^^^^^^^^^^^^^^^^^^^
>   :value value)
>  children))
>
> I suppose we could stop overriding the :format property, but for some
> widgets overriding it might make sense.  For example, for the choice
> widget, deleting the :format value-format line would create the
> following:
>
> Foo: Choice: [Value Menu] The-Tag:
>
> Which isn't good, IMO.  Other customization types I can think of that we
> should pay attention if we go with this change would be: repeat, set and
> radio.
>
> I think that those three, if we print their tag, won't give too much
> valuable information about the variable.   I mean, we'd end up with
> something like this:
>
> Foo: Repeat:
> [INS] [DEL] Something
> [INS]
>
> And any user may ask what does "repeat" mean.  Maybe changing the tags
> to something slightly more useful is all we need, and with this change
> the Custom buffer will show the customization type of the variable to
> the user, which looks like a win to me.  What do you think about the
> "problematic" tags?

Thanks for looking into this Mauro.

I'd suggest handling this in two stages:

1. Take care of what is clearly, or pretty clearly,
   straightforward.
2. Think about how to handle other cases.
____

But in general, for defcustom I think I'm in favor of
allowing the realization of a :tag, regardless of
whether using it might be problematic sometimes.

After all, using :tag is optional.  If the result
isn't helpful, someone won't use it.

But I guess you're asking about default tags?  What
happens if there's no default :tag for some widget
(such as `repeat') but when you use the widget you
provide a :tag?  Would that be possible?  IOW, maybe
a :tag for `repeat' isn't useful by default, but
maybe adding a :tag when you use some `repeat' could
be useful.

(For the problematic cases, maybe the tag text should be
shown without the trailing colon?  Maybe it depends on
where the tag is placed and how long the string is.)

Anyway, for now at least, #1 would be great.  Thx.





reply via email to

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