[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Tangling
From: |
Dan Davison |
Subject: |
Re: [Orgmode] Tangling |
Date: |
Fri, 09 Apr 2010 09:38:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hi Andrea,
Andrea Crotti <address@hidden> writes:
> So for my presentation I'm preparing a minimal emacs configuration which
> will have
> - org-mode/babel
> - python mode
> - yasnippet/auto complete
>
> And it will be everything here
> http://github.com/AndreaCrotti/Org-mode-notes
>
> I'm running
> Org-mode version 6.34trans
> on
> GNU Emacs 23.1.50.1
> (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2009-09-16 on
> neutron.local
>
> But I don't know why I'm not able to tangle anything and then load the
> elisp code from an org-mode file.
>
> ELISP> (org-babel-load-file "/Users/andrea/Documents/pycon/miniconf.org")
> *** Eval error *** No buffer named miniconf.org
>
> But the file is actually there, or like this
> ELISP> (org-babel-tangle "/Users/andrea/Documents/pycon/miniconf.org")
I think you meant
(org-babel-tangle-file "/Users/andrea/Documents/pycon/miniconf.org")
here
> nil
>
> And it doesn't export any source even if it looks something like this
>
> * Org mode
> ** Clock configuration
> #+begin_src elisp :tangle yes
> ;; Clock configuration
> (setq org-clock-persist t)
> (org-clock-persistence-insinuate)
> #+end_src
Although Org maps "elisp" to emacs-lisp-mode in org-src-lang-modes
(therefore C-c ' works), Org-babel currently does not recognise "elisp"
by default. Thanks for raising this, I think we need to make ourselves
more compatible with org-src-lang-modes.
So the short answer is: change "elisp" to "emacs-lisp".
The longer answer is, you could do
(org-babel-add-interpreter "elisp")
(add-to-list 'org-babel-tangle-langs '("elisp" "el"))
But you (we) 'll still be faced with the problem that org-babel-load-file
expects the blocks to be "emacs-lisp" blocks. org-babel-tangle-file, on
the other hand, will work.
Does that get things working?
Dan
>
> Any idea?
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode