From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13522: 24.2; save-buffer removes edited file under some conditions Date: Mon, 14 Mar 2022 15:37:43 +0200 Message-ID: <83mthsk63c.fsf@gnu.org> References: <87622qaszq.fsf@xvii.vinc17.org> <8735jkye2q.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1115"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 13522@debbugs.gnu.org, vincent@vinc17.net To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 14 14:57:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTlCF-00005G-Oc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Mar 2022 14:57:15 +0100 Original-Received: from localhost ([::1]:53722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTlCE-0003on-GZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Mar 2022 09:57:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTkuc-0000jf-Cu for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 09:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTkuc-0001vn-3e for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 09:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTkub-0001AX-N8 for bug-gnu-emacs@gnu.org; Mon, 14 Mar 2022 09:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Mar 2022 13:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 13522-submit@debbugs.gnu.org id=B13522.16472650844407 (code B ref 13522); Mon, 14 Mar 2022 13:39:01 +0000 Original-Received: (at 13522) by debbugs.gnu.org; 14 Mar 2022 13:38:04 +0000 Original-Received: from localhost ([127.0.0.1]:44396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTktg-000190-Fr for submit@debbugs.gnu.org; Mon, 14 Mar 2022 09:38:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTkte-00018U-5e for 13522@debbugs.gnu.org; Mon, 14 Mar 2022 09:38:03 -0400 Original-Received: from [2001:470:142:3::e] (port=48258 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTktY-0001kg-KD; Mon, 14 Mar 2022 09:37:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=spHN371Y9lTZXdEYn9FC5Ze8UrgPUMX5vlyfyZIdQdY=; b=myHohBIj9t8M 7tgUiF3znAZzOHPG6xK5aAj/SgLtKwx8YsDRVaeuvpDZp3AjLn9fMl8Nf70yZrwwFWIVQ6WKRUGsG EBc5kdG+wMmJ/bn6WnA6iNo5nUN3cGjx/cfSMdG90jMB2DO2HcG6IT+1YQBoPDypGdNSuuguSK/CH 22btokcrCnyzoea9VrYukO/dKK6OH4pnQxuwr/oHPUnpaxhPjDlFfykH310017fOUQ09IlW290GrK VuPMzb4NsRbA+3hEGGMHla/lE9WpCTDrrrAiKRB7/X8uNkX/L7Fd2q6qbzn+bcffDCdY/TnCoxFl7 3sm/fX0iuMc/GrEKtWskaQ==; Original-Received: from [87.69.77.57] (port=3099 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTktY-0004k9-31; Mon, 14 Mar 2022 09:37:56 -0400 In-Reply-To: <8735jkye2q.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 14 Mar 2022 12:21:33 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:228361 Archived-At: > From: Lars Ingebrigtsen > Date: Mon, 14 Mar 2022 12:21:33 +0100 > Cc: 13522@debbugs.gnu.org > > Vincent Lefevre writes: > > > 1. Create a file with: printf "\x80" > file > > 2. Open the file under X Window with: emacs -Q file > > 3. Modify the file e.g. by adding a space. > > 4. Type C-x C-s > > At this point, Emacs asks the user to select a coding system. > > 5. Type C-c in the terminal to kill Emacs. > > > > The result is that the file "file" is no longer there! > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > This problem is still present in Emacs 29 -- the file is moved to the > backup file before doing the prompt. Is it "C-c to kill Emacs" as in "terminate Emacs with a fatal signal", or is it "C-x C-c" as in "exit Emacs in an orderly fashion"? If the former, then in general killing a program when it is in the middle of writing files isn't guaranteed to preserve those files.