From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#13522: 24.2; save-buffer removes edited file under some conditions Date: Tue, 15 Mar 2022 12:42:37 +0100 Message-ID: <87ee33wifm.fsf@gnus.org> References: <87622qaszq.fsf@xvii.vinc17.org> <8735jkye2q.fsf@gnus.org> <83mthsk63c.fsf@gnu.org> <87sfrkwsy5.fsf@gnus.org> <83fsnkk4so.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7757"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 13522@debbugs.gnu.org, vincent@vinc17.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 15 12:50:56 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 1nU5hX-0001hc-U9 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Mar 2022 12:50:56 +0100 Original-Received: from localhost ([::1]:43508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nU5hU-0004wO-JB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Mar 2022 07:50:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nU5Zu-00026w-6O for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 07:43:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nU5Zt-0003n2-Tx for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 07:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nU5Zt-0005Uf-Pz for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2022 07:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Mar 2022 11:43: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.164734457221102 (code B ref 13522); Tue, 15 Mar 2022 11:43:01 +0000 Original-Received: (at 13522) by debbugs.gnu.org; 15 Mar 2022 11:42:52 +0000 Original-Received: from localhost ([127.0.0.1]:47755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU5Zk-0005UI-1b for submit@debbugs.gnu.org; Tue, 15 Mar 2022 07:42:52 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nU5Zi-0005Tz-28 for 13522@debbugs.gnu.org; Tue, 15 Mar 2022 07:42:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ds7L9K3JV2jE5oc2W+UFQs0m7BH337Hqragt6UDrDmE=; b=SkW9MTRAMK7YeWqqOqI+jO83s2 dRjhf7u9reHoK3ubIK4Kds0bdkrKc51Sl5QL4O3UrVR0xT/xwEbQBq9qDyR8vJq4DRFPLYBHhhWyG bzzIEa9VWtIWB8EwyNBpIzO/g0E9M1Z97d8g7ZnSxdjqh+x7dJPdKCOIkUhFL0HeO8c4=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nU5ZY-0002Gh-2s; Tue, 15 Mar 2022 12:42:42 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEUtEAgMCAMyLCVc HA+dKhXQNBrlOhyXk4lZWVH1QyH///8/dARjAAAAAWJLR0QKaND0VgAAAAd0SU1FB+YDDwskObGy vvYAAAGRSURBVDjLjZKxbtswEIZ5kWx0vAOd7JGHdiRBJkA3GTwR8BbApPaiVl7BHdss0VggQJ+3 lBIkkkwDOVGCqE+8/+4nhUhBQMMYA8UYV4IuxKeAZJcHmxjrfCq2LgvQFnlgG+b3sqegLuNB6gww Nugyt0JYp01Oo2CnNZVNgAUo2QmQbfd4WFYVHcC6Y/uoZwA5pDaawJZ3ixVcEzrLztQLr5wmjEMc FpbsCLDrmLufcwBpgjFYbh7m4lCkp2dmvxAnle7rLnYdLLcW02het2smPhoorVl4JVBNHcXTr1P/ fPqTFJBmoKq2v7fmllAZqTCVli6BQypumnvWtF799ent7uiOYb/SgrR/uWmZxPouHPH+3ybwj+9t m0AMjd+z9r5tvd+vQnw5hrBPoNBSSQNSGVEnfVWABMBpucV4dL72T33/3N9O+xgb+1I9VdW3Cman hDITBATKgfS1hAzAwYNdBow/m0tglmsKrvUFsLkIzlPJce/kufhGqbdDMgeoqUj+njc4uFGovCVn IT6Kos+t+A/9H3V61JWcPAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wMy0xNVQxMTozNjo1Nysw MDowMCVHIdEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDMtMTVUMTE6MzY6NTcrMDA6MDBUGplt AAAAAElFTkSuQmCC X-Now-Playing: Joe Jackson's _Body and Soul_: "Go for It" In-Reply-To: <83fsnkk4so.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 14 Mar 2022 16:05:43 +0200") 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:228404 Archived-At: Eli Zaretskii writes: >> And, yes, we make no guarantees, but the present situation doesn't seem >> optimal. The user may well hit `C-z' at the prompt and wonder where the >> file disappeared to. > > That's in the "if it hurts, don't do that" department, IMO. SIGINT is > a fatal signal, and our response to fatal signals cannot be too > fancy. We just auto-save what we can and commit suicide. Even that > is disliked by some, who say we cannot safely do anything non-trivial > from a fatal signal handler -- and they are absolutely right, we do > stuff that invokes undefined behavior. I agree that killing Emacs is unusual. But suspending Emacs (with `C-z') is something people do all the time, and in this case, if the user is suspending Emacs on this prompt, they might be doing that to examine the file before saving it, for instance. And then they'll be confused that it's apparently gone. So I think we should fix this, perhaps the way Glenn suggested in his patch, but it's obviously not high priority. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no