emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] generated ":comment link" when tangling babel src blocks are not complete (or buggy)
@ 2022-12-07 18:04 Vincent Picaud
  0 siblings, 0 replies; only message in thread
From: Vincent Picaud @ 2022-12-07 18:04 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 14199 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-07 18:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 18:04 [BUG] generated ":comment link" when tangling babel src blocks are not complete (or buggy) Vincent Picaud

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