From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giorgio Valoti Subject: Link to original Org file with batch mode, a follow-up Date: Tue, 05 Jul 2011 06:51:04 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdxbN-0002Ai-U9 for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 00:51:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdxbM-0001c2-7f for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 00:51:13 -0400 Received: from asmtpout022.mac.com ([17.148.16.97]:43053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdxbL-0001bo-T1 for emacs-orgmode@gnu.org; Tue, 05 Jul 2011 00:51:12 -0400 Received: from [192.168.1.112] ([93.62.99.244]) by asmtp022.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LNU00HFDG543R00@asmtp022.mac.com> for emacs-orgmode@gnu.org; Mon, 04 Jul 2011 21:51:07 -0700 (PDT) In-reply-to: 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 Il giorno 04/lug/2011, alle ore 06:58, Giorgio Valoti ha scritto: > Hi, > when I try to tangle files in batch mode, using a command like this: > > emacs -batch ~/Developer/PROJECTS/gmp/project.org --eval="(org-babel-tangle)" > > the resulting files do not have links to the original file, i.e.: > > > > while if I tangle from emacs I get this, as expected: > > > > Is there a way to generate links in batch mode? Or perhaps should I use a different way to invoke tangling from the command line? While looking at this, I discovered that :comments no web option does not work IDs, but only with paths, i.e. with this file: # [[file:~/Desktop/org-links-test.org::*A%20section][A-section:1]] ls -la # A-section:1 ends here (org-babel-detangle) works but not with this: # [[id:5E3B176A-50C7-4DC3-A54F-D769000D8D8A][A-section:1]] ls -la # A-section:1 ends here Also, (org-babel-detangle) does not seem to work with nested blocks: #! /bin/bash # [[file:~/Desktop/org-links-test.org::*Main%20block][main-block]] # [[file:~/Desktop/org-links-test.org::*Block%201][block1]] echo 'this is the first block!' # block1 ends here # [[file:~/Desktop/org-links-test.org::*Block%202][block2]] echo 'the second block!' # block2 ends here # main-block ends here generated from this file: * Detangling nested block ** Block 1 #+srcname: block1 #+begin_src sh echo 'this is the first block' #+end_src ** Block 2 #+srcname: block2 #+begin_src sh echo 'the second block' #+end_src ** Main block #+srcname: main-block #+begin_src sh :comments noweb :noweb yes :tangle script2.sh :shebang #! /bin/bash <> <> #+end_src Hope this helps Ciao -- Giorgio Valoti