Hi Nicolas,

On Dec 1, 2009, at 4:54 AM, Nicolas Girard wrote:

Hi,
I can't get tangle to work the way I want.
Given a file f.org which contains

=====
#+srcname: a
#+begin_src emacs-lisp
(a)
#+end_src

#+srcname: b
#+begin_src emacs-lisp
<<a>>
(b)
#+end_src
=====

I would like (a) to appear only once in the tangled file f.el.
All I could get is, that either (a) appears twice (default behaviour),
or (a) doesn't appear at all when I append ":tangle no" to #+srcname:
a.

Any thoughts ?

Your code snippet doesn't tangle at all here.  Perhaps you have a setting somewhere that has an effect on tangling?

This one does tangle:

* Nicolas Girard
#+srcname: a
#+begin_src emacs-lisp
(a)
#+end_src

#+srcname: b
#+begin_src emacs-lisp :tangle test.el
<<a>>
(b)
#+end_src

It yields:

;; generated by org-babel-tangle
;; [[file:~/Public/projects/worg/Worg/babel-doc/test.org::*Nicolas%20Girard][b]]
(a)
(b)
;; b ends here

Is this what you're after?

HTH,
Tom


Thomas S. Dye, Ph.D.

T. S. Dye & Colleagues, Archaeologists, Inc.

Phone: (808) 529-0866 Fax: (808) 529-0884

http://www.tsdye.com