unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 27979@debbugs.gnu.org, "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Subject: bug#27979: tab completion for "(yes or no)?"
Date: Sun, 6 Aug 2017 09:48:15 -0700 (PDT)	[thread overview]
Message-ID: <6ec4c50f-952e-4004-8fb8-00ab32280a84@default> (raw)
In-Reply-To: <alpine.DEB.2.20.1708070049590.15439@calancha-pc>

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'.)





  reply	other threads:[~2017-08-06 16:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06  0:33 bug#27979: tab completion for "(yes or no)?" 積丹尼 Dan Jacobson
2017-08-06  6:59 ` Tino Calancha
2017-08-06 15:07   ` Drew Adams
2017-08-06 15:20     ` Tino Calancha
2017-08-06 15:46       ` Drew Adams
2017-08-06 16:05         ` Tino Calancha
2017-08-06 16:48           ` Drew Adams [this message]
2017-08-06 20:34             ` Drew Adams
2017-08-06 16:49   ` Eli Zaretskii
2017-08-06 12:52 ` 積丹尼 Dan Jacobson
2017-08-06 13:02   ` Tino Calancha
2017-08-06 13:59     ` Tino Calancha
2017-08-06 16:15 ` 積丹尼 Dan Jacobson
2017-08-06 17:08   ` Eli Zaretskii
2017-08-06 16:58 ` 積丹尼 Dan Jacobson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ec4c50f-952e-4004-8fb8-00ab32280a84@default \
    --to=drew.adams@oracle.com \
    --cc=27979@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).