From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Daly Subject: Feature Request: Allow Tangling Named INCLUDEs Date: Sat, 11 Jan 2014 15:04:23 -0600 Message-ID: <87ob3ifcx4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W25jS-0005uJ-Pd for emacs-orgmode@gnu.org; Sat, 11 Jan 2014 16:04:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W25jN-00012n-L9 for emacs-orgmode@gnu.org; Sat, 11 Jan 2014 16:04:38 -0500 Received: from mail-ie0-x236.google.com ([2607:f8b0:4001:c03::236]:53282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W25jN-00012h-GF for emacs-orgmode@gnu.org; Sat, 11 Jan 2014 16:04:33 -0500 Received: by mail-ie0-f182.google.com with SMTP id as1so6697168iec.13 for ; Sat, 11 Jan 2014 13:04:32 -0800 (PST) Received: from das-boot (71-90-20-9.dhcp.ftbg.wi.charter.com. [71.90.20.9]) by mx.google.com with ESMTPSA id x13sm2097022igx.3.2014.01.11.13.04.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 11 Jan 2014 13:04:31 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi folks, I have a situation where I have many named code snippets currently available in external files, and would like to tangle them into an Org mode file. Is it currently possible to tangle included files? If not, could that feature be added to a new version of Org mode? I've looked through the mailing list history a bit and couldn't find this specific request. - What exactly did you do? :: I created the three files shown below. I then tangled the searches.org file (~C-c C-v C-t~). For convenience, all three files can be created by tangling this email. - What did you expect to happen? :: I expected the contents of the files searchItems(8|12).m to appear in lines [[search-08][(search-08)]] and [[search-12][(search-12)]]. - What happened instead? :: The templates on lines [[search-08][(search-08)]] and [[search-12][(search-12)]] were empty. Thanks for your time, Nick ---- If you don't understand the code below, that's because it's MUMPS. Be happy that you don't understand. #+begin_src org :noweb tangle :tangle searches.org -s -n :padline no ,# -*- mode: org -*- ,* Searches ,#+name: search-main ,#+begin_src text :noweb tangle :tangle searchAllItems.m , searches(pId) , n pDate,i08,i12 , f pDate=$$idForwardDate(pId,pDate) q:pDate="" d , . <> ; (ref:search-08) , . <> ; (ref:search-12) , . ; and about 30 more of these named searches. ,#+end_src ,#+name: searchItem08 ,#+INCLUDE: "searchItem08.m" src text ,#+name: searchItem12 ,#+INCLUDE: "searchItem12.m" src text #+end_src #+begin_src text :tangle searchItem08.m :padline no s i08=$$zgetnp(pId,pDate,08) i i08="" d LogIcErr("i08",i08) #+end_src #+begin_src text :tangle searchItem12.m :padline no s i12=$$zgetnp(pId,pDate,12) i $$zgetnp(pId,pDate,$$zgetnp(pId,pDate,i12))'=i12 d LogIcErr("i12",i12) #+end_src