[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13522: 24.2; save-buffer removes edited file under some conditions
From: |
Eli Zaretskii |
Subject: |
bug#13522: 24.2; save-buffer removes edited file under some conditions |
Date: |
Mon, 14 Mar 2022 16:05:43 +0200 |
> 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.
- bug#13522: 24.2; save-buffer removes edited file under some conditions, Lars Ingebrigtsen, 2022/03/14
- bug#13522: 24.2; save-buffer removes edited file under some conditions, Eli Zaretskii, 2022/03/14
- bug#13522: 24.2; save-buffer removes edited file under some conditions, Lars Ingebrigtsen, 2022/03/15
- bug#13522: 24.2; save-buffer removes edited file under some conditions, Eli Zaretskii, 2022/03/15
- bug#13522: 24.2; save-buffer removes edited file under some conditions, Lars Ingebrigtsen, 2022/03/15
- bug#13522: 24.2; save-buffer removes edited file under some conditions, Vincent Lefevre, 2022/03/15