unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP
@ 2020-02-25 19:22 Ed Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-02-28  4:46 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Ed Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-02-25 19:22 UTC (permalink / raw)
  To: 39791


If I ssh to a remote server and start Emacs and my ssh connection is severed
sometime thereafter, causing the remote emacs process to be terminated with
SIGHUP, the auto-save-list-file-name file is deleted. I find this very
undesirable. If there's an option to change this behavior, I can't find one.

The Emacs manual says this about 'auto-save-list-file-name':

    When Emacs exits normally, it deletes this file; if Emacs crashes, you
    can look in the file to find all the auto-save files that might contain
    work that was otherwise lost. The recover-session command uses this file
    to find them.

Older versions of Emacs apparently had a different definition of "when Emacs
exits normally" compared to Emacs 26.x. Emacs 21.x, for example, does not
delete the auto-save-list-file-name file when the ssh connection is severed
and a remote emacs process is killed with SIGHUP.


In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit)
 of 2019-11-19 built on heabox
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description:	Scientific Linux release 7.7 (Nitrogen)

Recent messages:
Counting new messages...done (11)
Saving file /Home/lhea2/sabol/Mail/RMAIL...
Wrote /Home/lhea2/sabol/Mail/RMAIL [2 times]
Computing summary lines...done
11 new messages read
Showing message 6160...done
Showing message 6160...done
Computing summary lines...done
Showing message 6160...done
Showing message 6160...done

Configured using:
 'configure --prefix=/software/usr/contrib
 --exec-prefix=/software/usr/contrib/linux-7.x --with-x-toolkit=lucid
 --with-xft=yes --with-toolkit-scroll-bars=no --with-jpeg=no --with-gif=no
 --with-tiff=no --with-gnutls=no'

Configured features:
XAW3D XPM PNG SOUND GSETTINGS GLIB NOTIFY LIBSELINUX LIBXML2 FREETYPE XFT
ZLIB LUCID X11 XDBE XIM THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: RMAIL

Minor modes in effect:
  show-paren-mode: t
  diff-auto-refine-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/software/usr/contrib/share/emacs/26.x/site-lisp/dockerfile-mode hides /Home/lhea2/sabol/.emacs.d/elpa/dockerfile-mode-1.2/dockerfile-mode
/software/usr/contrib/share/emacs/26.x/site-lisp/perlcritic hides /software/usr/contrib/share/emacs/site-lisp/perlcritic
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-region hides /software/usr/contrib/share/emacs/site-lisp/mmm-region
/software/usr/contrib/share/emacs/26.x/site-lisp/tidy hides /software/usr/contrib/share/emacs/site-lisp/tidy
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-vars hides /software/usr/contrib/share/emacs/site-lisp/mmm-vars
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-noweb hides /software/usr/contrib/share/emacs/site-lisp/mmm-noweb
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-utils hides /software/usr/contrib/share/emacs/site-lisp/mmm-utils
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-cweb hides /software/usr/contrib/share/emacs/site-lisp/mmm-cweb
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-univ hides /software/usr/contrib/share/emacs/site-lisp/mmm-univ
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-rpm hides /software/usr/contrib/share/emacs/site-lisp/mmm-rpm
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-mason hides /software/usr/contrib/share/emacs/site-lisp/mmm-mason
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-sample hides /software/usr/contrib/share/emacs/site-lisp/mmm-sample
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-mode hides /software/usr/contrib/share/emacs/site-lisp/mmm-mode
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-cmds hides /software/usr/contrib/share/emacs/site-lisp/mmm-cmds
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-class hides /software/usr/contrib/share/emacs/site-lisp/mmm-class
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-compat hides /software/usr/contrib/share/emacs/site-lisp/mmm-compat
/Home/lhea2/sabol/.emacs.d/elpa/mmm-mode-0.5.7/mmm-auto hides /software/usr/contrib/share/emacs/site-lisp/mmm-auto
/software/usr/contrib/share/emacs/26.x/site-lisp/mode-compile hides /software/usr/contrib/share/emacs/site-lisp/mode-compile
/software/usr/contrib/share/emacs/26.x/site-lisp/heasarc-info-mode hides /software/usr/contrib/share/emacs/site-lisp/heasarc-info-mode
/software/usr/contrib/share/emacs/26.x/site-lisp/simple-vc hides /software/usr/contrib/share/emacs/site-lisp/simple-vc
/software/usr/contrib/share/emacs/site-lisp/css-mode hides /software/usr/contrib/share/emacs/26.3/lisp/textmodes/css-mode
/software/usr/contrib/share/emacs/site-lisp/flymake hides /software/usr/contrib/share/emacs/26.3/lisp/progmodes/flymake

Features:
(shadow emacsbug timezone supercite regi shr svg xml dom rmailedit ediff-merg
ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff
misearch multi-isearch thingatpt browse-url mailalias mail-hist sendmail pp
qp rmailsum rmailmm elec-pair dockerfile-mode sh-script smie paren psvn
wid-edit cl log-edit message rmc puny format-spec rfc822 mml mml-sec epa
derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils
mailheader ring add-log diff-mode executable mmm-auto mmm-vars mmm-utils
mmm-compat imenu mm-util mail-prsvr time advice server restart-session dired
dired-loaddefs pcvs vc-cvs pcvs-parse pcvs-info pcvs-defs easy-mmode
pcvs-util ewoc finder-inf package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment text-mode
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors 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
composite charscript charprop case-table epa-hook jka-cmpr-hook help simple
abbrev obarray 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 threads inotify
dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 379469 51859)
 (symbols 48 30798 1)
 (miscs 40 22680 2028)
 (strings 32 130632 7938)
 (string-bytes 1 5000024)
 (vectors 16 27350)
 (vector-slots 8 908124 38718)
 (floats 8 169 201)
 (intervals 56 5696 714)
 (buffers 992 41)
 (heap 1024 73900 6861))





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP
  2020-02-25 19:22 bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP Ed Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-02-28  4:46 ` Eli Zaretskii
  2020-02-28 19:43   ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-02-28  4:46 UTC (permalink / raw)
  To: Ed Sabol, Ed Sabol; +Cc: 39791

> Date: Tue, 25 Feb 2020 14:22:44 -0500 (EST)
> From: Ed Sabol via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> If I ssh to a remote server and start Emacs and my ssh connection is severed
> sometime thereafter, causing the remote emacs process to be terminated with
> SIGHUP, the auto-save-list-file-name file is deleted. I find this very
> undesirable. If there's an option to change this behavior, I can't find one.

Emacs deletes auto-save-list-file-name upon SIGHUP because it performs
auto-save.  Since auto-saving was done, what would be the purpose of
keeping auto-save-list-file-name?  That variable is only for when
auto-saving wasn't performed on exit.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP
  2020-02-28  4:46 ` Eli Zaretskii
@ 2020-02-28 19:43   ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-02-28 23:03     ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-02-28 19:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 39791

>> If I ssh to a remote server and start Emacs and my ssh connection is
>> severed sometime thereafter, causing the remote emacs process to be
>> terminated with SIGHUP, the auto-save-list-file-name file is deleted. I
>> find this very undesirable. If there's an option to change this behavior,
>> I can't find one.
>
> Emacs deletes auto-save-list-file-name upon SIGHUP because it performs
> auto-save. Since auto-saving was done, what would be the purpose of
> keeping auto-save-list-file-name? That variable is only for when
> auto-saving wasn't performed on exit.

Well, that's not the only thing that file is good for. For decades, I have
used the auto-save-list-file-name file to re-open all the files I had open in
the terminated Emacs process when my remote connections are severed. It's
been abundantly useful over the years. It's a shame to lose such
functionality. Just my two cents.

Regards,
Ed





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP
  2020-02-28 19:43   ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-02-28 23:03     ` Stefan Kangas
  2020-03-02 23:35       ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2020-02-28 23:03 UTC (permalink / raw)
  To: Edward J. Sabol; +Cc: Ed Sabol, 39791

"Edward J. Sabol" <edward.j.sabol@nasa.gov> writes:

> For decades, I have used the auto-save-list-file-name file to
> re-open all the files I had open in the terminated Emacs process
> when my remote connections are severed. It's been abundantly useful
> over the years. It's a shame to lose such functionality.

Have you ever tried desktop-save-mode?  Perhaps that would be a good
fit for your use case.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP
  2020-02-28 23:03     ` Stefan Kangas
@ 2020-03-02 23:35       ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-08-27 10:29         ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-03-02 23:35 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: eliz, 39791

> Have you ever tried desktop-save-mode? Perhaps that would be a good
> fit for your use case.

Thank you for the suggestion, Stefan. I've looked at desktop-save-mode in the
past, but I haven't tried it. From what I recalled, it seemed to save and
restore things which I don't really want restored (like variables?!), and I
think it only works with a single session. But maybe I can fix that by
changing the desktop-save-mode save file on a per-host basis. I'll look into
it further.

I still don't think the auto-save-list-file-name file should be deleted on
SIGHUP, but I won't be offended if you close this bug as "won't fix" or some
such, assuming you all disagree.

Regards,
Ed





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP
  2020-03-02 23:35       ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-08-27 10:29         ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2020-08-27 10:29 UTC (permalink / raw)
  To: Ed Sabol, Edward J. Sabol; +Cc: 39791

tags 39791 + wontfix notabug
close 39791
thanks

"Edward J. Sabol" via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@gnu.org> writes:

>> Have you ever tried desktop-save-mode? Perhaps that would be a good
>> fit for your use case.
>
> Thank you for the suggestion, Stefan. I've looked at desktop-save-mode in the
> past, but I haven't tried it. From what I recalled, it seemed to save and
> restore things which I don't really want restored (like variables?!), and I
> think it only works with a single session. But maybe I can fix that by
> changing the desktop-save-mode save file on a per-host basis. I'll look into
> it further.

You could try customizing `desktop-globals-to-save' and
`desktop-locals-to-save' to match your needs.

For different sessions, you could look into `desktop-dirname'.

> I still don't think the auto-save-list-file-name file should be deleted on
> SIGHUP, but I won't be offended if you close this bug as "won't fix" or some
> such, assuming you all disagree.

I think this sounds like a wontfix, indeed.  So I'm closing this bug now.

If you find that any features you need for your use case is missing from
desktop.el, I would encourage you to send feature requests to this list.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-27 10:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-25 19:22 bug#39791: 26.3; auto-save-list-file-name should not be deleted when Emacs is terminated by SIGHUP Ed Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-02-28  4:46 ` Eli Zaretskii
2020-02-28 19:43   ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-02-28 23:03     ` Stefan Kangas
2020-03-02 23:35       ` Edward J. Sabol via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-27 10:29         ` Stefan Kangas

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).