GNU bug report logs -
#4554
local variable for updating the time stamp on save
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Thu, 24 Sep 2009 21:10:05 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
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 4554 in the body.
You can then email your comments to 4554 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4554
; Package
emacs
.
(Thu, 24 Sep 2009 21:10:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> jurta.org>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 24 Sep 2009 21:10:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
The defcustom `safe-local-eval-forms' contains
'((add-hook 'write-file-hooks 'time-stamp))
but the documentation suggests using
(add-hook 'before-save-hook 'time-stamp)
This patch adds the recommended form to `safe-local-eval-forms' as well:
Index: lisp/files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1083
diff -c -r1.1083 files.el
*** lisp/files.el 21 Sep 2009 22:12:30 -0000 1.1083
--- lisp/files.el 24 Sep 2009 20:47:28 -0000
***************
*** 2687,2693 ****
:group 'find-file
:type 'alist)
! (defcustom safe-local-eval-forms '((add-hook 'write-file-hooks 'time-stamp))
"Expressions that are considered safe in an `eval:' local variable.
Add expressions to this list if you want Emacs to evaluate them, when
they appear in an `eval' local variable specification, without first
--- 2687,2695 ----
:group 'find-file
:type 'alist)
! (defcustom safe-local-eval-forms
! '((add-hook 'before-save-hook 'time-stamp)
! (add-hook 'write-file-hooks 'time-stamp))
"Expressions that are considered safe in an `eval:' local variable.
Add expressions to this list if you want Emacs to evaluate them, when
they appear in an `eval' local variable specification, without first
--
Juri Linkov
http://www.jurta.org/emacs/
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4554
; Package
emacs
.
(Fri, 25 Sep 2009 00:50:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 25 Sep 2009 00:50:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 4554 <at> emacsbugs.donarmstrong.com (full text, mbox):
> The defcustom `safe-local-eval-forms' contains
> '((add-hook 'write-file-hooks 'time-stamp))
> but the documentation suggests using
> (add-hook 'before-save-hook 'time-stamp)
> This patch adds the recommended form to `safe-local-eval-forms' as well:
Feel free to install this patch, thanks,
Stefan
Reply sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
(Fri, 25 Sep 2009 22:15:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Juri Linkov <juri <at> jurta.org>
:
bug acknowledged by developer.
(Fri, 25 Sep 2009 22:15:05 GMT)
Full text and
rfc822 format available.
Message #15 received at 4554-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> > The defcustom `safe-local-eval-forms' contains
> > '((add-hook 'write-file-hooks 'time-stamp))
> > but the documentation suggests using
> > (add-hook 'before-save-hook 'time-stamp)
> > This patch adds the recommended form to `safe-local-eval-forms' as well:
>
> Feel free to install this patch, thanks,
I went ahead and installed.
Message #16 received at 4554-done <at> emacsbugs.donarmstrong.com (full text, mbox):
>> > The defcustom `safe-local-eval-forms' contains
>> > '((add-hook 'write-file-hooks 'time-stamp))
>> > but the documentation suggests using
>> > (add-hook 'before-save-hook 'time-stamp)
>> > This patch adds the recommended form to `safe-local-eval-forms' as well:
>>
>> Feel free to install this patch, thanks,
>
> I went ahead and installed.
Thanks, but I see something strange in CVS now,
`safe-local-eval-forms' contains by default:
1. `write-file-functions'. Yes, I know that it replaces the obsolete
`write-file-hooks'. But users might have already `write-file-hooks'
in local variables of their files, so I think we should check for both.
2. `before-save-hooks'. Is this a typo? I think it should be
`before-save-hook'.
So I propose the following default:
'((add-hook 'write-file-functions 'time-stamp)
(add-hook 'write-file-hooks 'time-stamp)
(add-hook 'before-save-hook 'time-stamp))
--
Juri Linkov
http://www.jurta.org/emacs/
Message #17 received at 4554-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Juri Linkov <juri <at> jurta.org> writes:
> 1. `write-file-functions'. Yes, I know that it replaces the obsolete
> `write-file-hooks'. But users might have already `write-file-hooks'
> in local variables of their files, so I think we should check for both.
This will be an incentive for users to switch to write-file-functions.
> 2. `before-save-hooks'. Is this a typo? I think it should be
> `before-save-hook'.
Whoops, yes this was a typo. Fixed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Wed, 28 Oct 2009 14:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 296 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.