emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-latex-custom-lang-environments


From: Rasmus
Subject: Re: [O] org-latex-custom-lang-environments
Date: Tue, 19 May 2015 18:09:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Jacob Gerlach <address@hidden> writes:

> Hello,
>
> On Tue, May 19, 2015 at 11:29 AM, Rasmus <address@hidden> 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!!!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]