emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: Nicolas Girard <nicolas.girard@nerim.net>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [babel] Re: Re: org-babel-tangle tangles too much !
Date: Tue, 01 Dec 2009 13:50:34 -0500	[thread overview]
Message-ID: <87my22sf45.fsf_-_@stats.ox.ac.uk> (raw)
In-Reply-To: <51b0095d0912010955i5d93b3e2lbf17369048556970@mail.gmail.com> (Nicolas Girard's message of "Tue, 1 Dec 2009 18:55:20 +0100")

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

Nicolas Girard <nicolas.girard@nerim.net> 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

  parent reply	other threads:[~2009-12-01 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-01 14:54 org-babel-tangle tangles too much ! Nicolas Girard
2009-12-01 15:43 ` Thomas S. Dye
2009-12-01 15:53 ` Eric Schulte
2009-12-01 16:26 ` Dan Davison
2009-12-01 17:55 ` Nicolas Girard
2009-12-01 18:26   ` Thomas S. Dye
2009-12-01 18:50   ` Dan Davison [this message]
2009-12-01 20:08     ` [babel] " Nicolas Girard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87my22sf45.fsf_-_@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicolas.girard@nerim.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).