From: Kaushal Modi <kaushal.modi@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Inconsistent {{{time}}} org macro expansion
Date: Thu, 28 Jan 2016 19:59:10 +0000 [thread overview]
Message-ID: <CAFyQvY2nY2bd9PHw2sYopyfxn3yRxjfkcn1hh5Cxtm3W=Aq3+w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]
Hi,
I am getting different outputs from org-export-get-date depending on
whether I export the full org file or just a selected heading. For #+DATE,
I am using a {{{time}}} macro.
Here's a test org file:
=====
#+DATE: {{{time(%b %e %Y\, %a)}}}
* Heading 1
Content 1
* Heading 2
Content 2
=====
And here is a test org-html-postamble function to help debug this:
=====
(defun my/org-html-postamble-fn (info)
(let ((date (car (org-export-get-date info))))
(message "Date: %S" date)))
(setq org-html-postamble #'my/org-html-postamble-fn)
=====
SCENARIO 1: Normal export [GOOD]
In this scenario, I export the full org file to html (C-c C-e h h) without
selecting anything.
This is the output I get in *Messages*
Date: #("Jan 28 2016, Thu" 0 16 (:parent (#0)))
I get a date I case use in the postamble output.
SCENARIO 2: Export only one of the headings. [BAD]
Now select just the "Heading 1" sub-tree and then do C-c C-e h h.
This time, the output is:
Date: (macro (:key "time" :value "{{{time(%b %e %Y\\, %a)}}}" :args ("%b %e
%Y, %a") :begin 1 :end 26 :post-blank 0 :parent (#0)))
So it looks like the time macro did not expand.
Why is that? Is it a bug?
This is my org version: Org-mode version 8.3.3 (release_8.3.3-509-gc17fcc @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)
Thanks.
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 2060 bytes --]
next reply other threads:[~2016-01-28 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 19:59 Kaushal Modi [this message]
2016-01-28 23:54 ` Inconsistent {{{time}}} org macro expansion Nicolas Goaziou
2016-01-29 16:46 ` Kaushal Modi
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='CAFyQvY2nY2bd9PHw2sYopyfxn3yRxjfkcn1hh5Cxtm3W=Aq3+w@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--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).