all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p?
       [not found]               ` <b4my7b2w3f8.fsf@jpl.org>
@ 2008-01-07  6:34                 ` Katsumi Yamaoka
  2008-01-07 17:16                   ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2008-01-07  6:34 UTC (permalink / raw)
  To: emacs-devel, xemacs-beta; +Cc: ding

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,



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p?
  2008-01-07  6:34                 ` Do we need gnus-yes-or-no-p and gnus-y-or-n-p? Katsumi Yamaoka
@ 2008-01-07 17:16                   ` Richard Stallman
  2008-01-07 22:52                     ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2008-01-07 17:16 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: emacs-devel, xemacs-beta, ding

    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.

It is intentional.

    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.

Yes, that is the reason.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p?
  2008-01-07 17:16                   ` Richard Stallman
@ 2008-01-07 22:52                     ` Katsumi Yamaoka
  2008-02-16 12:22                       ` Reiner Steib
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2008-01-07 22:52 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel, xemacs-beta, ding

>>>>> Richard Stallman wrote:

> It is intentional.

Reiner> In contrast to yes-or-no-p it is much easier to type y, n,
Reiner> SPC, DEL, etc accidentally, so it might be useful for the user
Reiner> to see what he has typed.

> Yes, that is the reason.

Thanks for enlightening me.  This has dispelled my long-standing
doubt that the Lisp programs[1] that clear the echo area are few
except for the ones of Gnus (and emacs-w3m).  I agree with not
deleting on purpose the question and the answer that `y-or-n-p'
displays.  Though this doesn't mean changing my sense of beauty.
I.e., I don't like it.

[1] ediff-quit-meta-buffer, help-with-tutorial, mh-search-folder,
    dissociated-press, and c-submit-bug-report in Emacs.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p?
  2008-01-07 22:52                     ` Katsumi Yamaoka
@ 2008-02-16 12:22                       ` Reiner Steib
  0 siblings, 0 replies; 4+ messages in thread
From: Reiner Steib @ 2008-02-16 12:22 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: xemacs-beta, ding, emacs-devel

On Mon, Jan 07 2008, Katsumi Yamaoka wrote:

>>>>>> Richard Stallman wrote:
[ `y-or-n-p' doesn't clear the echo area after user input ]
>> It is intentional.
>
> Reiner> In contrast to yes-or-no-p it is much easier to type y, n,
> Reiner> SPC, DEL, etc accidentally, so it might be useful for the user
> Reiner> to see what he has typed.
>
>> Yes, that is the reason.
>
> Thanks for enlightening me.  This has dispelled my long-standing
> doubt that the Lisp programs[1] that clear the echo area are few
> except for the ones of Gnus (and emacs-w3m).  I agree with not
> deleting on purpose the question and the answer that `y-or-n-p'
> displays.  Though this doesn't mean changing my sense of beauty.
> I.e., I don't like it.

I'd suggest to keep
  (defalias 'gnus-y-or-n-p 'y-or-n-p)
  (defalias 'gnus-yes-or-no-p 'yes-or-no-p)
for some weeks and replace the callers[1] with `yes-or-no-p' and
`y-or-n-p' unless there are strong objections.

Bye, Reiner.

[1]
gnus/lisp$ grep -nH -e gnus-yes-or-no-p *.el|wc -l
22

gnus/lisp$ grep -nH -e gnus-y-or-n-p *.el|wc -l
34
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-16 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <v9642y8ahb.fsf@marauder.physik.uni-ulm.de>
     [not found] ` <v9y7bxq8zn.fsf@marauder.physik.uni-ulm.de>
     [not found]   ` <b4m63yygknt.fsf@jpl.org>
     [not found]     ` <b4mprx3zjyi.fsf@jpl.org>
     [not found]       ` <b4mve6ve7er.fsf@jpl.org>
     [not found]         ` <v9odc0q9v9.fsf@marauder.physik.uni-ulm.de>
     [not found]           ` <b4mzlvjolbi.fsf@jpl.org>
     [not found]             ` <v9wsqni9vb.fsf@marauder.physik.uni-ulm.de>
     [not found]               ` <b4my7b2w3f8.fsf@jpl.org>
2008-01-07  6:34                 ` Do we need gnus-yes-or-no-p and gnus-y-or-n-p? Katsumi Yamaoka
2008-01-07 17:16                   ` Richard Stallman
2008-01-07 22:52                     ` Katsumi Yamaoka
2008-02-16 12:22                       ` Reiner Steib

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.