unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 13522@debbugs.gnu.org, vincent@vinc17.net
Subject: bug#13522: 24.2; save-buffer removes edited file under some conditions
Date: Mon, 14 Mar 2022 16:05:43 +0200	[thread overview]
Message-ID: <83fsnkk4so.fsf@gnu.org> (raw)
In-Reply-To: <87sfrkwsy5.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon,  14 Mar 2022 14:43:14 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: vincent@vinc17.net,  13522@debbugs.gnu.org
> Date: Mon, 14 Mar 2022 14:43:14 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > 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.
> 
> It's the former (sort of).
> 
> 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.





  reply	other threads:[~2022-03-14 14:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22  1:47 bug#13522: 24.2; save-buffer removes edited file under some conditions Vincent Lefevre
2013-01-24 20:28 ` Glenn Morris
2013-01-25  0:02   ` Vincent Lefevre
2013-01-25  0:48     ` Glenn Morris
2013-01-25  7:35       ` Eli Zaretskii
2013-01-25  8:07         ` Glenn Morris
2013-01-30  8:59           ` Glenn Morris
2013-01-30 19:34             ` Stefan Monnier
2013-01-31  6:36               ` Glenn Morris
2014-08-11  1:06                 ` Glenn Morris
2022-03-14 11:21 ` Lars Ingebrigtsen
2022-03-14 13:37   ` Eli Zaretskii
2022-03-14 13:43     ` Lars Ingebrigtsen
2022-03-14 14:05       ` Eli Zaretskii [this message]
2022-03-14 15:20         ` Vincent Lefevre
2022-03-14 17:02           ` Eli Zaretskii
2022-03-14 17:32             ` Vincent Lefevre
2022-03-15 11:42         ` Lars Ingebrigtsen
2022-03-15 14:23           ` Eli Zaretskii
2022-03-15 14:25             ` Lars Ingebrigtsen
2022-03-15 15:55               ` Vincent Lefevre
2022-04-30 16:47                 ` Lars Ingebrigtsen
2022-04-30 16:51                   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fsnkk4so.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=13522@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=vincent@vinc17.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).