Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: emacs-devel@gnu.org, xemacs-beta@xemacs.org
Cc: ding@gnus.org
Subject: Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p?
Date: Mon, 07 Jan 2008 15:34:43 +0900	[thread overview]
Message-ID: <b4mabniw3cs.fsf@jpl.org> (raw)
In-Reply-To: <b4my7b2w3f8.fsf@jpl.org>

Hi,

In the Gnus mailing list, now it is being discussed whether the
behavior of `y-or-n-p' that it does not clear the echo area is
intentional.  While `yes-or-no-p' clears the question and the
answer in the echo area after entering `y e s' or `n o' and RET,
`y-or-n-p' does not do so after entering `y' or `n'.  E.g.:

(defun foo ()
  "Switch to buffer named foo."
  (interactive)
  (when (y-or-n-p "Switch to buffer foo? ")
    (switch-to-buffer "foo")))

(Please try it with `yes-or-no-p' as well.)

The behavior of `y-or-n-p' that it doesn't clear the question
and the answer is not serious of course, but I feel it is not
cool.  Lars seems to have felt it like me and introduced the
function `gnus-y-or-n-p' in February, 1995:

(defun gnus-y-or-n-p (prompt)
  (prog1
      (y-or-n-p prompt)
    (message "")))

Currently, it is commented out in the trunk by Reiner Steib.  He
also wrote the benefit of leaving the question and the answer in
the echo area as follows:

(http://article.gmane.org/gmane.emacs.gnus.general/66061)
> In contrast to yes-or-no-p it is much easier to type y, n,
> SPC, DEL, etc accidentally, so it might be useful for the user
> to see what he has typed.

(You can read the whole thread in:
http://news.gmane.org/group/gmane.emacs.gnus.general/thread=65099/force_load=t)

But I like the behavior that it clears the echo area like
`yes-or-no-p', even if it is a side effect of the RET key.

Could someone draw the conclusion?  And if it is regarded as a
bug, I hope it is fixed in the future (in that case, we need to
uncomment `gnus-y-or-n-p' for old Emacsen).

Regards,



  reply	other threads:[~2008-01-07  6:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 18:24 Reiner Steib
2007-12-14 21:09 ` Reiner Steib
2007-12-17  1:44   ` Katsumi Yamaoka
2007-12-17  2:26     ` Katsumi Yamaoka
2007-12-18 23:01     ` Katsumi Yamaoka
2007-12-19  2:37       ` Katsumi Yamaoka
2008-01-05 20:46         ` Reiner Steib
2008-01-06  0:21           ` Katsumi Yamaoka
2008-01-06  9:25             ` Reiner Steib
2008-01-07  6:33               ` Katsumi Yamaoka
2008-01-07  6:34                 ` Katsumi Yamaoka [this message]
2008-01-07 17:16                   ` Richard Stallman
2008-01-07 22:52                     ` Katsumi Yamaoka
2008-02-16 12:22                       ` Reiner Steib

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

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

  git send-email \
    --in-reply-to=b4mabniw3cs.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=xemacs-beta@xemacs.org \
    /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.
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 NNTP newsgroup(s).