emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Link to original Org file with batch mode
@ 2011-07-04  4:58 Giorgio Valoti
  2011-07-05  4:51 ` Link to original Org file with batch mode, a follow-up Giorgio Valoti
  0 siblings, 1 reply; 2+ messages in thread
From: Giorgio Valoti @ 2011-07-04  4:58 UTC (permalink / raw)
  To: emacs-orgmode

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.:

<!-- [[][GUI:1]] -->

while if I tangle from emacs I get this, as expected:

<!-- [[id:5E3B176A-50C7-4DC3-A54F-D769000D8D8A][GUI:1]] -->

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?

Thank you in advance	


--
Giorgio Valoti

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Link to original Org file with batch mode, a follow-up
  2011-07-04  4:58 Link to original Org file with batch mode Giorgio Valoti
@ 2011-07-05  4:51 ` Giorgio Valoti
  0 siblings, 0 replies; 2+ messages in thread
From: Giorgio Valoti @ 2011-07-05  4:51 UTC (permalink / raw)
  To: emacs-orgmode


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.:
> 
> <!-- [[][GUI:1]] -->
> 
> while if I tangle from emacs I get this, as expected:
> 
> <!-- [[id:5E3B176A-50C7-4DC3-A54F-D769000D8D8A][GUI:1]] -->
> 
> 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
     <<block1>>
     <<block2>>     
   #+end_src


Hope this helps




Ciao
--
Giorgio Valoti

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-05  4:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-04  4:58 Link to original Org file with batch mode Giorgio Valoti
2011-07-05  4:51 ` Link to original Org file with batch mode, a follow-up Giorgio Valoti

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).