emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: File modification date
Date: Mon, 07 Dec 2009 14:58:26 +0100	[thread overview]
Message-ID: <877hsyzy0t.fsf@mundaneum.com> (raw)
In-Reply-To: 6B3BF818-A26F-47A9-9874-D763894513D1@gmail.com

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



_______________________________________________
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

  reply	other threads:[~2009-12-07 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20  9:12 File modification date Sébastien Vauban
2009-08-20 20:04 ` Carsten Dominik
2009-12-07 13:58   ` Sébastien Vauban [this message]
     [not found]     ` <877hsyzy0t.fsf-pwAqS3aGAJQybS5Ee8rs3A@public.gmane.org>
2009-12-07 16:13       ` Francesco Pizzolante
2009-08-20 22:32 ` Eric S Fraga, Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hsyzy0t.fsf@mundaneum.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).