From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: org-latex-custom-lang-environments Date: Tue, 19 May 2015 18:09:54 +0200 Message-ID: <87siaso8fh.fsf@gmx.us> References: <87mw10pow3.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuk5q-0003bp-Sm for emacs-orgmode@gnu.org; Tue, 19 May 2015 12:10:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yuk5m-0002YD-PA for emacs-orgmode@gnu.org; Tue, 19 May 2015 12:10:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:43323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuk5m-0002Vf-JG for emacs-orgmode@gnu.org; Tue, 19 May 2015 12:10:06 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Yuk5f-0000T7-Pm for emacs-orgmode@gnu.org; Tue, 19 May 2015 18:09:59 +0200 Received: from 46.166.188.238 ([46.166.188.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 May 2015 18:09:59 +0200 Received: from rasmus by 46.166.188.238 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 May 2015 18:09:59 +0200 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: emacs-orgmode@gnu.org Jacob Gerlach writes: > Hello, > > On Tue, May 19, 2015 at 11:29 AM, Rasmus wrote: >> If I explicitly eval: >> >> (org-babel-do-load-languages 'org-babel-load-languages '((sh . t))) >> (setq org-latex-custom-lang-environments '((sh "myverbatim")) >> org-latex-listings t) >> >> And export >> >> #+BEGIN_SRC sh :exports code >> echo "Hello" >> #+END_SRC >> >> I get the the block wrapped in the desired environment. I don't know why >> your local variables are ignored, but it seems the result is the same when >> using the Org-specific BIND keyword... > > > Yes, I see the same - setting them with setq gives the desired > behavior. I must have done this during my initial experimentation > which is why it worked until I restarted emacs. > > I know the local variables are parsed - I get asked for confirmation > on potentially unsafe values, and after confirming, C-h v ... shows > that the value has been set correctly. > > Does this maybe have to do with export happening in a temporary > buffer? I would assume that file local variables get copied over to > the temp buffer as buffer local variables. Is that the case? No. And actually it works, only it shouldn't be quoted. # -*- org-export-allow-bind-keywords: t; -*- #+BIND: org-latex-listings t #+BIND: org-latex-custom-lang-environments ((sh "myverbatim")) #+BEGIN_SRC sh :exports code echo "Hello" #+END_SRC Or #+BEGIN_SRC sh :exports code echo "Hello" #+END_SRC # Local Variables: # org-latex-listings: t # org-latex-custom-lang-environments: ((sh "myverbatim")) # END: Hope it helps, Rasmus -- Don't panic!!!