all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tangling
@ 2010-04-09  9:17 Andrea Crotti
  2010-04-09 13:38 ` Tangling Dan Davison
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-04-09  9:17 UTC (permalink / raw)
  To: emacs-orgmode


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.

--8<---------------cut here---------------start------------->8---
ELISP> (org-babel-load-file "/Users/andrea/Documents/pycon/miniconf.org")
*** Eval error ***  No buffer named miniconf.org
--8<---------------cut here---------------end--------------->8---

But the file is actually there, or like this
--8<---------------cut here---------------start------------->8---
ELISP> (org-babel-tangle "/Users/andrea/Documents/pycon/miniconf.org")
nil
--8<---------------cut here---------------end--------------->8---

And it doesn't export any source even if it looks something like this

--8<---------------cut here---------------start------------->8---
* Org mode
** Clock configuration
#+begin_src elisp :tangle yes
;; Clock configuration
(setq org-clock-persist t)
(org-clock-persistence-insinuate)
#+end_src
--8<---------------cut here---------------end--------------->8---

Any idea?

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

* Re: Tangling
  2010-04-09  9:17 Tangling Andrea Crotti
@ 2010-04-09 13:38 ` Dan Davison
  2010-04-11 12:22   ` Tangling Andrea Crotti
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Davison @ 2010-04-09 13:38 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: emacs-orgmode

Hi Andrea,

Andrea Crotti <andrea.crotti.0@gmail.com> 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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tangling
  2010-04-09 13:38 ` Tangling Dan Davison
@ 2010-04-11 12:22   ` Andrea Crotti
  2010-04-11 12:44     ` Tangling Dan Davison
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-04-11 12:22 UTC (permalink / raw)
  To: emacs-orgmode

Dan Davison <davison@stats.ox.ac.uk> writes:

>
> here
>
> 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

Yes thanks a lot I was doing a stupid mistake, in other files I always
used emacs-lisp.
But if it will be aliased even better (I could do it myself but I've
made a snippet for it so I won't forget again)...

So now I have a strange behaviour, sometimes the file is loaded and
sometimes is not

This is the init file:

--8<---------------cut here---------------start------------->8---
(setq base "~/Documents/pycon/")
(setq conf (concat base "conf/"))

(add-to-list 'load-path (concat conf "org-mode/lisp"))
(add-to-list 'load-path (concat conf "org-mode/contrib/babel/lisp"))

(require 'org)
(require 'org-babel)
(require 'org-babel-tangle)

(org-babel-tangle-file (concat base "miniconf.org"))
--8<---------------cut here---------------end--------------->8---

The tangling works perfectly fine on my "real" emacs conf, but with the
testing configuration I get sometimes (don't understand why sometimes it
works this)

http://gist.github.com/362682

And is short

Debugger entered--Lisp error: (void-function -mode)

What is that supposed to mean? Just some stupid mistake again?
The file to load is 
http://github.com/AndreaCrotti/Org-mode-notes/blob/master/miniconf.org
but I guess that's correct because on one emacs it works perfectly fine

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

* Re: Re: Tangling
  2010-04-11 12:22   ` Tangling Andrea Crotti
@ 2010-04-11 12:44     ` Dan Davison
  2010-04-12  8:40       ` Tangling Andrea Crotti
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Davison @ 2010-04-11 12:44 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: emacs-orgmode

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Dan Davison <davison@stats.ox.ac.uk> writes:
[...]
> So now I have a strange behaviour, sometimes the file is loaded and
> sometimes is not
>
> This is the init file:
>
> (setq base "~/Documents/pycon/")
> (setq conf (concat base "conf/"))
>
> (add-to-list 'load-path (concat conf "org-mode/lisp"))
> (add-to-list 'load-path (concat conf "org-mode/contrib/babel/lisp"))
>
> (require 'org)
> (require 'org-babel)
> (require 'org-babel-tangle)
>
> (org-babel-tangle-file (concat base "miniconf.org"))

Hi Andrea,

I think that should be

(add-to-list 'load-path (concat conf "org-mode/lisp"))
(add-to-list 'load-path (concat conf "org-mode/contrib/lisp"))

(require 'org-install)
(require 'org-babel-init)

(org-babel-tangle-file (concat base "miniconf.org"))

Dan

>
> The tangling works perfectly fine on my "real" emacs conf, but with the
> testing configuration I get sometimes (don't understand why sometimes it
> works this)
>
> http://gist.github.com/362682
>
> And is short
>
> Debugger entered--Lisp error: (void-function -mode)
>
> What is that supposed to mean? Just some stupid mistake again?
> The file to load is 
> http://github.com/AndreaCrotti/Org-mode-notes/blob/master/miniconf.org
> but I guess that's correct because on one emacs it works perfectly fine
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tangling
  2010-04-11 12:44     ` Tangling Dan Davison
@ 2010-04-12  8:40       ` Andrea Crotti
  0 siblings, 0 replies; 5+ messages in thread
From: Andrea Crotti @ 2010-04-12  8:40 UTC (permalink / raw)
  To: emacs-orgmode

Dan Davison <davison@stats.ox.ac.uk> writes:

> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>
> Hi Andrea,
>
> I think that should be
>
> (add-to-list 'load-path (concat conf "org-mode/lisp"))
> (add-to-list 'load-path (concat conf "org-mode/contrib/lisp"))
>
> (require 'org-install)
> (require 'org-babel-init)
>
> (org-babel-tangle-file (concat base "miniconf.org"))
>
> Dan
>

Great Dan thanks a lot, now it works perfectly!
So in case someone is interested can get the configuration I'm preparing here
http://github.com/AndreaCrotti/Org-mode-notes

Feel free to take what you need and modify as you wish, at the moment
it's working and should work everywhere (only my personal snippets are a
symlink so I guess it's not working outside my machine).

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

end of thread, other threads:[~2010-04-12  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09  9:17 Tangling Andrea Crotti
2010-04-09 13:38 ` Tangling Dan Davison
2010-04-11 12:22   ` Tangling Andrea Crotti
2010-04-11 12:44     ` Tangling Dan Davison
2010-04-12  8:40       ` Tangling Andrea Crotti

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.