From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: File modification date Date: Mon, 07 Dec 2009 14:58:26 +0100 Message-ID: <877hsyzy0t.fsf@mundaneum.com> References: <87r5v6kfvt.fsf@mundaneum.com> <6B3BF818-A26F-47A9-9874-D763894513D1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Carsten, Carsten Dominik wrote: > On Aug 20, 2009, at 10:12 AM, S=C3=A9bastien 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 =3D.subversion/config=3D: #+BEGIN_SRC sh # keep the modification time from the repository, for Makefiles, etc. use-commit-times =3D yes #+END_SRC So, I find it would be good for the author to see the "real" last modificat= ion date (which, moreover, can be different from the "copy" date of the file in your file system). Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode