GNU bug report logs - #36160
25.2; Emacs does not ask to save modified files when shutting down OS

Previous Next

Package: emacs;

Reported by: Johan Pretorius <pretoriusjf <at> gmail.com>

Date: Mon, 10 Jun 2019 18:44:02 UTC

Severity: minor

Tags: notabug, wontfix

Found in version 25.2

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36160 in the body.
You can then email your comments to 36160 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Mon, 10 Jun 2019 18:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johan Pretorius <pretoriusjf <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 10 Jun 2019 18:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johan Pretorius <pretoriusjf <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; Emacs does not ask to save modified files when shutting down OS
Date: Mon, 10 Jun 2019 20:31:38 +0200
[Message part 1 (text/plain, inline)]
Hi there,

1. Open Emacs
2. Open some file in a buffer (C-x C-f)
3. Edit the buffer, DON'T save it to file
4. Shutdown computer (e.g. Ubuntu shutdown)
5. Start it back up again
6. Open the same file again
7. Look for the change you made... it's not there

The file is not saved during OS shutdown, nor is there any complaint
from Emacs in this situation.  It is about to lose data... It should
complain!

Regards,
Johan


In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2017-09-22, modified by Debian built on lgw01-amd64-050
Windowing system distributor 'The X.Org Foundation', version 11.0.12001000
System Description: Ubuntu 18.04.2 LTS

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=lucid
 --with-toolkit-scroll-bars --without-gsettings 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-jYekUr/emacs25-25.2+1=.
-fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11

Important settings:
  value of $LANG: en_ZA.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  org-indent-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: org-auto-fill-function
  transient-mark-mode: t

Recent messages:
Mark set
Saving file /home/johan/.emacs...
Wrote /home/johan/.emacs
(("d" "Daily Planning Agenda + Next Actions" ((agenda "" ...) (todo
"WAITING") (todo "STARTED") (todo "TODO"))) ("h" tags "@home") ("w" tags
"@work") ("o" tags "@onlinebanking") ("e" tags "@errands"))
Press key for agenda command: [2 times]
[a-z..]:Set [SPC]:clear
TODO state changed to DONE
Note stored
Mark set
Auto-saving...done

Load-path shadows:
/usr/share/emacs/25.2/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/home/johan/.emacs.d/elpa/org-9.2.3/ob hides
/usr/share/emacs/25.2/lisp/org/ob
/home/johan/.emacs.d/elpa/org-9.2.3/org-faces hides
/usr/share/emacs/25.2/lisp/org/org-faces
/home/johan/.emacs.d/elpa/org-9.2.3/ob-tangle hides
/usr/share/emacs/25.2/lisp/org/ob-tangle
/home/johan/.emacs.d/elpa/org-9.2.3/ox-ascii hides
/usr/share/emacs/25.2/lisp/org/ox-ascii
/home/johan/.emacs.d/elpa/org-9.2.3/ob-lisp hides
/usr/share/emacs/25.2/lisp/org/ob-lisp
/home/johan/.emacs.d/elpa/org-9.2.3/ob-picolisp hides
/usr/share/emacs/25.2/lisp/org/ob-picolisp
/home/johan/.emacs.d/elpa/org-9.2.3/ob-eval hides
/usr/share/emacs/25.2/lisp/org/ob-eval
/home/johan/.emacs.d/elpa/org-9.2.3/ob-ruby hides
/usr/share/emacs/25.2/lisp/org/ob-ruby
/home/johan/.emacs.d/elpa/org-9.2.3/ob-sql hides
/usr/share/emacs/25.2/lisp/org/ob-sql
/home/johan/.emacs.d/elpa/org-9.2.3/org-macs hides
/usr/share/emacs/25.2/lisp/org/org-macs
/home/johan/.emacs.d/elpa/org-9.2.3/org-attach hides
/usr/share/emacs/25.2/lisp/org/org-attach
/home/johan/.emacs.d/elpa/org-9.2.3/ox-latex hides
/usr/share/emacs/25.2/lisp/org/ox-latex
/home/johan/.emacs.d/elpa/org-9.2.3/org-id hides
/usr/share/emacs/25.2/lisp/org/org-id
/home/johan/.emacs.d/elpa/org-9.2.3/org-mouse hides
/usr/share/emacs/25.2/lisp/org/org-mouse
/home/johan/.emacs.d/elpa/org-9.2.3/ob-exp hides
/usr/share/emacs/25.2/lisp/org/ob-exp
/home/johan/.emacs.d/elpa/org-9.2.3/ox-beamer hides
/usr/share/emacs/25.2/lisp/org/ox-beamer
/home/johan/.emacs.d/elpa/org-9.2.3/org-habit hides
/usr/share/emacs/25.2/lisp/org/org-habit
/home/johan/.emacs.d/elpa/org-9.2.3/ox-texinfo hides
/usr/share/emacs/25.2/lisp/org/ox-texinfo
/home/johan/.emacs.d/elpa/org-9.2.3/ob-ditaa hides
/usr/share/emacs/25.2/lisp/org/ob-ditaa
/home/johan/.emacs.d/elpa/org-9.2.3/org-feed hides
/usr/share/emacs/25.2/lisp/org/org-feed
/home/johan/.emacs.d/elpa/org-9.2.3/ob-io hides
/usr/share/emacs/25.2/lisp/org/ob-io
/home/johan/.emacs.d/elpa/org-9.2.3/ob-shen hides
/usr/share/emacs/25.2/lisp/org/ob-shen
/home/johan/.emacs.d/elpa/org-9.2.3/ox-odt hides
/usr/share/emacs/25.2/lisp/org/ox-odt
/home/johan/.emacs.d/elpa/org-9.2.3/org-clock hides
/usr/share/emacs/25.2/lisp/org/org-clock
/home/johan/.emacs.d/elpa/org-9.2.3/ob-core hides
/usr/share/emacs/25.2/lisp/org/ob-core
/home/johan/.emacs.d/elpa/org-9.2.3/ob-org hides
/usr/share/emacs/25.2/lisp/org/ob-org
/home/johan/.emacs.d/elpa/org-9.2.3/org-loaddefs hides
/usr/share/emacs/25.2/lisp/org/org-loaddefs
/home/johan/.emacs.d/elpa/org-9.2.3/ob-plantuml hides
/usr/share/emacs/25.2/lisp/org/ob-plantuml
/home/johan/.emacs.d/elpa/org-9.2.3/ob-ledger hides
/usr/share/emacs/25.2/lisp/org/ob-ledger
/home/johan/.emacs.d/elpa/org-9.2.3/org-eshell hides
/usr/share/emacs/25.2/lisp/org/org-eshell
/home/johan/.emacs.d/elpa/org-9.2.3/ob-makefile hides
/usr/share/emacs/25.2/lisp/org/ob-makefile
/home/johan/.emacs.d/elpa/org-9.2.3/ob-sqlite hides
/usr/share/emacs/25.2/lisp/org/ob-sqlite
/home/johan/.emacs.d/elpa/org-9.2.3/org-archive hides
/usr/share/emacs/25.2/lisp/org/org-archive
/home/johan/.emacs.d/elpa/org-9.2.3/org-timer hides
/usr/share/emacs/25.2/lisp/org/org-timer
/home/johan/.emacs.d/elpa/org-9.2.3/ob-latex hides
/usr/share/emacs/25.2/lisp/org/ob-latex
/home/johan/.emacs.d/elpa/org-9.2.3/org-protocol hides
/usr/share/emacs/25.2/lisp/org/org-protocol
/home/johan/.emacs.d/elpa/org-9.2.3/org-irc hides
/usr/share/emacs/25.2/lisp/org/org-irc
/home/johan/.emacs.d/elpa/org-9.2.3/ob-lob hides
/usr/share/emacs/25.2/lisp/org/ob-lob
/home/johan/.emacs.d/elpa/org-9.2.3/ob-keys hides
/usr/share/emacs/25.2/lisp/org/ob-keys
/home/johan/.emacs.d/elpa/org-9.2.3/ob-R hides
/usr/share/emacs/25.2/lisp/org/ob-R
/home/johan/.emacs.d/elpa/org-9.2.3/ob-matlab hides
/usr/share/emacs/25.2/lisp/org/ob-matlab
/home/johan/.emacs.d/elpa/org-9.2.3/ob-java hides
/usr/share/emacs/25.2/lisp/org/ob-java
/home/johan/.emacs.d/elpa/org-9.2.3/ox-org hides
/usr/share/emacs/25.2/lisp/org/ox-org
/home/johan/.emacs.d/elpa/org-9.2.3/ob-comint hides
/usr/share/emacs/25.2/lisp/org/ob-comint
/home/johan/.emacs.d/elpa/org-9.2.3/ox-md hides
/usr/share/emacs/25.2/lisp/org/ox-md
/home/johan/.emacs.d/elpa/org-9.2.3/ob-C hides
/usr/share/emacs/25.2/lisp/org/ob-C
/home/johan/.emacs.d/elpa/org-9.2.3/ob-dot hides
/usr/share/emacs/25.2/lisp/org/ob-dot
/home/johan/.emacs.d/elpa/org-9.2.3/ob-js hides
/usr/share/emacs/25.2/lisp/org/ob-js
/home/johan/.emacs.d/elpa/org-9.2.3/org-inlinetask hides
/usr/share/emacs/25.2/lisp/org/org-inlinetask
/home/johan/.emacs.d/elpa/org-9.2.3/ob-haskell hides
/usr/share/emacs/25.2/lisp/org/ob-haskell
/home/johan/.emacs.d/elpa/org-9.2.3/org-info hides
/usr/share/emacs/25.2/lisp/org/org-info
/home/johan/.emacs.d/elpa/org-9.2.3/org-colview hides
/usr/share/emacs/25.2/lisp/org/org-colview
/home/johan/.emacs.d/elpa/org-9.2.3/org-rmail hides
/usr/share/emacs/25.2/lisp/org/org-rmail
/home/johan/.emacs.d/elpa/org-9.2.3/org-install hides
/usr/share/emacs/25.2/lisp/org/org-install
/home/johan/.emacs.d/elpa/org-9.2.3/org-src hides
/usr/share/emacs/25.2/lisp/org/org-src
/home/johan/.emacs.d/elpa/org-9.2.3/ob-emacs-lisp hides
/usr/share/emacs/25.2/lisp/org/ob-emacs-lisp
/home/johan/.emacs.d/elpa/org-9.2.3/org-mobile hides
/usr/share/emacs/25.2/lisp/org/org-mobile
/home/johan/.emacs.d/elpa/org-9.2.3/org-agenda hides
/usr/share/emacs/25.2/lisp/org/org-agenda
/home/johan/.emacs.d/elpa/org-9.2.3/org-bibtex hides
/usr/share/emacs/25.2/lisp/org/org-bibtex
/home/johan/.emacs.d/elpa/org-9.2.3/ob-css hides
/usr/share/emacs/25.2/lisp/org/ob-css
/home/johan/.emacs.d/elpa/org-9.2.3/ob-fortran hides
/usr/share/emacs/25.2/lisp/org/ob-fortran
/home/johan/.emacs.d/elpa/org-9.2.3/org-table hides
/usr/share/emacs/25.2/lisp/org/org-table
/home/johan/.emacs.d/elpa/org-9.2.3/ox-man hides
/usr/share/emacs/25.2/lisp/org/ox-man
/home/johan/.emacs.d/elpa/org-9.2.3/ob-maxima hides
/usr/share/emacs/25.2/lisp/org/ob-maxima
/home/johan/.emacs.d/elpa/org-9.2.3/org-plot hides
/usr/share/emacs/25.2/lisp/org/org-plot
/home/johan/.emacs.d/elpa/org-9.2.3/ox-icalendar hides
/usr/share/emacs/25.2/lisp/org/ox-icalendar
/home/johan/.emacs.d/elpa/org-9.2.3/org-macro hides
/usr/share/emacs/25.2/lisp/org/org-macro
/home/johan/.emacs.d/elpa/org-9.2.3/ob-ref hides
/usr/share/emacs/25.2/lisp/org/ob-ref
/home/johan/.emacs.d/elpa/org-9.2.3/ob-calc hides
/usr/share/emacs/25.2/lisp/org/ob-calc
/home/johan/.emacs.d/elpa/org-9.2.3/ox-html hides
/usr/share/emacs/25.2/lisp/org/ox-html
/home/johan/.emacs.d/elpa/org-9.2.3/org-pcomplete hides
/usr/share/emacs/25.2/lisp/org/org-pcomplete
/home/johan/.emacs.d/elpa/org-9.2.3/ob-ocaml hides
/usr/share/emacs/25.2/lisp/org/ob-ocaml
/home/johan/.emacs.d/elpa/org-9.2.3/ob-octave hides
/usr/share/emacs/25.2/lisp/org/ob-octave
/home/johan/.emacs.d/elpa/org-9.2.3/org-compat hides
/usr/share/emacs/25.2/lisp/org/org-compat
/home/johan/.emacs.d/elpa/org-9.2.3/org-w3m hides
/usr/share/emacs/25.2/lisp/org/org-w3m
/home/johan/.emacs.d/elpa/org-9.2.3/ob-mscgen hides
/usr/share/emacs/25.2/lisp/org/ob-mscgen
/home/johan/.emacs.d/elpa/org-9.2.3/org hides
/usr/share/emacs/25.2/lisp/org/org
/home/johan/.emacs.d/elpa/org-9.2.3/ob-sass hides
/usr/share/emacs/25.2/lisp/org/ob-sass
/home/johan/.emacs.d/elpa/org-9.2.3/org-gnus hides
/usr/share/emacs/25.2/lisp/org/org-gnus
/home/johan/.emacs.d/elpa/org-9.2.3/ob-scheme hides
/usr/share/emacs/25.2/lisp/org/ob-scheme
/home/johan/.emacs.d/elpa/org-9.2.3/org-list hides
/usr/share/emacs/25.2/lisp/org/org-list
/home/johan/.emacs.d/elpa/org-9.2.3/ob-perl hides
/usr/share/emacs/25.2/lisp/org/ob-perl
/home/johan/.emacs.d/elpa/org-9.2.3/org-entities hides
/usr/share/emacs/25.2/lisp/org/org-entities
/home/johan/.emacs.d/elpa/org-9.2.3/ob-gnuplot hides
/usr/share/emacs/25.2/lisp/org/ob-gnuplot
/home/johan/.emacs.d/elpa/org-9.2.3/org-ctags hides
/usr/share/emacs/25.2/lisp/org/org-ctags
/home/johan/.emacs.d/elpa/org-9.2.3/org-mhe hides
/usr/share/emacs/25.2/lisp/org/org-mhe
/home/johan/.emacs.d/elpa/org-9.2.3/org-indent hides
/usr/share/emacs/25.2/lisp/org/org-indent
/home/johan/.emacs.d/elpa/org-9.2.3/ob-clojure hides
/usr/share/emacs/25.2/lisp/org/ob-clojure
/home/johan/.emacs.d/elpa/org-9.2.3/org-element hides
/usr/share/emacs/25.2/lisp/org/org-element
/home/johan/.emacs.d/elpa/org-9.2.3/ox-publish hides
/usr/share/emacs/25.2/lisp/org/ox-publish
/home/johan/.emacs.d/elpa/org-9.2.3/org-capture hides
/usr/share/emacs/25.2/lisp/org/org-capture
/home/johan/.emacs.d/elpa/org-9.2.3/ob-screen hides
/usr/share/emacs/25.2/lisp/org/ob-screen
/home/johan/.emacs.d/elpa/org-9.2.3/ox hides
/usr/share/emacs/25.2/lisp/org/ox
/home/johan/.emacs.d/elpa/org-9.2.3/ob-asymptote hides
/usr/share/emacs/25.2/lisp/org/ob-asymptote
/home/johan/.emacs.d/elpa/org-9.2.3/org-datetree hides
/usr/share/emacs/25.2/lisp/org/org-datetree
/home/johan/.emacs.d/elpa/org-9.2.3/org-bbdb hides
/usr/share/emacs/25.2/lisp/org/org-bbdb
/home/johan/.emacs.d/elpa/org-9.2.3/ob-table hides
/usr/share/emacs/25.2/lisp/org/ob-table
/home/johan/.emacs.d/elpa/org-9.2.3/org-footnote hides
/usr/share/emacs/25.2/lisp/org/org-footnote
/home/johan/.emacs.d/elpa/org-9.2.3/org-docview hides
/usr/share/emacs/25.2/lisp/org/org-docview
/home/johan/.emacs.d/elpa/org-9.2.3/org-version hides
/usr/share/emacs/25.2/lisp/org/org-version
/home/johan/.emacs.d/elpa/org-9.2.3/ob-lilypond hides
/usr/share/emacs/25.2/lisp/org/ob-lilypond
/home/johan/.emacs.d/elpa/org-9.2.3/ob-awk hides
/usr/share/emacs/25.2/lisp/org/ob-awk
/home/johan/.emacs.d/elpa/org-9.2.3/ob-python hides
/usr/share/emacs/25.2/lisp/org/ob-python
/home/johan/.emacs.d/elpa/org-9.2.3/org-crypt hides
/usr/share/emacs/25.2/lisp/org/org-crypt

Features:
(shadow sort mail-extr emacsbug sendmail org-duration diary-lib
diary-loaddefs cal-iso org-agenda org-indent org-eww org-rmail org-mhe
org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range message rfc822 mml mml-sec
password-cache epg mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus
gnus-ems nnheader gnus-util mail-utils mm-util help-fns mail-prsvr
wid-edit org-docview doc-view subr-x jka-compr image-mode dired
org-bibtex bibtex org-bbdb org-w3m org-element cl-seq avl-tree org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src
ob-comint ob-keys org-pcomplete pcomplete comint ansi-color ring
org-list org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-compat advice org-macs org-loaddefs
format-spec find-func cal-menu calendar cal-loaddefs edmacro kmacro
finder-inf info package epg-config seq byte-opt gv bytecomp byte-compile
cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 307108 24519)
 (symbols 48 35164 0)
 (miscs 40 1144 1252)
 (strings 32 80327 8457)
 (string-bytes 1 2461597)
 (vectors 16 30104)
 (vector-slots 8 638129 15835)
 (floats 8 379 408)
 (intervals 56 5133 233)
 (buffers 976 30))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 13 Jun 2019 16:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Johan Pretorius <pretoriusjf <at> gmail.com>
Cc: 36160 <at> debbugs.gnu.org
Subject: Re: bug#36160: 25.2;
 Emacs does not ask to save modified files when shutting down OS
Date: Thu, 13 Jun 2019 11:59:41 -0400
Johan Pretorius wrote:

> 3. Edit the buffer, DON'T save it to file
> 4. Shutdown computer (e.g. Ubuntu shutdown)
> 5. Start it back up again
> 6. Open the same file again
> 7. Look for the change you made... it's not there
>
> The file is not saved during OS shutdown, nor is there any complaint
> from Emacs in this situation.  It is about to lose data... It should
> complain!

Does any editor complain in such a situation?
It would mean a user process could block a shutdown, which seems unlikely.

Anyway, this is the kind of thing auto-save files are for.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 13 Jun 2019 16:57:02 GMT) Full text and rfc822 format available.

Message #11 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 36160 <at> debbugs.gnu.org, Johan Pretorius <pretoriusjf <at> gmail.com>
Subject: Re: bug#36160: 25.2;
 Emacs does not ask to save modified files when shutting down OS
Date: Thu, 13 Jun 2019 18:56:42 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> Does any editor complain in such a situation?
> It would mean a user process could block a shutdown, which seems unlikely.

I've got an Apple machine at work, and when I try to reboot it, there
are frequently user processes that stop the process.  It's really
annoying.

So it's available on some systems...

I don't think Emacs wants to do that, but it could, like, listen to dbus
messages about being shut down and try to autosave some buffers, for
instance...  Perhaps?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 13 Jun 2019 17:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36160 <at> debbugs.gnu.org, Johan Pretorius <pretoriusjf <at> gmail.com>
Subject: Re: bug#36160: 25.2;
 Emacs does not ask to save modified files when shutting down OS
Date: Thu, 13 Jun 2019 13:36:21 -0400
Lars Ingebrigtsen wrote:

> but it could, like, listen to dbus messages about being shut down and
> try to autosave some buffers, for instance... Perhaps?

Shutdown sends SIGTERM, so Emacs could (auto)save on receipt of that
signal (if it doesn't already do so?).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 13 Jun 2019 18:57:01 GMT) Full text and rfc822 format available.

Message #17 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36160 <at> debbugs.gnu.org, Johan Pretorius <pretoriusjf <at> gmail.com>
Subject: Re: bug#36160: 25.2;
 Emacs does not ask to save modified files when shutting down OS
Date: Thu, 13 Jun 2019 14:56:31 -0400
Glenn Morris wrote:

> Shutdown sends SIGTERM, so Emacs could (auto)save on receipt of that
> signal (if it doesn't already do so?).

And SIGTERM triggers kill-emacs, which runs kill-emacs-hook, so if you
want some (unprompted) saving, you could do it with that hook.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 13 Jun 2019 19:26:02 GMT) Full text and rfc822 format available.

Message #20 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 36160 <at> debbugs.gnu.org, larsi <at> gnus.org, pretoriusjf <at> gmail.com
Subject: Re: bug#36160: 25.2;
 Emacs does not ask to save modified files when shutting down OS
Date: Thu, 13 Jun 2019 22:24:32 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Thu, 13 Jun 2019 13:36:21 -0400
> Cc: 36160 <at> debbugs.gnu.org, Johan Pretorius <pretoriusjf <at> gmail.com>
> 
> Shutdown sends SIGTERM, so Emacs could (auto)save on receipt of that
> signal (if it doesn't already do so?).

AFAIU, we don't: we just call kill-emacs.

But how to distinguish SIGTERM due to system shutdown and SIGTERM when
the user triggers the signal?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 13 Jun 2019 19:39:02 GMT) Full text and rfc822 format available.

Message #23 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36160 <at> debbugs.gnu.org, larsi <at> gnus.org, pretoriusjf <at> gmail.com
Subject: Re: bug#36160: 25.2;
 Emacs does not ask to save modified files when shutting down OS
Date: Thu, 13 Jun 2019 15:38:09 -0400
Eli Zaretskii wrote:

> But how to distinguish SIGTERM due to system shutdown and SIGTERM when
> the user triggers the signal?

I don't think one can, or should.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Wed, 26 Aug 2020 00:47:02 GMT) Full text and rfc822 format available.

Message #26 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 36160 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org,
 pretoriusjf <at> gmail.com
Subject: Re: bug#36160: 25.2; Emacs does not ask to save modified files when
 shutting down OS
Date: Tue, 25 Aug 2020 17:46:44 -0700
Glenn Morris <rgm <at> gnu.org> writes:

> Eli Zaretskii wrote:
>
>> But how to distinguish SIGTERM due to system shutdown and SIGTERM when
>> the user triggers the signal?
>
> I don't think one can, or should.

Is this therefore a wontfix?  We already have auto-save files, as Glenn
pointed out.

(FWIW, It seems to me that we would need a solution for this on a
GNU/Linux level before we can do something in Emacs.  And AFAIK there is
no way for a user level program to halt a system halt.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Wed, 26 Aug 2020 06:16:01 GMT) Full text and rfc822 format available.

Message #29 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: rgm <at> gnu.org, larsi <at> gnus.org, pretoriusjf <at> gmail.com, 36160 <at> debbugs.gnu.org
Subject: Re: bug#36160: 25.2; Emacs does not ask to save modified files when
 shutting down OS
Date: Wed, 26 Aug 2020 09:14:50 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Tue, 25 Aug 2020 17:46:44 -0700
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 36160 <at> debbugs.gnu.org, larsi <at> gnus.org, 
> 	pretoriusjf <at> gmail.com
> 
> Glenn Morris <rgm <at> gnu.org> writes:
> 
> > Eli Zaretskii wrote:
> >
> >> But how to distinguish SIGTERM due to system shutdown and SIGTERM when
> >> the user triggers the signal?
> >
> > I don't think one can, or should.
> 
> Is this therefore a wontfix?

I guess so.

> (FWIW, It seems to me that we would need a solution for this on a
> GNU/Linux level before we can do something in Emacs.  And AFAIK there is
> no way for a user level program to halt a system halt.)

I think we support the session management protocol for this, see
xsmfns.c.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36160; Package emacs. (Thu, 27 Aug 2020 06:17:02 GMT) Full text and rfc822 format available.

Message #32 received at 36160 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rgm <at> gnu.org, larsi <at> gnus.org, pretoriusjf <at> gmail.com, 36160 <at> debbugs.gnu.org
Subject: Re: bug#36160: 25.2; Emacs does not ask to save modified files when
 shutting down OS
Date: Wed, 26 Aug 2020 23:16:34 -0700
tags 36160 + wontfix notabug
close 36160
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

>> Is this therefore a wontfix?
>
> I guess so.

Thanks.  I'm therefore closing this bug report now.




Added tag(s) notabug and wontfix. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 27 Aug 2020 06:17:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 36160 <at> debbugs.gnu.org and Johan Pretorius <pretoriusjf <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 27 Aug 2020 06:17:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Sep 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.