GNU bug report logs - #26331
numerical timezones require hardwiring

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 1 Apr 2017 12:28:01 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 26331 in the body.
You can then email your comments to 26331 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#26331; Package emacs. (Sat, 01 Apr 2017 12:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 01 Apr 2017 12:28:02 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: numerical timezones require hardwiring
Date: Sat, 01 Apr 2017 20:26:42 +0800
If the user wants numerical timezones in his timestamps, there is no
other way than hardwiring them in:

(add-hook 'before-save-hook 'time-stamp)
(eval-after-load 'sgml-mode
  '(add-hook
    'html-mode-hook
    (lambda ()
      (set (make-local-variable 'time-stamp-pattern)
	   "-8/>Last modified: %Y-%02m-%02d %02H:%02M:%02S \\+0800")
      (set (make-local-variable 'time-stamp-time-zone) "Asia/Taipei"))))

P.S., it is not clear how one can make
(add-hook 'before-save-hook 'time-stamp)
html-mode specific too.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26331; Package emacs. (Sat, 01 Apr 2017 19:30:02 GMT) Full text and rfc822 format available.

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

From: John Mastro <john.b.mastro <at> gmail.com>
To: 26331 <at> debbugs.gnu.org
Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#26331: numerical timezones require hardwiring
Date: Sat, 1 Apr 2017 12:29:29 -0700
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> wrote:
> P.S., it is not clear how one can make
> (add-hook 'before-save-hook 'time-stamp)
> html-mode specific too.

Use the LOCAL argument to `add-hook'

        John




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26331; Package emacs. (Sun, 02 Apr 2017 00:23:02 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: John Mastro <john.b.mastro <at> gmail.com>
Cc: 26331 <at> debbugs.gnu.org
Subject: Re: bug#26331: numerical timezones require hardwiring
Date: Sun, 02 Apr 2017 08:22:04 +0800
I mean how to make emacs only look for and change time stamps in HTML files.

>>>>> "JM" == John Mastro <john.b.mastro <at> gmail.com> writes:
JM> Use the LOCAL argument to `add-hook'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26331; Package emacs. (Sun, 02 Apr 2017 00:45:02 GMT) Full text and rfc822 format available.

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

From: John Mastro <john.b.mastro <at> gmail.com>
To: 26331 <at> debbugs.gnu.org
Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#26331: numerical timezones require hardwiring
Date: Sat, 1 Apr 2017 17:43:34 -0700
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> wrote:
> I mean how to make emacs only look for and change time stamps in HTML files.

Right. Here's what I mean:

    (eval-after-load 'sgml-mode
      '(add-hook
        'html-mode-hook
        (lambda ()
          (set (make-local-variable 'time-stamp-pattern)
               "-8/>Last modified: %Y-%02m-%02d %02H:%02M:%02S \\+0800")
          (set (make-local-variable 'time-stamp-time-zone) "Asia/Taipei")
          (add-hook 'before-save-hook 'time-stamp nil t) ;; <- Here
          )))

It will add `time-stamp' to `before-save-hook' buffer-locally in all
`html-mode' buffers.

        John




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26331; Package emacs. (Sun, 02 Apr 2017 01:50:02 GMT) Full text and rfc822 format available.

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

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: John Mastro <john.b.mastro <at> gmail.com>
Cc: 26331 <at> debbugs.gnu.org
Subject: Re: bug#26331: numerical timezones require hardwiring
Date: Sun, 02 Apr 2017 09:49:29 +0800
>>>>> "JM" == John Mastro <john.b.mastro <at> gmail.com> writes:
JM> Right. Here's what I mean:
Thanks! I now use

;; html-helper-mode is no longer in Debian. Grandfather its timestamps:
(eval-after-load 'sgml-mode
  '(add-hook
    'html-mode-hook
    (lambda ()
      (set (make-local-variable 'time-stamp-line-limit) -8)
      (set (make-local-variable 'time-stamp-format)
	   "%:y-%02m-%02d %02H:%02M:%02S +0800") ;alas must hardwire to get '+0800'
      (set (make-local-variable 'time-stamp-start)
	   "<!-- hhmts start -->Last modified:[ \t\n]+")
      (set (make-local-variable 'time-stamp-end) "[ \t\n]*<!-- hhmts end -->")
      (set (make-local-variable 'time-stamp-time-zone) "Asia/Taipei")
      (add-hook 'before-save-hook 'time-stamp nil t)
      )))




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 02 Oct 2017 06:30:02 GMT) Full text and rfc822 format available.

Notification sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
bug acknowledged by developer. (Mon, 02 Oct 2017 06:30:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 26331-done <at> debbugs.gnu.org
Subject: Re: numerical timezones require hardwiring
Date: Sun, 1 Oct 2017 23:29:14 -0700
Since this problem seems to be solved, I am closing the bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 30 Oct 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 237 days ago.

Previous Next


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