Re: [O] Unable to retrieve :parameters for src-block [org-element]

2017-10-18 Thread Kaushal Modi
On Wed, Oct 18, 2017, 5:20 PM Kaushal Modi wrote: > > Thanks for the instructions, below works perfectly! > As a quick follow up, it's already implemented in ox-hugo: https://ox-hugo.scripter.co/doc/source-blocks/#highlighting Thanks again! :) > -- Kaushal Modi

Re: [O] Unable to retrieve :parameters for src-block [org-element]

2017-10-18 Thread Kaushal Modi
On Tue, Oct 17, 2017 at 5:39 PM Berry, Charles wrote: > 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 ca

Re: [O] Unable to retrieve :parameters for src-block [org-element]

2017-10-17 Thread Berry, Charles
> On Oct 17, 2017, at 10:22 AM, Kaushal Modi wrote: > > On Tue, Oct 17, 2017 at 12:31 PM Berry, Charles 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 wr

Re: [O] Unable to retrieve :parameters for src-block [org-element]

2017-10-17 Thread Kaushal Modi
On Tue, Oct 17, 2017 at 12:31 PM Berry, Charles 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. > Oh! That explains! > So you need to do something tricky to hold onto those

Re: [O] Unable to retrieve :parameters for src-block [org-element]

2017-10-17 Thread Berry, Charles
> On Oct 17, 2017, at 5:51 AM, Kaushal Modi 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-a

Re: [O] Unable to retrieve :parameters for src-block [org-element]

2017-10-17 Thread Kaushal Modi
On Tue, Oct 17, 2017 at 8:51 AM Kaushal Modi wrote: > Hello, > > I am using the latest Org master. > > I am trying to retrieving user-set parameters for a source block. While I > am able to retrieve the :switches property for the src-block element, > :parameters always returns as nil. > Here's a

[O] Unable to retrieve :parameters for src-block [org-element]

2017-10-17 Thread Kaushal Modi
Hello, I am using the latest Org master. I am trying to retrieving user-set parameters for a source block. While I am able to retrieve the :switches property for the src-block element, :parameters always returns as nil. Here's a dummy version of the function I am using to parse source blocks in