[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Unable to retrieve :parameters for src-block [org-element]
From: |
Berry, Charles |
Subject: |
Re: [O] Unable to retrieve :parameters for src-block [org-element] |
Date: |
Tue, 17 Oct 2017 21:39:26 +0000 |
> On Oct 17, 2017, at 10:22 AM, Kaushal Modi <address@hidden> wrote:
>
> On Tue, Oct 17, 2017 at 12:31 PM Berry, Charles <address@hidden> wrote:
> The copy buffer that org-export-as sets up will contain this src block
> *after* the babel process runs.
>
> As you can see the headers are stripped off of it.
Actually, I was wrong! It is only the headers that are in the #+BEGIN_SRC line
that get stripped. The contents of any #+header: lines are left alone and the
src-block transcoder will have access to them as the :header element of a plist
in the src-block argument.
[snip ox-ravel suggestion]
> I still hope there is some way to prevent doing this hack, or if a
> non-intrusive change in Org code can still have the :parameters available
> during export. Would it be possible to remove *only* babel-recognized
> parameters and leave the unidentified parameters (which could be specific to
> an exporter) intact?
I think this might work: Add `after' advice to `org-babel-exp-code' that copies
the header args you want to retain and prepends a #+header: line with them to
the string returned by org-babel-exp-code. Then your src-block transcoder can
find them.
Chuck