From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18141: 24.4.50; saving .gz file breaks file coding Date: Wed, 06 Aug 2014 20:32:27 +0300 Message-ID: <831tstplqs.fsf@gnu.org> References: <9pzjfrwvsl.fsf@fencepost.gnu.org> <83iom5ptwv.fsf@gnu.org> <20140806164316.GK4813@xvii.vinc17.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1407346407 10428 80.91.229.3 (6 Aug 2014 17:33:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2014 17:33:27 +0000 (UTC) Cc: 18141@debbugs.gnu.org, yamaoka@jpl.org To: Vincent Lefevre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 06 19:33:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XF55R-0000TG-QF for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Aug 2014 19:33:17 +0200 Original-Received: from localhost ([::1]:40305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF55R-0006yn-7s for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Aug 2014 13:33:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF55H-0006xl-Sc for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 13:33:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF55C-0005yZ-Sp for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 13:33:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF55C-0005yV-PY for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 13:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XF55C-0006bW-Gs for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2014 13:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Aug 2014 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18141 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18141-submit@debbugs.gnu.org id=B18141.140734634425333 (code B ref 18141); Wed, 06 Aug 2014 17:33:02 +0000 Original-Received: (at 18141) by debbugs.gnu.org; 6 Aug 2014 17:32:24 +0000 Original-Received: from localhost ([127.0.0.1]:60617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XF54Z-0006aW-P4 for submit@debbugs.gnu.org; Wed, 06 Aug 2014 13:32:24 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:44786) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XF54X-0006aH-Fn for 18141@debbugs.gnu.org; Wed, 06 Aug 2014 13:32:22 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N9W00700B102C00@a-mtaout22.012.net.il> for 18141@debbugs.gnu.org; Wed, 06 Aug 2014 20:32:15 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N9W006OOBDQPU70@a-mtaout22.012.net.il>; Wed, 06 Aug 2014 20:32:15 +0300 (IDT) In-reply-to: <20140806164316.GK4813@xvii.vinc17.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92198 Archived-At: > Date: Wed, 6 Aug 2014 18:43:16 +0200 > From: Vincent Lefevre > Cc: Glenn Morris , 18141@debbugs.gnu.org, yamaoka@jpl.org > > On 2014-08-06 17:36:00 +0300, Eli Zaretskii wrote: > > . Bug#13522, which these changes were trying to solve, happens when > > Emacs is killed by an external signal during the time between > > backing up the original file and writing the new one. (This time > > can be quite large if write-region asks the user to choose a > > suitable encoding for the new content.) That is a pretty rare > > situation, and IMO it's perfectly OK for Emacs to leave just the > > backup file if it was brutally killed during that time window. > > No, this is not rare Maybe for you, because you are used to abort Emacs by a signal. I never had such experiences in all the long years I'm using Emacs. > (Emacs seems to be confused on files that have several encodings, > such as mailboxes) It does? I didn't see that since Emacs 23.1 at the least. > and I sometimes hit Ctrl-C in the terminal (from which Emacs was > started) to discard any change. Then don't do that, if it hurts. C-g or M-~ or C-/ in Emacs will discard changes (in different scenarios) without any adverse effects, as will killing the buffer that visits the modified file. Why brutally abort Emacs by a signal, when Emacs gives you better ways to do that? > And that's not OK to only leave the backup file, > since it can be removed or overwritten pretty quickly, before > I notice that the original file is gone. Removed or overwritten by whom or what? > But why isn't the backup done just before the file is actually > written? It _is_ done "just before", see basic-save-buffer-2.