unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73743: Auto-save dialog needs extra RET
@ 2024-10-11  7:09 Dan Jacobson
  2024-10-11  9:16 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Jacobson @ 2024-10-11  7:09 UTC (permalink / raw)
  To: 73743

I notice on the dialog of emacs -nw, after lots of ^G's
Auto-save? (y or n) y
Auto-save done
[Then nothing happens, and we need to hit RET to see the next question:]
Abort (and dump core)? (y or n) n





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

* bug#73743: Auto-save dialog needs extra RET
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-10-11  9:16 UTC (permalink / raw)
  To: Dan Jacobson; +Cc: 73743

> From: Dan Jacobson <jidanni@jidanni.org>
> Date: Fri, 11 Oct 2024 15:09:50 +0800
> 
> I notice on the dialog of emacs -nw, after lots of ^G's
> Auto-save? (y or n) y
> Auto-save done
> [Then nothing happens, and we need to hit RET to see the next question:]
> Abort (and dump core)? (y or n) n

And this is bad because..?

This is emergency exit procedure, where the last thing we need is to
rush things and messages past the user, who is usually panicking and
under stress at this point.





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

* bug#73743: Auto-save dialog needs extra RET
  2024-10-11  9:16 ` Eli Zaretskii
@ 2024-10-16  3:02   ` Richard Stallman
  2024-10-16  5:39     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2024-10-16  3:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 73743, jidanni

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > I notice on the dialog of emacs -nw, after lots of ^G's
  > > Auto-save? (y or n) y
  > > Auto-save done

That much is normal, but

  > > [Then nothing happens, and we need to hit RET to see the next question:]

the failure to move on to the next question seems like a bug.
Why is it waiting for the user to type RET?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

* bug#73743: Auto-save dialog needs extra RET
  2024-10-16  3:02   ` Richard Stallman
@ 2024-10-16  5:39     ` Eli Zaretskii
  2024-10-18  2:29       ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-10-16  5:39 UTC (permalink / raw)
  To: rms; +Cc: 73743, jidanni

> From: Richard Stallman <rms@gnu.org>
> Cc: jidanni@jidanni.org, 73743@debbugs.gnu.org
> Date: Tue, 15 Oct 2024 23:02:59 -0400
> 
>   > > I notice on the dialog of emacs -nw, after lots of ^G's
>   > > Auto-save? (y or n) y
>   > > Auto-save done
> 
> That much is normal, but
> 
>   > > [Then nothing happens, and we need to hit RET to see the next question:]
> 
> 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.





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

* bug#73743: Auto-save dialog needs extra RET
  2024-10-16  5:39     ` Eli Zaretskii
@ 2024-10-18  2:29       ` Richard Stallman
  2024-10-18  6:11         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2024-10-18  2:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 73743, jidanni

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > >   > > I notice on the dialog of emacs -nw, after lots of ^G's
  > >   > > Auto-save? (y or n) y
  > >   > > Auto-save done
  > > 
  > > That much is normal, but
  > > 
  > >   > > [Then nothing happens, and we need to hit RET to see the next question:]
  > > 
  > > 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?


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

* bug#73743: Auto-save dialog needs extra RET
  2024-10-18  2:29       ` Richard Stallman
@ 2024-10-18  6:11         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-10-18  6:11 UTC (permalink / raw)
  To: rms; +Cc: 73743, jidanni

> 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.





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

end of thread, other threads:[~2024-10-18  6:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).