emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [patch] get modification-time from vc


From: Rasmus
Subject: [O] [patch] get modification-time from vc
Date: Thu, 28 Apr 2016 17:43:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Hi,

The file system modification time as accessed by {{{modification-time}}}
is often wrong, e.g. when a project is newly cloned or if the file has
been copied in a sloppy manner.  At least if modification time suggest the
time that the file was edited by an author.

Sometimes vc can provide a better answer.  The attached patch tries to get
a sensible time from vc.

Caveats:
- There’s no customization.  I think that’s fine.  If someone feels
  strongly against this behavior a defcustom could be added or we could
  add another a macro, {{{vc-modification-time}}}.
- org-macs will depend on vc.  I don’t really see why this would be an
  issue as vc is bundled with Emacs.

I have only tested this with git, but it should work with other vc
backends to the extend that ‘parse-time-string’ can handle the way they
format dates.

WDYT?

Rasmus

-- 
Even a three-legged dog has three good legs to lose

Attachment: 0001-org-macro-Maybe-get-modification-time-from-vc.el.patch
Description: Text Data


reply via email to

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