[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 16:31:03 +0000 |
> On Oct 17, 2017, at 5:51 AM, Kaushal Modi <address@hidden> wrote:
>
> So it is clear that the parameters are read inside
> org-element-src-block-parser, but I don't understand why
> (org-element-property :parameters src-block) is unable to fetch the same.
>
> Hints?
> --
The copy buffer that org-export-as sets up will contain this src block *after*
the babel process runs.
#+BEGIN_SRC emacs-lisp -n
(message "This is line 1")
(message "This is line 2")
(message "This is line 3")
(message "This is line 4")
(message "This is line 5")
#+END_SRC
As you can see the headers are stripped off of it.
So you need to do something tricky to hold onto those headers. I do not know
of a seamless way to do this. FWIW, this is handled in ox-ravel by hacking
babel so it produces #+ATTR_ lines just before the src block result in the copy
buffer. Those lines hold the header info which the ravel exporter trancoders
can consult.
There might be a tricky way to use :wrap to rewrite the src block with the
other headers intact.
HTH,
Chuck