emacs-orgmode
[Top][All Lists]
Advanced

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

[babel] Re: [Orgmode] Re: org-babel-tangle tangles too much !


From: Dan Davison
Subject: [babel] Re: [Orgmode] Re: org-babel-tangle tangles too much !
Date: Tue, 01 Dec 2009 13:50:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

**thread participants: let's not forget to put [babel] in the subject line.**

Nicolas Girard <address@hidden> writes:

> On Tue, 01 Dec 2009 05:43:38 -1000, Thomas S. Dye wrote :
>>
>> Your code snippet doesn't tangle at all here.  Perhaps you have a
>> setting somewhere that has an effect on tangling?
>>
>
> I'm intending my file (username.org) to be processed by Eric's
> emacs-starter-kit during init (via org-babel-load-file I guess).
>
> As none of the other starter-kit.org seemed to bother with ":tangle
> yes" I didn't either.

Hi Nicolas,

I just tried to do this and it seemed to work. Could you tell me if this
is similar to what you are doing, and if so whether it works for you? I
have an org file /tmp/ng.org:

-----------------------------------------------------
* heading
#+srcname: a
#+begin_src emacs-lisp :tangle no
  (setq startup-var1 'startup-var1-value)
#+end_src

#+srcname: b
#+begin_src emacs-lisp
  <<a>>
  (setq startup-var2 'startup-var2-value)
#+end_src
-----------------------------------------------------

and then I evaluated this

(org-babel-load-file "/tmp/ng.org")

That resulted in /tmp/ng.el:

-----------------------------------------------------
;; generated by org-babel-tangle
;; [[file:/tmp/ng.org::*heading][b]]
(setq startup-var1 'startup-var1-value)
(setq startup-var2 'startup-var2-value)
;; b ends here
-----------------------------------------------------

And afterwards, the two startup-var* variables had their values set.

Does this help?

Dan




reply via email to

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