danielmagnussons / orgmode

orgmode is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system.
MIT License
753 stars 70 forks source link

org-babel-tangle-comment-links : link stays at 1 when tangling a unique file #73

Closed flintforge closed 6 years ago

flintforge commented 6 years ago

* TEST org v 9.1.9

the link-data passed to org-fill-template org-babel-tangle-comment-format-beg in org-babel-tangle-comment-links seems incorrect when tangling a single block. example :

#+BEGIN_SRC shell :tangle /tmp/src1 :comments link
this is src1
#+END_SRC

#+BEGIN_SRC shell :tangle /tmp/src2 :comments link
that's SRC2
#+END_SRC

tangle the file : elisp:org-babel-tangle `C-c C-v t`

#+NAME: cat
#+BEGIN_SRC shell :results output 
cat /tmp/src1 /tmp/src2
#+END_SRC

#+RESULTS: cat
: # [[file:/tmp/test.org::*TEST][TEST:1]]
: this is src1
: # TEST:1 ends here
: # [[file:/tmp/test.org::*TEST][TEST:2]]
: that's SRC2
: # TEST:2 ends here

okay everything's fine

Now tangle only the second block C-u C-c C-v t over it (I don't know how to do it programatically)

#+CALL: cat()

#+RESULTS:
: # [[file:/tmp/test.org::*TEST][TEST:1]]
: this is src1
: # TEST:1 ends here
: # [[file:/tmp/test.org::*TEST][TEST:1]]
: that's SRC2
: # TEST:1 ends here

whereas : # [[file:/tmp/test.org::*TEST][TEST:2]] would be expected

flintforge commented 6 years ago

woop, wrong repository