emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] File modification date


From: Sébastien Vauban
Subject: [Orgmode] File modification date
Date: Thu, 20 Aug 2009 11:12:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi,

I've always found the DATE header to be kind of useless, as it only indicates
the creation date of the file.

For me, it would be better if it would be the last edit date as it is the case
with the Emacs time-stamp.

Here a proposition to make this automagic:

--8<---------------cut here---------------start------------->8---
(add-hook 'org-mode-hook
          (lambda ()
            (set (make-local-variable 'time-stamp-format) "%:y-%02m-%02d")
            (set (make-local-variable 'time-stamp-start) "^#\\+DATE: +")
            (set (make-local-variable 'time-stamp-end) "$")))
--8<---------------cut here---------------end--------------->8---

Of course, `time-stamp-format' may be changed according to your taste.

Shouldn't be such a thing be the default?

Seb

-- 
Sébastien Vauban





reply via email to

[Prev in Thread] Current Thread [Next in Thread]