From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#27979: tab completion for "(yes or no)?" Date: Sun, 6 Aug 2017 09:48:15 -0700 (PDT) Message-ID: <6ec4c50f-952e-4004-8fb8-00ab32280a84@default> References: <87lgmxh6w5.fsf@jidanni.org> <87r2wp6v1m.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1502038152 21499 195.159.176.226 (6 Aug 2017 16:49:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 6 Aug 2017 16:49:12 +0000 (UTC) Cc: 27979@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 06 18:49:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deOjj-00056A-HZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Aug 2017 18:49:07 +0200 Original-Received: from localhost ([::1]:33787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deOjm-00057l-MA for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Aug 2017 12:49:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deOjh-00057c-A0 for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 12:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deOje-0004ts-7c for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 12:49:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42234) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1deOje-0004tn-3x for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 12:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1deOjd-0002dQ-Rs for bug-gnu-emacs@gnu.org; Sun, 06 Aug 2017 12:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Aug 2017 16:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27979 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27979-submit@debbugs.gnu.org id=B27979.150203810810085 (code B ref 27979); Sun, 06 Aug 2017 16:49:01 +0000 Original-Received: (at 27979) by debbugs.gnu.org; 6 Aug 2017 16:48:28 +0000 Original-Received: from localhost ([127.0.0.1]:44911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deOj6-0002cb-1W for submit@debbugs.gnu.org; Sun, 06 Aug 2017 12:48:28 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:27180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deOj4-0002cO-00 for 27979@debbugs.gnu.org; Sun, 06 Aug 2017 12:48:26 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v76GmIHL018906 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 6 Aug 2017 16:48:18 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v76GmI74018693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 6 Aug 2017 16:48:18 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v76GmGff019943; Sun, 6 Aug 2017 16:48:16 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6774.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135502 Archived-At: Here's a thought - Whoever writes a function that prompts for confirmation decides whether to use `yes-or-no-p' or `y-or-n-p'. A general choice is made for all users, based on the importance of the decision, consequences, etc. in that context. But not all users will agree with that choice, for that particular function's prompting. We could perhaps give users a way to say, "From now on, for this particular prompting (i.e., in this particular function/context), use `y-or-n-p', not `yes-or-no-p'. That would be a bit like what we do for commands, such as `narrow-to-region', that are disabled out of the box. We give users a way to enable them one by one. Dunno how hard it would be to implement this. Perhaps `yes-or-no-p' could be changed somehow to: 1. Accept a third input, such as `use-y-or-n-p-here', that would record the current context as one in which `yes-or-no-p' would just use `y-or-n-p'. 2. Recognize the calling context somehow, and substitute `y-or-n-p' if that context is recognized and if it has been recorded by the user as one where `y-or-n-p' should be used. Dunno how hard that would be - in particular #2. Or whether it would be worth doing. But I can see the possibility of someone not wanting to do `yes-or-no-p' in some particular contexts but also not wanting to replace `yes-or-no-p' by `y-or-n-p' everywhere. (Of course, such a user could always advise or redefine the particular calling function, replacing `yes-or-no-p' by `y-or-n-p'.)