GNU bug report logs -
#13432
24.2; File does not get saved when save-buffer called
Previous Next
Reported by: Peter Milliken <peter.milliken <at> gmail.com>
Date: Mon, 14 Jan 2013 00:46:03 UTC
Severity: normal
Tags: notabug
Found in version 24.2
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 13432 <at> debbugs.gnu.org (full text, mbox):
Peter Milliken wrote:
> This behaviour started with Emacs 24.1 - it does not happen on earlier
> versions.
>
> In my .emacs I defadvice several major modes to include a call to
> untabify in the local-write-file-hooks. With this version of Emacs, the
> defadvice
> seems to trigger a bug where the message line states the file has been
> saved when it has not been saved - the status line indicates it is still
> in a modified state as well.
>
> Minimal/sample code that triggers/illustrates this bug is:
>
> (defadvice python-mode (after minor-modes-for-python activate compile)
> (add-hook 'local-write-file-hooks '(lambda () (untabify (point-min)
> (point-max)))))
Please read the doc of local-write-file-hooks:
This variable is obsolete since 22.1;
use `write-file-functions' instead.
From write-file-functions:
If one of them returns non-nil, the file is considered already written
^^^^^^^^^^^^^^^^^^^^^^^^^^
and the rest are not called.
So: ensure that any functions you add return nil. The return value of
untabify is unspecfied (ie, could be anything).
This bug report was last modified 12 years and 134 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.