emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] generated ":comment link" when tangling babel src blocks are not c


From: Vincent Picaud
Subject: [BUG] generated ":comment link" when tangling babel src blocks are not complete (or buggy)
Date: Wed, 7 Dec 2022 19:04:14 +0100

When I tangle code "C-c C-v t" of this org-mode file:

        #+title: Demo
        #+property: header-args:sh :tangle example.sh :comments link
        
        * Part A
        ** source
        #+begin_src sh
          echo "Part A"
        #+end_src
        
        * Part B
        ** source
        #+begin_src sh
          echo "Part B"
        #+end_src
        
I get this example.sh file

        # [[file:poub.org::*source][source:1]]
        echo "Part A"
        # source:1 ends here
        
        # [[file:poub.org::*source][source:1]]
        echo "Part B"
        # source:1 ends here
        
Now I move to the line "echo "Part B"" of this example.sh file and call
org-babel-tangle-jump-to-org. This causes me to jump back to the
org-mode file as expected, but it jumps to the "* Part A" heading instead of the right "* Part B" heading.

If I manually modify the generated example.sh file as follows

        # [[file:poub.org::*source][source:2]]
        echo "Part B"
        # source:2 ends here

then org-babel-tangle-jump-to-org works correctly and jumps back to
right "* Part B" header's source block.

Do you observe the same behavior ? Is there a way to get expected behavior (still having 2 headings with the same "source" name) ?

Thanks,
despite that, org-mode is awesome! :)

Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2022-11-09
Package: Org mode version 9.6 (9.6-gc59d6d @ /home/picaud/.emacs.d/straight/build/org/)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]