emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: how to customize date export
Date: Tue, 04 Feb 2014 22:48:50 +0100	[thread overview]
Message-ID: <87a9e6ft19.fsf@gmx.us> (raw)
In-Reply-To: 87vbww6pcj.fsf@alphaville.bos.redhat.com

Nick Dokos <ndokos@gmail.com> writes:

> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> Mirko Vukovic <mirko.vukovic@gmail.com> writes:
>>
>> [...]
>>
>>> Hi Eric,
>>>
>>> Thanks for the note.  As it stands now, I cannot
>>> customize these two variables to do what I want, as they accept the
>>> whole time-steamp as argument.  I will enter the dates manually
>>> in the org file for now.
>>
>> I thought as much.  
>>
>> Looking through the code, some of the functions for outputting the time
>> stamps make use of org-translate-time which does allow some
>> customisation of how the dates and times are written out, along the
>> lines of what you were looking at for DATE entries.  Check the
>> documentation for that function.  But it could be I've misunderstood the
>> code...
>
> Based on Eric's hint, I followed org-translate-time's docstring (and
> references therein) and I came up with this which seems to work (in the
> sense that the dates look like <2014/02/03 Monday> when exported,
> which agrees with the specified format):
>
> #+STARTUP: customtime
>
> * foo
> <2014-02-03 Mon>
>
> # Local Variables:
> # org-time-stamp-custom-formats: ("<%Y/%m/%d %A>" . "<%Y/%m/%d %A %H:%M>")
> # End:
>
> However, the angle brackets seem to be required.

You could use a filter to get rid of the angle brackets for instance
org-export-filter-timestamp-functions.  There's also parse-time-string
together with the relevant DATE-formatting variables that can be used
to recast the appearance of time.

—Rasmus

-- 
Dung makes an excellent fertilizer

      parent reply	other threads:[~2014-02-04 21:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 18:21 how to customize date export Mirko Vukovic
2014-02-02 19:33 ` Eric S Fraga
2014-02-03 15:15   ` Mirko Vukovic
2014-02-03 16:11     ` Eric S Fraga
2014-02-03 18:08       ` Nick Dokos
2014-02-04 18:45         ` Eric S Fraga
2014-02-04 21:48         ` Rasmus [this message]

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=87a9e6ft19.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.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).