emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
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 21:39:26 +0000	[thread overview]
Message-ID: <B1285E6E-07FE-41C3-9A93-64C99BC67569@ucsd.edu> (raw)
In-Reply-To: <CAFyQvY2bRtUYJyKHK640D5QzTxs=MHno4m3nkdUHrzow4isF_g@mail.gmail.com>


> On Oct 17, 2017, at 10:22 AM, Kaushal Modi <kaushal.modi@gmail.com> wrote:
> 
> On Tue, Oct 17, 2017 at 12:31 PM Berry, Charles <ccberry@ucsd.edu> 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

  reply	other threads:[~2017-10-17 21:39 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
2017-10-17 17:22   ` Kaushal Modi
2017-10-17 21:39     ` Berry, Charles [this message]
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=B1285E6E-07FE-41C3-9A93-64C99BC67569@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).