[Top][All Lists]

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

RE: address@hidden: RE: Customize doc strings and tagstrings do not resp

From: Drew Adams
Subject: RE: address@hidden: RE: Customize doc strings and tagstrings do not respect \\<...> and \\[...]]
Date: Sun, 5 Mar 2006 07:30:19 -0800

    > The point (the bug) is that the tag text should implicitly have
    > `substitute-command-keys' applied to it.

    The connection between doc strings and widget tags is not immediately
    apparent, but of course this could be added as a new feature.

Who is to say whether the current design includes this, so that the
implementation is bugged, or the design does not include this, so that this
represents a new feature? I can't speak for the designers, but as a user, it
seems pretty obvious to me that this is the way :tag strings should work.
When I see that they don't, I report it as a bug, but the designers are free
to say "That's the way it is supposed to work", to which I would reply,
"Please change the design to add this useful feature."

    But note that this would change the rendition of existing :tag strings
    certain construct in the text would have to be quoted now.

What constructs are those? How would they have to be quoted? I'm not aware
of ever having to quote anything in a doc string? Just what is the
limitation that `substitute-command-keys' imposes? What is an example of an
existing :tag string that would be negatively impacted?

If a programmer wanted the behavior we get currently, then s?he would be out
of luck. I don't know of a way to "quote" things to protect against
`substitute-command-keys', however.

    Current only
    doc strings are filtered through substitute-command-keys (via

    >     No.  This is the correct rendition of \<my-map> when my-map is not
    >     defined.
    > If one defines "correct rendition" by whatever the program
    does currently,
    > then of course there can be no bug. "Circulez, il n'y a rien a voir!"

    That's how substitute-command-keys has always been working, and
    it is not a useless feature.

I didn't say anything to the contrary. That feature is useful, as is, for
`substitute-command-keys'. But raw `substitute-command-keys' with that
feature is not appropriate for this context.

The point is that this is not just `substitute-command-keys'; it is use of
that function in a particular context. You are arguing that the
implementation does what it does. I am saying that the implementation
doesn't do the right thing - it's not enough to just use
`substitute-command-keys' with no thought to the context. An error message
like this should be handled more gracefully for the user.

    It helps to interpret subsequent renditions of \[...]
    (the commands might be bound in a different key map that is current at
    this point).

I have nothing against the reporting of the warning. The point is that when
a function passes up an indication of an error condition to its caller, it
is up to the calling function to DTRT with that info, not necessarily just
dump it to the screen. In this case, it would be enough to 1) insert the
original text (so that the error message becomes intelligible, instead of
appearing to be missing a part), 2) insert the error message _after_ the
buttons and original text. IOW, if the garbling of the message and original
text and splicing around the button were fixed, things would be fine.

Admittedly, this is a minor, cosmetic bug. The bug originally reported (need
to apply `substitute-command-keys' to :tag text) is more important, as it
affects fairly important functionality (IMO).

reply via email to

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