From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: new exporter drops :parameters ? Date: Tue, 03 Jul 2012 11:16:16 +0200 Message-ID: <878vf1gq73.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlzGi-0006Hu-4L for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 05:19:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlzGg-0003L4-2z for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 05:19:35 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:63951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlzGf-0003Kn-Pg for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 05:19:34 -0400 Received: by wibhm11 with SMTP id hm11so2941437wib.12 for ; Tue, 03 Jul 2012 02:19:31 -0700 (PDT) In-Reply-To: (Charles Berry's message of "Tue, 3 Jul 2012 03:51:29 +0000 (UTC)") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Charles Berry Cc: emacs-orgmode@gnu.org Hello, Charles Berry writes: > I am trying to put together a derived backend that makes use of Src Block > :parameters attribute. > > I can see that the header in a begin_src block is picked up by > > org-element-src-block-parser, as it should be when I try it interactively > > But not when I try > > M-: (org-export-to-buffer 'my-latex "*latex out*") RET > > I'd really like to have access to the header elements. > > AFAICS :parameters is nowhere to be found when using > org-export-to-buffer. This is because src blocks are executed before buffer is parsed. You can try to call `org-export-blocks-preprocess' on the following buffer (associated to a file): --8<---------------cut here---------------start------------->8--- #+name: bblock #+BEGIN_SRC R :exports code :et-cetera rnorm(2)+1 #+END_SRC --8<---------------cut here---------------end--------------->8--- and see what is really parsed: the removal happens on the Babel side. Depending on your needs, you may want to use ATTR_LATEX keyword instead. Regards, -- Nicolas Goaziou