[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [Exporter] How to extract timestamp from headline's title?
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [Exporter] How to extract timestamp from headline's title? |
Date: |
Fri, 15 Nov 2013 22:58:05 +0100 |
Hello,
Thorsten Jolitz <address@hidden> writes:
> when writing an exporter backend, I wonder what is the canonical way to
> extract the (optional) timestamp element from a headline's :title
> attribute (which holds a secondary string)?
>
> I could do something like this to extract the timestamp from the headline
>
> #+begin_src emacs-lisp
> (let ((ttl (org-element-property :title headline)))
> (and (> (length ttl) 1)
> (car (last ttl))))
> #+end_src
>
> but I hope there is a more straight-forward and reliable way to do
> this?
You can map over a secondary string. E.g.:
(org-element-map (org-element-property :title headline) 'timestamp
'identity)
Regards,
--
Nicolas Goaziou