GNU bug report logs - #73743
Better prompts for Auto-save dialog

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Fri, 11 Oct 2024 07:11:01 UTC

Severity: wishlist

Tags: wontfix

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: 73743 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: bug#73743: Auto-save dialog needs extra RET
Date: Fri, 18 Oct 2024 09:11:37 +0300
> From: Richard Stallman <rms <at> gnu.org>
> Cc: 73743 <at> debbugs.gnu.org, jidanni <at> 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.




This bug report was last modified 142 days ago.

Previous Next


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