* export of formatted date macro fails
@ 2017-09-27 12:50 Robert Klein
2017-09-27 13:21 ` Kaushal Modi
0 siblings, 1 reply; 3+ messages in thread
From: Robert Klein @ 2017-09-27 12:50 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi,
when I export a formatted date via the {{{date}}} macro _and_ use e.g.
commas and/or spaces, I only get the first component in the exported
file (tested for HTML and PDF export).
E.g. in my document I have a date:
#+DATE: [2008-11-09 Sun 11:00]
and later the macro
{{{date(%A, %B %e, %Y)}}
The exported document only has the "Sunday" (%A) part of the date.
Same for {{{date(%A,%B%e,%Y)}}.
So far I see (org-timestamp-format timestamp "%A, %B %e, %Y") works for
a timestamp created by (org-element-timestamp-parser).
I don't understand the macro code at all (e.g.. org-macro-replace-all).
Versions are:
Org mode version 9.1.1 (release_9.1.1-7-g226d2f
@ /home/roklein/.emacs.d/org-mode/lisp/)
GNU Emacs 25.3.1 (x86_64-unknown-openbsd, GTK+ Version 2.24.31) of
2017-09-26
Any help is greatly appreciated.
Thank you very much.
Best regards
Robert
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: export of formatted date macro fails
2017-09-27 12:50 export of formatted date macro fails Robert Klein
@ 2017-09-27 13:21 ` Kaushal Modi
2017-09-27 13:42 ` Robert Klein
0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2017-09-27 13:21 UTC (permalink / raw)
To: Robert Klein, emacs-org list
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
On Wed, Sep 27, 2017, 8:52 AM Robert Klein <roklein@roklein.de> wrote:
>
> and later the macro
>
> {{{date(%A, %B %e, %Y)}}
>
> The exported document only has the "Sunday" (%A) part of the date.
>
> Same for {{{date(%A,%B%e,%Y)}}.
>
, is used as Org macro arguments separator. So that needs to be escaped
with a backslash.
Try:
{{{date(%A\, %B %e\, %Y)}}
> --
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: export of formatted date macro fails
2017-09-27 13:21 ` Kaushal Modi
@ 2017-09-27 13:42 ` Robert Klein
0 siblings, 0 replies; 3+ messages in thread
From: Robert Klein @ 2017-09-27 13:42 UTC (permalink / raw)
To: Kaushal Modi; +Cc: emacs-org list
Hi,
On Wed, 27 Sep 2017 13:21:14 +0000
Kaushal Modi <kaushal.modi@gmail.com> wrote:
> On Wed, Sep 27, 2017, 8:52 AM Robert Klein <roklein@roklein.de> wrote:
>
> >
> > and later the macro
> >
> > {{{date(%A, %B %e, %Y)}}
> >
> > The exported document only has the "Sunday" (%A) part of the date.
> >
> > Same for {{{date(%A,%B%e,%Y)}}.
> >
>
> , is used as Org macro arguments separator. So that needs to be
> escaped with a backslash.
>
> Try:
>
> {{{date(%A\, %B %e\, %Y)}}
>
you're so right. IIRC I use it in some files, too. *Banging my head
on the wall*
Thank you very much!!
Best regards
Robert
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-27 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 12:50 export of formatted date macro fails Robert Klein
2017-09-27 13:21 ` Kaushal Modi
2017-09-27 13:42 ` Robert Klein
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.