From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: yes-or-no-p prompt conditionally broken in master? Date: Fri, 04 Sep 2015 21:56:53 +0200 Message-ID: <87y4gmrm9m.fsf@fencepost.gnu.org> References: <83fv2v9y9z.fsf@gnu.org> <57355235-9af7-49fb-81b5-93182cfc9d49@default> <83a8t39x3t.fsf@gnu.org> <83zj128slp.fsf@gnu.org> <87k2s6o7qh.fsf@igel.home> <83wpw68j2n.fsf@gnu.org> <871teenysf.fsf@igel.home> <83r3me8ho3.fsf@gnu.org> <20150904133439.GB2991@acm.fritz.box> <83lhcm83vl.fsf@gnu.org> <87fv2ut5k4.fsf@fencepost.gnu.org> <83k2s682el.fsf@gnu.org> <877fo6t4f9.fsf@fencepost.gnu.org> <83io7q7yrq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441396634 13343 80.91.229.3 (4 Sep 2015 19:57:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2015 19:57:14 +0000 (UTC) Cc: dgutov@yandex.ru, bruce.connor.am@gmail.com, emacs-devel@gnu.org, schwab@linux-m68k.org, monnier@iro.umontreal.ca, kaushal.modi@gmail.com, acm@muc.de, drew.adams@oracle.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 04 21:57:12 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXx6l-0008Eb-Pq for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2015 21:57:11 +0200 Original-Received: from localhost ([::1]:34795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXx6l-000315-VU for ged-emacs-devel@m.gmane.org; Fri, 04 Sep 2015 15:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXx6a-00030K-3t for emacs-devel@gnu.org; Fri, 04 Sep 2015 15:57:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXx6Z-0007Wz-7Q for emacs-devel@gnu.org; Fri, 04 Sep 2015 15:57:00 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXx6V-0007Nh-Eu; Fri, 04 Sep 2015 15:56:55 -0400 Original-Received: from localhost ([127.0.0.1]:45583 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZXx6U-0008J4-E6; Fri, 04 Sep 2015 15:56:54 -0400 Original-Received: by lola (Postfix, from userid 1000) id BDC52E0FA8; Fri, 4 Sep 2015 21:56:53 +0200 (CEST) In-Reply-To: <83io7q7yrq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Sep 2015 22:47:05 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189618 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Date: Fri, 04 Sep 2015 20:39:22 +0200 >> Cc: dgutov@yandex.ru, bruce.connor.am@gmail.com, emacs-devel@gnu.org, >> schwab@linux-m68k.org, monnier@iro.umontreal.ca, >> kaushal.modi@gmail.com, acm@muc.de, drew.adams@oracle.com >> >> >> 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