emacs-devel
[Top][All Lists]
Advanced

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

Re: yes-or-no-p prompt conditionally broken in master?


From: David Kastrup
Subject: Re: yes-or-no-p prompt conditionally broken in master?
Date: Fri, 04 Sep 2015 21:56:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: David Kastrup <address@hidden>
>> Date: Fri, 04 Sep 2015 20:39:22 +0200
>> Cc: address@hidden, address@hidden, address@hidden,
>>      address@hidden, address@hidden,
>>      address@hidden, address@hidden, address@hidden
>> 
>> >> Reliable translation into selection boxes when feeding emacs -batch from
>> >> a script?
>> >
>> > y-or-n-p already does TRT in that case (no dialog boxes in -batch).
>> 
>> Feeding emacs -batch _from_ a script.  Meaning the script supplies "yes"
>> and "no".
>
> That already works, AFAIK.
>
>> >> Predictable behavior when navigating Emacs by voice?
>> >
>> > I don't see the relevance, please elaborate.
>> 
>> Same as above.  External input translated into a source for consumption
>> by Emacs.
>
> Same as above.
>
>> >> Some people may prefer saying "yes" to saying "why".
>> >
>> > Likewise.
>> 
>> "why" is phonetically the same as "y".  Which means that it's likely
>> harder to generate just "y" from voice than "yes".
>
> Then it should work already.

emacs -batch --eval '(prin1 (y-or-n-p "Yes or no?"))'
Yes or no? (y or n) yes
Please answer y or n.  Yes or no? (y or n) no
Please answer y or n.  Yes or no? (y or n) yes
Please answer y or n.  Yes or no? (y or n) no
Please answer y or n.  Yes or no? (y or n) n
nil

Sometimes I have a hard time figuring out just why people take me for a
ride.  Do they know what they are claiming to be wrong or do they just
find it easier to leave the fact checking to someone else?

-- 
David Kastrup



reply via email to

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