emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] call_*() is not working inside #+DATE


From: Rafael Laboissiere
Subject: Re: [O] [PATCH] call_*() is not working inside #+DATE
Date: Sun, 13 Mar 2016 18:41:53 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

* Nicolas Goaziou <address@hidden> [2016-03-13 18:24]:

Rafael Laboissiere <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]