emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rafael Laboissiere <rafael@laboissiere.net>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] call_*() is not working inside #+DATE
Date: Sun, 13 Mar 2016 18:41:53 +0100	[thread overview]
Message-ID: <20160313174153.GM3916@laboissiere.net> (raw)
In-Reply-To: <87y49mmgth.fsf@nicolasgoaziou.fr>

* Nicolas Goaziou <mail@nicolasgoaziou.fr> [2016-03-13 18:24]:

> Rafael Laboissiere <rafael@laboissiere.net> writes:
>
>> It would be much better if the following construct worked:
>>
>>     #+DATE: src_sh{git show -s --date=short --format="%cd [%h]" HEAD}
>>
>> Unfortunately, it does not.  This behavior (or misbehavior, I do not 
>> know) can be traced down to the org-element-context function.
>>
>> [snip]
>
> Values from keyword are not parsed. Org used to make an exception for an 
> arbitrary bunch of them (e.g., DATE, TITLE, etc.). Now it is up to the 
> export back-ends to decide what keyword is going to be parsed.
>
> I can think of two ways to solve this:
>
>  1. Only evaluate the Babel code during export. Upon exporting the
>     document, parsed keywords are known, so
>     `org-babel-exp-process-buffer' may try to find "hidden" Babel code
>     and execute it.
>
>     This would however introduce a discrepancy between
>     org-babel-execute-buffer and the behaviour upon exporting.
>
>  2. Sort parsed keywords from regular ones at the syntax level, much
>     like we did for export blocks recently. I.e., every keyword is
>     parsed expect those marked as verbatim. I don't have an idea bout
>     the involved syntax.
>
>     This would probably induce some backward incompatibility.
>
> WDYT?

Thanks for your proposal.

I would vote for solution #1.  The discrepancy between 
org-babel-execute-buffer and the behaviour upon exporting that you 
mention would not bother me.

Whatever solution is adopted (or if the current behavior is kept), the 
info documentation must be updated.  Do you agree with the patch that I 
proposed earlier in this thread?

Best,

Rafael

  reply	other threads:[~2016-03-13 17:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  1:58 call_*() is not working inside #+DATE Rafael Laboissiere
2016-03-12  7:57 ` [PATCH] " Rafael Laboissiere
2016-03-12  8:51   ` Eric S Fraga
2016-03-12  9:34     ` Rafael Laboissiere
2016-03-13 17:24       ` Nicolas Goaziou
2016-03-13 17:41         ` Rafael Laboissiere [this message]
2016-03-14 16:43   ` Rafael Laboissiere
2016-03-14 19:41     ` Nicolas Goaziou
2016-03-15 10:23       ` Rafael Laboissiere
2016-03-15 18:50         ` Nicolas Goaziou
2016-03-15 20:58           ` Rafael Laboissiere

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=20160313174153.GM3916@laboissiere.net \
    --to=rafael@laboissiere.net \
    --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).