From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: org-babel-tangle tangles too much ! Date: Tue, 1 Dec 2009 05:43:38 -1000 Message-ID: <20E267AA-DEB5-4325-878A-531D7BE2F253@tsdye.com> References: <51b0095d0912010654y32b109b1hb3795e86cf6e0416@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============0149439130==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFUtL-0002oK-UB for emacs-orgmode@gnu.org; Tue, 01 Dec 2009 10:43:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFUtH-0002mY-LG for emacs-orgmode@gnu.org; Tue, 01 Dec 2009 10:43:51 -0500 Received: from [199.232.76.173] (port=42422 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFUtH-0002mQ-EV for emacs-orgmode@gnu.org; Tue, 01 Dec 2009 10:43:47 -0500 Received: from outbound-mail-138.bluehost.com ([67.222.39.28]:45279) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NFUtG-0007cX-Vd for emacs-orgmode@gnu.org; Tue, 01 Dec 2009 10:43:47 -0500 In-Reply-To: <51b0095d0912010654y32b109b1hb3795e86cf6e0416@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Girard Cc: emacs-orgmode --===============0149439130== Content-Type: multipart/alternative; boundary=Apple-Mail-18-54660776 --Apple-Mail-18-54660776 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 > <> > (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 <> (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 --Apple-Mail-18-54660776 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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

=3D=3D=3D=3D=3D
#+src= name: a
#+begin_src emacs-lisp
(a)
#+end_src

#+srcname: = b
#+begin_src = emacs-lisp
<<a>>
(b)
#+end_src
=3D=3D=3D=3D=3D
=
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

#+sr= cname: 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


= --Apple-Mail-18-54660776-- --===============0149439130== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0149439130==--