emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: org-latex-custom-lang-environments
Date: Tue, 19 May 2015 18:09:54 +0200	[thread overview]
Message-ID: <87siaso8fh.fsf@gmx.us> (raw)
In-Reply-To: CAA6UvuHT6yO-UEFw4nd-7+qsqcBSgWD=O89zpMScXMWkySya7w@mail.gmail.com

Jacob Gerlach <jacobgerlach@gmail.com> writes:

> Hello,
>
> On Tue, May 19, 2015 at 11:29 AM, Rasmus <rasmus@gmx.us> 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	other threads:[~2015-05-19 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 15:16 org-latex-custom-lang-environments Jacob Gerlach
2015-05-19 15:29 ` org-latex-custom-lang-environments Rasmus
2015-05-19 15:55   ` org-latex-custom-lang-environments Jacob Gerlach
2015-05-19 16:09     ` Rasmus [this message]

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=87siaso8fh.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /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).