all messages for Emacs-related lists mirrored at yhetil.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: Tue, 15 Mar 2022 16:23:42 +0200	[thread overview]
Message-ID: <83tubzi9ap.fsf@gnu.org> (raw)
In-Reply-To: <87ee33wifm.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue,  15 Mar 2022 12:42:37 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: vincent@vinc17.net,  13522@debbugs.gnu.org
> Date: Tue, 15 Mar 2022 12:42:37 +0100
> 
> Eli Zaretskii <eliz@gnu.org> 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.

Does the problem actually happen if you type C-z?  Emacs is not dead
in that case, just suspended.  Type "fg RET", and you are back inside
Emacs, and can pick up where you left off.  Right?

> So I think we should fix this, perhaps the way Glenn suggested in his
> patch, but it's obviously not high priority.

I'm not against making this particular scenario have a smaller window
of opportunity (if the solution is clean), but it will still be
possible to cause similar problems by using SIGINT or any other signal
during this and other similar procedures that aren't atomic.





  reply	other threads:[~2022-03-15 14:23 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
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 [this message]
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

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

  git send-email \
    --in-reply-to=83tubzi9ap.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.