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

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

bug#64046: 30.0.50; Quoting in customize choice tags


From: Ola x Nilsson
Subject: bug#64046: 30.0.50; Quoting in customize choice tags
Date: Mon, 28 Aug 2023 11:33:09 +0200
User-agent: mu4e 1.8.14; emacs 30.0.50

On Fri, Aug 25 2023, Stephen Berman wrote:

> On Fri, 25 Aug 2023 10:02:35 +0200 Ola x Nilsson <ola.x.nilsson@axis.com> 
> wrote:
>
>> On Thu, Aug 24 2023, Mauro Aranda wrote:
>>
>>> Stephen Berman <stephen.berman@gmx.net> writes:
>>>
>>>> On Thu, 24 Aug 2023 17:14:53 -0300 Mauro Aranda
>>>   <maurooaranda@gmail.com> wrote:
> [...]
>>>>> Thinking about it, why do we need to call substitute-command-keys on the
>>>>> VALUE part (i.e., the cdr of the cons cell), in case of simple item
>>>>> definitions?
>>>>>
>>>>> I re-read the bug report, but I didn't find any reference to why that is
>>>>> a need.  Did I miss something?
>>>>
>>>> Well, the VALUE is displayed on entering a choice.  That is, when I do
>>>>
>>>> M-: (widget-choose "Title" '(("Use `a'" . "Use `1'") ("Use `b'"
>>>   . "Use `2'")))
>>>>
>>>> I see curve-quoting in the widget-choose buffer:
>>>>
>>>>    Available choices:
>>>>
>>>>    0 = Use ‘a’
>>>>    1 = Use ‘b’
>>>>
>>>>    C-g = Quit
>>>>
>>>> and when I enter e.g. `0' at the "Title: " prompt in the minibuffer, it
>>>> displays "Use ‘1’", i.e., with curve-quoting.  But if I omit the call to
>>>> substitute-command-keys on the cdr in widget-choose, then typing `0' at
>>>> the "Title: " prompt displays "Use `1'", i.e. with grave-quoting.  But I
>>>> don't know which one is the intended result.
>>>
>>> I see, thank you.  Your last patch looks good to me, then.
>>
>> The cdr is the return value, I would expect widget-choose to not
>> modify that. 
>
> I think this is indeed the correct expectation and I should have
> recognized it instead of looking only at appearances.  But do you agree
> that applying (at least) quote substitution to the car of the simple
> item definition is appropriate here?  If so, there is still the question
> of whether to use substitute-command-keys or just substitute-quotes.
> I'm inclined to stick with the former but would be fine with going with
> the latter.

I agree that quote substition should be done on the car of simple item
definitions.  I have no opinion on susbstitute-command-keys vs
substitute-quotes.  But I came to think about the TITLE argument,
shouldn't quote substition be performed on it as well?

/Ola





reply via email to

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