GNU bug report logs - #25460
26.0.50; Documentation request: Save/write hooks and autosave

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Mon, 16 Jan 2017 18:11:01 UTC

Severity: wishlist

Found in version 26.0.50

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

Acknowledgement sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 16 Jan 2017 18:11:02 GMT) Full text and rfc822 format available.

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

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; Documentation request: Save/write hooks and autosave
Date: Mon, 16 Jan 2017 19:09:58 +0100
Please document how {before,after}-save-hook and
write-{buffer,file}-functions relate to autosave, both in the docstrings
of these hooks and in the Emacs Lisp manual.  I noticed that even if
auto-save-visited-file-name is t, autosaving doesn't run
before-save-hook.  The documentation should provide some guidance which
hook to use depending on the value of auto-save-visited-file-name and on
whether the current save operation is an auto-save or not.


In GNU Emacs 26.0.50.28 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2017-01-13 built on localhost
Repository revision: d018843e0e8065b1c9de9474521db069e1aa0025
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04 LTS

Recent messages:

Configured using:
 'configure --with-modules --enable-checking
 --enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0''

Configured features:
XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

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

Major mode: Lisp Interaction

Minor modes in effect:
  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
  transient-mark-mode: t

Load-path shadows:
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/image/gravatar hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/gravatar
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/mail-parse hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/mail-parse
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/rfc2231 hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/rfc2231
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/starttls hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/starttls
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/sieve hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/sieve
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/international/utf7 hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/utf7
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/registry hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/registry
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/international/rfc1843 hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/rfc1843
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/rfc2045 hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/rfc2045
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/yenc hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/yenc
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/sieve-manage hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/sieve-manage
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/mailcap hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/mailcap
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/auth-source hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/auth-source
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/rtree hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/rtree
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/html2text hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/html2text
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/ecomplete hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/ecomplete
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/image/compface hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/compface
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/mail-prsvr hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/mail-prsvr
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/qp hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/qp
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/ietf-drums hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/ietf-drums
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/rfc2047 hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/rfc2047
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/sieve-mode hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/sieve-mode
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/plstore hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/plstore
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/net/pop3 hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/pop3
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/mail/flow-fill hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/gnus/flow-fill
/usr/local/google/home/phst/ThirdParty/Emacs/lisp/gs hides /usr/local/google/home/phst/ThirdParty/Emacs/lisp/obsolete/gs

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config 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 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 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 inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 97629 7213)
 (symbols 48 20220 1)
 (miscs 40 331 181)
 (strings 32 17991 4050)
 (string-bytes 1 592077)
 (vectors 16 14071)
 (vector-slots 8 471819 3575)
 (floats 8 181 12)
 (intervals 56 207 0)
 (buffers 976 12)
 (heap 1024 22205 1120))

-- 
Google Germany GmbH
Erika-Mann-Straße 33
80636 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Diese E-Mail ist vertraulich.  Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen
Sie die E-Mail und alle Anhänge.  Vielen Dank.

This e-mail is confidential.  If you are not the right addressee please do not
forward it, please inform the sender, and please erase this e-mail including
any attachments.  Thanks.




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

Notification sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
bug acknowledged by developer. (Fri, 20 Jan 2017 09:04:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 25460-done <at> debbugs.gnu.org
Subject: Re: bug#25460: 26.0.50;
 Documentation request: Save/write hooks and autosave
Date: Fri, 20 Jan 2017 11:03:18 +0200
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Mon, 16 Jan 2017 19:09:58 +0100
> 
> Please document how {before,after}-save-hook and
> write-{buffer,file}-functions relate to autosave

They don't.  These hooks are only run by basic-save-buffer.

> I noticed that even if auto-save-visited-file-name is t, autosaving
> doesn't run before-save-hook.

I added notes (on the release branch) that these hooks are only run by
save-buffer.

> The documentation should provide some guidance which hook to use
> depending on the value of auto-save-visited-file-name and on whether
> the current save operation is an auto-save or not.

It looks like you consider auto-save-visited-file-name as an option
that makes auto-saving exactly equivalent to saving the buffer.  But
that is far from reality; in fact, as I wrote elsewhere, this option
has subtle issues, so much so that I don't recommend its use at all.
If we want it to be equivalent to saving, we should reimplement it so
that auto-saving uses basic-save-buffer when this option is non-nil.
But that is probably something for a separate bug report, so I'm
closing this one.




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

This bug report was last modified 8 years and 125 days ago.

Previous Next


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