From: Eli Zaretskii <eliz@gnu.org>
To: rms@gnu.org
Cc: 73743@debbugs.gnu.org, jidanni@jidanni.org
Subject: bug#73743: Auto-save dialog needs extra RET
Date: Fri, 18 Oct 2024 09:11:37 +0300 [thread overview]
Message-ID: <86msj2ndnq.fsf@gnu.org> (raw)
In-Reply-To: <E1t1ckZ-0005g8-F5@fencepost.gnu.org> (message from Richard Stallman on Thu, 17 Oct 2024 22:29:59 -0400)
> From: Richard Stallman <rms@gnu.org>
> Cc: 73743@debbugs.gnu.org, jidanni@jidanni.org
> Date: Thu, 17 Oct 2024 22:29:59 -0400
>
> > > the failure to move on to the next question seems like a bug.
> > > Why is it waiting for the user to type RET?
>
> > It doesn't. It calls read_stdin, which reads 1 byte.
>
> We may be miscommunicating.
> After "Auto-save done", it should ask the next question, right?
> Why does it instead try to read a character at that point
> before asking another question?
Probably because it expects the user to type 'y RET', not just 'y'.
My guess is that we want the user to consciously type the response,
not just touch some random key and then "oops".
But I can only guess the reason; you are the best person to know why,
since you wrote that code back in 1992 or before, when keyboard.c was
first added to the Emacs version control. Here's how that code looked
back then:
printf ("Auto-save? (y or n) ");
fflush (stdout);
if (((c = getchar ()) & ~040) == 'Y')
Fdo_auto_save (Qnil, Qnil);
while (c != '\n') c = getchar ();
#ifdef VMS
printf ("Abort (and enter debugger)? (y or n) ");
#else /* not VMS */
printf ("Abort (and dump core)? (y or n) ");
#endif /* not VMS */
fflush (stdout);
if (((c = getchar ()) & ~040) == 'Y')
abort ();
while (c != '\n') c = getchar ();
printf ("Continuing...\n");
fflush (stdout);
init_sys_modes ();
As you see, both questions expect 'y RET' or 'n RET' as user response.
next prev parent reply other threads:[~2024-10-18 6:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 7:09 bug#73743: Auto-save dialog needs extra RET Dan Jacobson
2024-10-11 9:16 ` Eli Zaretskii
2024-10-16 3:02 ` Richard Stallman
2024-10-16 5:39 ` Eli Zaretskii
2024-10-18 2:29 ` Richard Stallman
2024-10-18 6:11 ` Eli Zaretskii [this message]
2024-10-25 21:37 ` Dan Jacobson
2024-10-26 6:50 ` Eli Zaretskii
2024-10-26 8:22 ` Dan Jacobson
2024-10-28 4:54 ` Richard Stallman
2024-10-28 4:54 ` Richard Stallman
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=86msj2ndnq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73743@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
--cc=rms@gnu.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.
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.