emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p?


From: Katsumi Yamaoka
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
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]