From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: Unable to retrieve :parameters for src-block [org-element] Date: Tue, 17 Oct 2017 21:39:26 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4ZaQ-0006im-TT for emacs-orgmode@gnu.org; Tue, 17 Oct 2017 17:39:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4ZaL-0006pR-UT for emacs-orgmode@gnu.org; Tue, 17 Oct 2017 17:39:42 -0400 Received: from iport-bcv2-out.ucsd.edu ([132.239.0.73]:62264) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4ZaL-0006oM-Ej for emacs-orgmode@gnu.org; Tue, 17 Oct 2017 17:39:37 -0400 In-Reply-To: Content-Language: en-US Content-ID: <6CF5F6E1935B8B449BCDCA51AEE90027@AD.UCSD.EDU> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: emacs-org list > On Oct 17, 2017, at 10:22 AM, Kaushal Modi wrote= : >=20 > 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 *a= fter* the babel process runs. >=20 > 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 l= ine 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 eleme= nt of a plist in the src-block argument.=20 [snip ox-ravel suggestion] > I still hope there is some way to prevent doing this hack, or if a non-in= trusive change in Org code can still have the :parameters available during = export. Would it be possible to remove *only* babel-recognized parameters a= nd leave the unidentified parameters (which could be specific to an exporte= r) intact? I think this might work: Add `after' advice to `org-babel-exp-code' that co= pies 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 tra= nscoder can find them. Chuck=