GNU bug report logs - #46594
Use short answers

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 17 Feb 2021 19:11:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, "46594 <at> debbugs.gnu.org" <46594 <at> debbugs.gnu.org>
Subject: bug#46594: [External] : bug#46594: Use short answers
Date: Wed, 24 Feb 2021 23:55:30 +0000
> > I think that the doc for this option should explicitly discourage
> > using the value that abbreviates, and say why.
> >
> > It should say that `yes-or-no-p' is _intended_ to be used when it's
> > thought that you should not respond too quickly.  At least point that
> > out, for users to think about before customizing.
> 
> Thanks for suggestions.  Now below is a new patch with these changes.

I'm not sure we should include this:

  and giving the wrong answer would have serious consequences

That's not necessary, IMO.  Not even if you change
"would" (which is wrong) to "could".

It's enough to say that presumably yes-or-no-p is
used so you take time and perhaps think more about
the answer.  No need to imply serious consequences.

Why do we say this?

  In this case it means also obeying the value of
  `y-or-n-p-use-read-key'.

Doesn't that follow, if the behavior is that of
y-or-n-p (I don't know)?  If it does, then just
refer them to the doc for y-or-n-p; don't repeat
any of that doc here.

> > Presumably this option is being added because there are apparently
> > a lot of users who don't want to be slowed down by `yes-or-no-p'.
> > But that's exactly the point of `yes-or-no-p'.
> 
> For many users using longer answers doesn't protect from mistakes.
> Sometimes I execute a command without verifying if it's right,
> e.g. first running a harmless command, then a more dangerous,
> then I forget about the last command, and thinking that the last one
> was the harmless command, quickly type a key sequence 'M-! M-p RET'.

Yes, but this is a gross hammer (IIUC), just like
defaliasing is.  The fact that some particular
author chose yes-or-no-p for some command, and
some particular user wants y-or-n-p instead for
that command, means that they don't have the same
judgment.  And yes, the user's will should prevail.

But does it follow that because of that occurrence
our user wants to make all yes-or-no-p act like
y-or-n-p?  I think we both agree that use of one
or the other is a judgment call.  What we should
do, IMO is twofold:

1. Discourage blanket aliasing (whether by an option
or another way), to replace all yes-or-no-p by
y-or-n-p behavior.

2. Provide a way for users to establish their
preference for a given occurrence.  Not provide
only a way to replace ALL yes-or-no-p behavior
with y-or-n-p behavior.

How to do #2, I don't know.  Give users some
way to be asked what they want?

E.g., yes-or-no-p could accept some input besides
"yes" or "no", which would cause them to be
prompted whether to change THIS occurrence to
y-or-n-p behavior, or ALL occurrences, or cancel
(no change - return to yes/no prompt).

I don't think this is a great solution, but I
do think that we should try to find some way to
accommodate #2.  It's not right to just give
users defaliasing as the only solution.

Another possibility, for part of this, would be
to have your variable accept a value of `ask',
which would prompt as just mentioned (e.g. the
first time for a given occurrence).  IOW, let
users choose, for the option: (1) replace always,
never asking, (2) ask about replacing for an
occurrence, or (3) no replacement and no asking.




This bug report was last modified 4 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.