GNU bug report logs - #38875
26.2; auto-save-list-file-name still created when auto-save-default is nil

Previous Next

Package: emacs;

Reported by: João Guerra <joca.bt <at> gmail.com>

Date: Thu, 2 Jan 2020 18:27:02 UTC

Severity: normal

Found in version 26.2

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

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 38875 in the body.
You can then email your comments to 38875 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#38875; Package emacs. (Thu, 02 Jan 2020 18:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to João Guerra <joca.bt <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Jan 2020 18:27:02 GMT) Full text and rfc822 format available.

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

From: João Guerra <joca.bt <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; auto-save-list-file-name still created when auto-save-default
 is nil
Date: Thu, 2 Jan 2020 19:26:15 +0100
auto-save-list-file-name is still created in the file system when
auto-save-default is nil. This behaviour is a bit annoying since Emacs
will always create a lingering file that will end up not using.

My configuration is as follows:

;; disable auto save
(setq auto-save-default nil
      auto-save-list-file-name (concat +backups-dir+ (format
".auto-save-%s" (emacs-pid))))

If the user wants to disable auto save then nothing should be created in
the file system. What's the point in Emacs maintaining this file in this
situation?

In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13 built on CIRROCUMULUS
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor 'Microsoft Corp.', version 10.0.18363
Recent messages:
Quit
Mark set
Send this bug report to the Emacs maintainers? (y or n) y
Sending...
Mark set [2 times]
Sending via mail...
mwheel-scroll: Beginning of buffer [2 times]
smtpmail-query-smtp-server: Command attempted to use minibuffer while
in minibuffer
mwheel-scroll: Beginning of buffer [3 times]
Buffer *unsent mail to bug-gnu-emacs <at> gnu.org* modified; kill anyway? (y or n) y

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: PTG
  locale-coding-system: cp1252

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  cua-mode: t
  save-place-mode: t
  savehist-mode: t
  desktop-save-mode: t
  recentf-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  show-smartparens-global-mode: t
  show-smartparens-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  projectile-mode: t
  flycheck-pos-tip-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  global-company-mode: t
  company-mode: t
  ws-butler-global-mode: t
  ws-butler-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  ivy-mode: t
  delete-selection-mode: t
  amx-mode: t
  tabbar-mode: t
  shackle-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(network-stream nsm starttls tls gnutls mailalias smtpmail cus-edit
cus-start cus-load shadow sort mail-extr emacsbug message rmc puny
rfc822 mml mml-sec epa epg gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
cl-print eieio-opt speedbar sb-image ezimage dframe macrostep-c cmacexp
misearch multi-isearch bug-reference help-fns radix-tree windmove ffap
tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time format-spec vc-git diff-mode set-key-bindings set-xml
set-perl set-lisp slime-indentation slime-cl-indent cl-indent
slime-banner slime-fancy slime-trace-dialog slime-fontifying-fu
slime-package-fu slime-references slime-compiler-notes-tree
slime-scratch slime-presentations bridge slime-macrostep slime-mdot-fu
slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-repl slime-parse set-tools set-programming company-keywords
company-dabbrev-code company-dabbrev company-capf company-elisp
set-navigation set-editing cua-base set-session saveplace savehist
desktop frameset set-backups set-files recentf tree-widget wid-edit
set-ivy set-ui set-mode-line let-alist display-line-numbers
set-file-tabs set-title-bar set-theme ample-theme set-startup
set-packages smartparens-config smartparens-javascript smartparens-text
smartparens-html server mode-local yaml-mode slime-company slime etags
xref project arc-mode archive-mode hyperspec browse-url puppet-mode
align protobuf-mode macrostep pp json-mode json-reformat json-snatcher
js-mode-expansions js html-mode-expansions sgml-mode dom imenu
cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs restclient noutline outline url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap regex-tool face-explorer ag vc-svn derived
find-dired dired dired-loaddefs smartparens projectile grep compile
comint ansi-color ibuf-ext ibuffer ibuffer-loaddefs flycheck-pos-tip
flycheck json map find-func subr-x dash company-quickhelp pos-tip
company pcase swiper cl-extra help-mode ws-butler undo-tree diff
multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect expand-region
text-mode-expansions er-basic-expansions thingatpt expand-region-core
advice expand-region-custom ivy delsel ring colir color ivy-overlay flx
amx edmacro kmacro s tabbar easy-mmode shackle trace diminish finder-inf
rx slime-autoloads info 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 elec-pair time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
disp-table term/w32-win w32-win w32-vars term/common-win 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 w32notify w32
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 667152 184158)
 (symbols 48 46141 77)
 (miscs 40 121 998)
 (strings 32 161059 3861)
 (string-bytes 1 4302736)
 (vectors 16 86786)
 (vector-slots 8 1742789 45638)
 (floats 8 301 475)
 (intervals 56 1200 1432)
 (buffers 992 24))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 18:56:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Guerra <joca.bt <at> gmail.com>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2;
 auto-save-list-file-name still created when auto-save-default is nil
Date: Thu, 02 Jan 2020 20:55:44 +0200
> From: João Guerra <joca.bt <at> gmail.com>
> Date: Thu, 2 Jan 2020 19:26:15 +0100
> 
> auto-save-list-file-name is still created in the file system when
> auto-save-default is nil. This behaviour is a bit annoying since Emacs
> will always create a lingering file that will end up not using.
> 
> My configuration is as follows:
> 
> ;; disable auto save
> (setq auto-save-default nil
>       auto-save-list-file-name (concat +backups-dir+ (format
> ".auto-save-%s" (emacs-pid))))

I seem to be unable to reproduce this.  You are saying that just
starting Emacs with the above settings causes the
auto-save-list-file-name to appear in the file system?  It doesn't
seem to happen here.

In any case, you supposed to customize auto-save-list-file-prefix, not
auto-save-list-file-name directly.  Setting auto-save-list-file-prefix
to nil will prevent Emacs from initializing auto-save-list-file-name.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 19:10:01 GMT) Full text and rfc822 format available.

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

From: João Guerra <joca.bt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 2 Jan 2020 20:08:55 +0100
> I seem to be unable to reproduce this.  You are saying that just
> starting Emacs with the above settings causes the
> auto-save-list-file-name to appear in the file system?  It doesn't
> seem to happen here.

Just starting Emacs and waiting auto-save-timeout will create the
file. Setting auto-save-list-file-prefix to nil does make the file not
be created. I was setting auto-save-list-file-name to a directory
where it doesn't get in the way. Thanks!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 19:20:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Guerra <joca.bt <at> gmail.com>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 02 Jan 2020 21:19:45 +0200
> From: João Guerra <joca.bt <at> gmail.com>
> Date: Thu, 2 Jan 2020 20:08:55 +0100
> Cc: 38875 <at> debbugs.gnu.org
> 
> Setting auto-save-list-file-prefix to nil does make the file not
> be created. I was setting auto-save-list-file-name to a directory
> where it doesn't get in the way. Thanks!

Does this means we can close this bug report?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 19:28:01 GMT) Full text and rfc822 format available.

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

From: João Guerra <joca.bt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 2 Jan 2020 20:26:42 +0100
On Thu, 2 Jan 2020 at 20:19, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: João Guerra <joca.bt <at> gmail.com>
> > Date: Thu, 2 Jan 2020 20:08:55 +0100
> > Cc: 38875 <at> debbugs.gnu.org
> >
> > Setting auto-save-list-file-prefix to nil does make the file not
> > be created. I was setting auto-save-list-file-name to a directory
> > where it doesn't get in the way. Thanks!
>
> Does this means we can close this bug report?

For me yes. I still find a bit confusing that setting
auto-save-default to nil isn't enough to disable this but there's
probably something else going on that I am unaware of.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 02 Jan 2020 20:01:01 GMT) Full text and rfc822 format available.

Notification sent to João Guerra <joca.bt <at> gmail.com>:
bug acknowledged by developer. (Thu, 02 Jan 2020 20:01:01 GMT) Full text and rfc822 format available.

Message #22 received at 38875-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Guerra <joca.bt <at> gmail.com>
Cc: 38875-done <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 02 Jan 2020 22:00:08 +0200
> From: João Guerra <joca.bt <at> gmail.com>
> Date: Thu, 2 Jan 2020 20:26:42 +0100
> Cc: 38875 <at> debbugs.gnu.org
> 
> > Does this means we can close this bug report?
> 
> For me yes.

Done.

> I still find a bit confusing that setting
> auto-save-default to nil isn't enough to disable this

Like I said: it does disable creating the file for me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 20:18:02 GMT) Full text and rfc822 format available.

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

From: João Guerra <joca.bt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 2 Jan 2020 21:16:26 +0100
> Like I said: it does disable creating the file for me.

Try `emacs -q -l test.el` with test.el:

(setq auto-save-default nil)

wait a bit and `~/.emacs.d/auto-save-list/.saves-<pid>-<hostname>~`
will be created.

Tried on
GNU Emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13
and
GNU Emacs 27.0.60 (build 1, x86_64-w64-mingw32) of 2019-12-28




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 20:26:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Guerra <joca.bt <at> gmail.com>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 02 Jan 2020 22:24:57 +0200
> From: João Guerra <joca.bt <at> gmail.com>
> Date: Thu, 2 Jan 2020 21:16:26 +0100
> Cc: 38875 <at> debbugs.gnu.org
> 
> > Like I said: it does disable creating the file for me.
> 
> Try `emacs -q -l test.el` with test.el:
> 
> (setq auto-save-default nil)
> 
> wait a bit and `~/.emacs.d/auto-save-list/.saves-<pid>-<hostname>~`
> will be created.

That's exactly what I did, except that these settings were in ~/.emacs
and not loaded after startup.  I waited for 30 seconds, and didn't see
any auto-save-list file in ~/.emacs.d/.  Not sure why it happens for
you.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Thu, 02 Jan 2020 21:11:02 GMT) Full text and rfc822 format available.

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

From: João Guerra <joca.bt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Thu, 2 Jan 2020 22:09:59 +0100
> > From: João Guerra <joca.bt <at> gmail.com>
> > Date: Thu, 2 Jan 2020 21:16:26 +0100
> > Cc: 38875 <at> debbugs.gnu.org
> >
> > > Like I said: it does disable creating the file for me.
> >
> > Try `emacs -q -l test.el` with test.el:
> >
> > (setq auto-save-default nil)
> >
> > wait a bit and `~/.emacs.d/auto-save-list/.saves-<pid>-<hostname>~`
> > will be created.
>
> That's exactly what I did, except that these settings were in ~/.emacs
> and not loaded after startup.  I waited for 30 seconds, and didn't see
> any auto-save-list file in ~/.emacs.d/.  Not sure why it happens for
> you.

Tried yet on another platform and Emacs version and using the method
you described and it still happened. The thing is that for some reason
the time it takes to create the file is not consistent, sometimes it's
30s (auto-save-timeout) other times is 2m :s. Made a video
https://youtu.be/metU0u2umtQ.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Fri, 03 Jan 2020 08:32:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Guerra <joca.bt <at> gmail.com>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Fri, 03 Jan 2020 10:31:14 +0200
> From: João Guerra <joca.bt <at> gmail.com>
> Date: Thu, 2 Jan 2020 22:09:59 +0100
> Cc: 38875 <at> debbugs.gnu.org
> 
> > > (setq auto-save-default nil)
> > >
> > > wait a bit and `~/.emacs.d/auto-save-list/.saves-<pid>-<hostname>~`
> > > will be created.
> >
> > That's exactly what I did, except that these settings were in ~/.emacs
> > and not loaded after startup.  I waited for 30 seconds, and didn't see
> > any auto-save-list file in ~/.emacs.d/.  Not sure why it happens for
> > you.
> 
> Tried yet on another platform and Emacs version and using the method
> you described and it still happened. The thing is that for some reason
> the time it takes to create the file is not consistent, sometimes it's
> 30s (auto-save-timeout) other times is 2m :s. Made a video
> https://youtu.be/metU0u2umtQ.

Apologies, you are right.

But this seems to be working as intended.  Emacs creates that
directory if it doesn't yet exist whenever it enters do-auto-save, and
it does that before it loops over all the buffers, so it cannot yet
know whether any of the buffers wants auto-saving.  It cannot refrain
from creating the directory (and the listing file inside it) based on
the value of auto-save-default alone, because that value could have
been changed half-way through a session, and some of the buffers still
want to be auto-saved.  We could perhaps make two loops over the
buffers, one before creating the directory and one after, but that
doesn't seem like an efficient way (think of sessions with many
hundreds of buffers), and since a way exists of disabling the creation
of that directory by customizing auto-save-list-file-prefix, there
doesn't seem to be a need for punishing the users who do want
auto-saving.

OK?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38875; Package emacs. (Fri, 03 Jan 2020 16:46:02 GMT) Full text and rfc822 format available.

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

From: João Guerra <joca.bt <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38875 <at> debbugs.gnu.org
Subject: Re: bug#38875: 26.2; auto-save-list-file-name still created when
 auto-save-default is nil
Date: Fri, 3 Jan 2020 17:45:11 +0100
Thanks for the explanation.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Feb 2020 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 85 days ago.

Previous Next


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