From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-trunk-diffs] Changes to emacs/src/sysdep.c Date: Tue, 30 Nov 2004 02:03:09 -0500 Message-ID: References: <87hdnb9f4m.fsf-monnier+emacs@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1101798425 9234 80.91.229.6 (30 Nov 2004 07:07:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Nov 2004 07:07:05 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 30 08:07:00 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CZ26F-0001Be-00 for ; Tue, 30 Nov 2004 08:06:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ2Fg-0001dl-5x for ged-emacs-devel@m.gmane.org; Tue, 30 Nov 2004 02:16:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZ2FV-0001cb-3P for emacs-devel@gnu.org; Tue, 30 Nov 2004 02:16:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZ2FU-0001cP-Fe for emacs-devel@gnu.org; Tue, 30 Nov 2004 02:16:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ2FU-0001cM-Cl for emacs-devel@gnu.org; Tue, 30 Nov 2004 02:16:32 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZ255-0001Bc-3j for emacs-devel@gnu.org; Tue, 30 Nov 2004 02:05:47 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CZ22X-0003pr-VW; Tue, 30 Nov 2004 02:03:10 -0500 Original-To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Mon, 29 Nov 2004 09:31:00 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:30516 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30516 > 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.