From: "Berry, Charles" <ccberry@ucsd.edu>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Unable to retrieve :parameters for src-block [org-element]
Date: Tue, 17 Oct 2017 16:31:03 +0000 [thread overview]
Message-ID: <F52DB007-27BC-4E3C-A945-A8CF1C28D3E4@ucsd.edu> (raw)
In-Reply-To: <CAFyQvY17+XnrFvuq05NzCc5FPnJxnOBEjXkAia=c9fv0qHNPbA@mail.gmail.com>
> On Oct 17, 2017, at 5:51 AM, Kaushal Modi <kaushal.modi@gmail.com> 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
next prev parent reply other threads:[~2017-10-17 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 12:51 Unable to retrieve :parameters for src-block [org-element] Kaushal Modi
2017-10-17 15:45 ` Kaushal Modi
2017-10-17 16:31 ` Berry, Charles [this message]
2017-10-17 17:22 ` Kaushal Modi
2017-10-17 21:39 ` Berry, Charles
2017-10-18 21:20 ` Kaushal Modi
2017-10-18 23:19 ` Kaushal Modi
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=F52DB007-27BC-4E3C-A945-A8CF1C28D3E4@ucsd.edu \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=kaushal.modi@gmail.com \
/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).