[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-trunk-diffs] Changes to emacs/src/sysdep.c
From: |
Richard Stallman |
Subject: |
Re: [Emacs-trunk-diffs] Changes to emacs/src/sysdep.c |
Date: |
Tue, 30 Nov 2004 02:03:09 -0500 |
> Hmm... what happens if you hit C-g while writing a file?
> Before your change, nothing, I believe.
Clearly, that's not the case. C-g during the `write' (or at any other time
for that matter) would cause a signal-handler to be called that processed
the input. This might either do a longjmp or just set quit-flag.
The signal handler would indeed run and set quit-flag, and return, but
the net effect on the code that writes the file was nil.
BTW, is a 2MB file is currently written with a single call to `write'?
Sometimes it can be, I think; however, in general Fwrite_file can call
`write' many times. However, there was no use of QUIT in and among
them.
I always felt like there should be a way to force an immediate_quit, not
only is `write'. Maybe by hitting C-g three times in a row or something
like that.
Hitting C-g twice activates the emergency escape, which is even more
drastic than that. However, this feature is only active on ttys.
So what do you think of the following idea?
> Maybe we could get the best of both worlds if we set it up so that
> quit can occur inside emacs_write only if it has been sitting there
> for 30 seconds or more since the last data it succeeded in writing.