emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org-babel-tangle xml text


From: Eric Schulte
Subject: Re: [Orgmode] org-babel-tangle xml text
Date: Tue, 03 Nov 2009 09:18:34 -0700
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)

"Martin G. Skjæveland" <address@hidden> writes:

> Is there a way I can add xml and n3 to the list of supported
> languages? These languages does not need interpretation, so I'm
> thinking it should be quite easy to add. I have fumblingly tried
>
>   (add-to-list 'org-babel-tangle-langs '("xml"))
>
> and
>
>   (add-to-list 'org-babel-tangle-langs '("css" "xml"))
>
> but it as no effect.
>

Hi Martin,

The attached org-mode file contains instructions for adding xml and n3
to org-babel and org-babel-tangle.  Note that there may be another step
if the major mode for n3 is not n3-mode.  Best -- Eric

* xml and n3

introduce org-babel to =xml= and =n3=
#+begin_src emacs-lisp :results silent
  (org-babel-add-interpreter "xml")
  (org-babel-add-interpreter "n3")
#+end_src

if say =n3= should be edited using =xml-mode=, then evaluate the
following adding this pair to =org-src-lang-modes=
#+begin_src emacs-lisp :results silent
  (add-to-list 'org-src-lang-modes '("n3" . xml))
#+end_src

inform org-babel-tangle of their existence and file extensions
#+begin_src emacs-lisp :results silent
  (add-to-list 'org-babel-tangle-langs '("xml" "xml" nil t))
  (add-to-list 'org-babel-tangle-langs '("n3" "n3" nil t))
#+end_src

#+begin_src xml :tangle example
  <first>
  </first>
#+end_src

#+begin_src n3 :tangle example
  n3 stuff
#+end_src

reply via email to

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