emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: File modification date


From: Sébastien Vauban
Subject: [Orgmode] Re: File modification date
Date: Mon, 07 Dec 2009 14:58:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi Carsten,

Carsten Dominik wrote:
> On Aug 20, 2009, at 10:12 AM, Sébastien Vauban wrote:
>>
>> 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?

Coming back to my old post, and your answer...


> DATE was implemented exactly to specify a fixed date. You can get the
> modification date with
>
>     {{{modification-time(%Y-%m-%d)}}}
>
> and the current date with
>
>     {{{date(%Y-%m-%d)}}}
>
> These will be expanded upon export.  So you can, in fact, do
>
>     #+DATE: {{{modification-time(%Y-%m-%d)}}}

The problem is that the author does not see anymore the "last modification
date", then, except in the PDF output.

And, in fact, if that Org file is put under VC, you can have two people
printing (exporting) the exact same document and it would still have a
different date. That's because, by default, the original modification date is
not kept on the file system when checking out a file from Subversion (my
current VC system).

To do so, one need to set to his =.subversion/config=:

#+BEGIN_SRC sh
# keep the modification time from the repository, for Makefiles, etc.
use-commit-times = yes
#+END_SRC

So, I find it would be good for the author to see the "real" last modification
date (which, moreover, can be different from the "copy" date of the file in
your file system).

Best regards,
  Seb

-- 
Sébastien Vauban





reply via email to

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