emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tangling and Exporting an Unsupported Language.
@ 2014-09-29  6:53 Malcolm Purvis
  2014-09-29 19:22 ` Ista Zahn
  0 siblings, 1 reply; 4+ messages in thread
From: Malcolm Purvis @ 2014-09-29  6:53 UTC (permalink / raw)
  To: emacs-orgmode

All,

I'm writing an org document which contains code examples of a language
not supported by Babel (a local domain specific language).  The language
doesn't even have a supporting Emacs mode.

I'm wondering what the best portable approach is to managing the code
blocks.  I'm particularly interested in exporting the document to LaTeX
and tangling the code.  I may need to share the document with others, so
I'd prefer not to require a supporting elisp file if I can help it.

Currently I'm using the org language, since it seems to be the most generic:

#+begin_src org :tangle foo.bar
#+end_src

Is there a case for 'begin_src text' to handle arbitrary content?

Malcolm 

-- 
	       Malcolm Purvis <malcolm@purvis.id.au>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tangling and Exporting an Unsupported Language.
  2014-09-29  6:53 Tangling and Exporting an Unsupported Language Malcolm Purvis
@ 2014-09-29 19:22 ` Ista Zahn
  2014-10-01  7:10   ` Malcolm Purvis
  0 siblings, 1 reply; 4+ messages in thread
From: Ista Zahn @ 2014-09-29 19:22 UTC (permalink / raw)
  To: Malcolm Purvis; +Cc: emacs-orgmode Mailinglist

Exporting and tangling don't require any language support.

#+begin_src foobarbas :tangle foo.bar
#+end_src

is perfectly fine and will export and tangle just fine. Or did I
misunderstand your question?

Best,
Ista

On Mon, Sep 29, 2014 at 2:53 AM, Malcolm Purvis <malcolm@purvis.id.au> wrote:
> All,
>
> I'm writing an org document which contains code examples of a language
> not supported by Babel (a local domain specific language).  The language
> doesn't even have a supporting Emacs mode.
>
> I'm wondering what the best portable approach is to managing the code
> blocks.  I'm particularly interested in exporting the document to LaTeX
> and tangling the code.  I may need to share the document with others, so
> I'd prefer not to require a supporting elisp file if I can help it.
>
> Currently I'm using the org language, since it seems to be the most generic:
>
> #+begin_src org :tangle foo.bar
> #+end_src
>
> Is there a case for 'begin_src text' to handle arbitrary content?
>
> Malcolm
>
> --
>                Malcolm Purvis <malcolm@purvis.id.au>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tangling and Exporting an Unsupported Language.
  2014-09-29 19:22 ` Ista Zahn
@ 2014-10-01  7:10   ` Malcolm Purvis
  2014-10-01 14:22     ` Ista Zahn
  0 siblings, 1 reply; 4+ messages in thread
From: Malcolm Purvis @ 2014-10-01  7:10 UTC (permalink / raw)
  To: emacs-orgmode

>>>>> "Ista" == Ista Zahn <istazahn@gmail.com> writes:

Ista> Exporting and tangling don't require any language support.

Ista> #+begin_src foobarbas :tangle foo.bar
Ista> +end_src

Ista> is perfectly fine and will export and tangle just fine. Or did I
Ista> misunderstand your question?

Thanks, I wasn't aware that you could put an arbitrary string as the
language.

I also found that I had org-latex-listings set to t, which was making
LaTeX error because it didn't know about the languages I was trying.

I've now switched the using the minted LaTeX package, which supports
'text' as a language, and have started using that.

Thanks for your help.

Malcolm

-- 
	       Malcolm Purvis <malcolm@purvis.id.au>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tangling and Exporting an Unsupported Language.
  2014-10-01  7:10   ` Malcolm Purvis
@ 2014-10-01 14:22     ` Ista Zahn
  0 siblings, 0 replies; 4+ messages in thread
From: Ista Zahn @ 2014-10-01 14:22 UTC (permalink / raw)
  To: Malcolm Purvis; +Cc: emacs-orgmode Mailinglist

On Wed, Oct 1, 2014 at 3:10 AM, Malcolm Purvis <malcolm@purvis.id.au> wrote:
>>>>>> "Ista" == Ista Zahn <istazahn@gmail.com> writes:
>
> Ista> Exporting and tangling don't require any language support.
>
> Ista> #+begin_src foobarbas :tangle foo.bar
> Ista> +end_src
>
> Ista> is perfectly fine and will export and tangle just fine. Or did I
> Ista> misunderstand your question?
>
> Thanks, I wasn't aware that you could put an arbitrary string as the
> language.
>
> I also found that I had org-latex-listings set to t, which was making
> LaTeX error because it didn't know about the languages I was trying.
>
> I've now switched the using the minted LaTeX package, which supports
> 'text' as a language, and have started using that.

Yes, I find minted much nicer that listings, the only drawback being
that it has external dependencies. I guess you've already discovered
that you can do

(add-to-list 'org-export-latex-minted-langs '(foo "bar"))

where foo is the name of the language and bar is the pygments lexer
that should be used to typeset it.

Best,
Ista

>
> Thanks for your help.
>
> Malcolm
>
> --
>                Malcolm Purvis <malcolm@purvis.id.au>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-01 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29  6:53 Tangling and Exporting an Unsupported Language Malcolm Purvis
2014-09-29 19:22 ` Ista Zahn
2014-10-01  7:10   ` Malcolm Purvis
2014-10-01 14:22     ` Ista Zahn

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).