From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Document date and last updated date Date: Tue, 07 Feb 2012 18:45:57 +0100 Message-ID: <87ty32fsfe.fsf@gmail.com> References: <87pqec4xua.fsf@gmail.com> <87zkcwt4qg.fsf@gmail.com> <87liofuc2k.fsf@gmail.com> <87k43znlwu.fsf@gmail.com> <80haz3qavw.fsf_-_@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rup9R-0006ci-RT for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 12:48:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rup9N-0007eC-Tm for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 12:48:21 -0500 Received: from plane.gmane.org ([80.91.229.3]:58588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rup9N-0007e6-C0 for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 12:48:17 -0500 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Rup9K-0002qN-O7 for emacs-orgmode@gnu.org; Tue, 07 Feb 2012 18:48:14 +0100 In-Reply-To: <80haz3qavw.fsf_-_@somewhere.org> (Sebastien Vauban's message of "Tue, 07 Feb 2012 09:57:07 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Hello, "Sebastien Vauban" writes: > Speaking of hyperref and its _document properties_, it makes me think of a > generic point for which I don't have yet a really satisfactory solution, that > is about handling dates. > > In a PDF document, regarding dates, we have (see output of `pdfinfo'): > > - creation date > - modification date > > In Org, we have the `#+DATE:' info keyword, with the date that's supposed to > be exported onto the final document format (HTML, PDF, OOo, etc.). > > But we don't see when the document has been updated for the last time -- > neither when it has been created. > > For the former point (date of last update), I've customized Org so that the > `time-stamp' package updates time stamps every time you save the Org buffer: > > #+begin_src emacs-lisp > (add-hook 'before-save-hook 'time-stamp) > > (add-hook 'org-mode-hook > (lambda () > ;; file modification date > (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) "$"))) > #+end_src > > That makes my `#+DATE:' info keyword always *up-to-date*. > > Though, in some cases: > > - I must print a document with a future date (for example, I'm preparing > slides which I will present on next Monday) -- hence, the above breaks this, > because I'd like to have next Monday's date already printed on my slides (at > least on the title page). > > - it would be nice to get keep track of the creation date of the Org document, > though this is not really necessary. > > Clearly, I should not make the `#+DATE:' info keyword updated, to keep it for > its export function (as the official date to be printed on the title page), > but then it'd be good to have at least a last modification date > somewhere. > > What do you think of all this? How do you do to keep more info on > dates? Export systems already provide a {{{modification-time(format-string)}}} macro by default. > Some global `draft' or `final' info could make some sense too. Isn't it too much back-end specific? Regards, -- Nicolas Goaziou