From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uB37KeLVkGN0ZwEAbAwnHQ (envelope-from ) for ; Wed, 07 Dec 2022 19:05:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WNgjKeLVkGPpcAAAG6o9tA (envelope-from ) for ; Wed, 07 Dec 2022 19:05:22 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1DFB61BB8 for ; Wed, 7 Dec 2022 19:05:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2ymb-0006Tm-J3; Wed, 07 Dec 2022 13:04:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2ymU-0006Se-KH for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 13:04:35 -0500 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2ymS-0001j5-5N for emacs-orgmode@gnu.org; Wed, 07 Dec 2022 13:04:30 -0500 Received: by mail-pj1-x1034.google.com with SMTP id cm20so18399073pjb.1 for ; Wed, 07 Dec 2022 10:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=6W50z97gghzhesDMDfAFdOhpZxNoTQOceuwp68Cn8Es=; b=Weu5HZ3JYnu1FUnUQFMsGOrocuQ1DFC64Ic7oFI1AcaZ/6CnMTouk/S4KTBdfNN0kZ lq06fuEHYy0lnkXTS+VzbK37GBDMCUpu7Gef61yOePx4lTDonkdLzj/MoNGhZy+MLArN 2sbn4b57s+LyvwWyhezwYLB7kwG1zWViqwY9tq3F3SHrm4hRAmNX0KnprlNvIZaYVmBf smwXh3bpBoe5z+x+hOnV2vARfDdXsvelpX3Ehx3OU1dFqfKb1t2FvLmVCQ/xqySNmmHT DrUNHnnoe9nhV2rxwA01e7/VfQD90LsX7foqDGEiRYTv/EteAOCEZNfb3ZaoA23CGZFR 8i/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6W50z97gghzhesDMDfAFdOhpZxNoTQOceuwp68Cn8Es=; b=Q9BxcQwXTrELGxAkrFFPtHxXFmZ2qRiX9FP5mspoATxCCE7KS5xVJo1btosZ7EiXcc 0vYvSioHK0O5E/ZIKhQ5u8u2rgNLdPGqAuQkRldpvvxYxPHaXLVFNbfCMlI4OtDeh1hF EuEG3depiOpa9Ll2V6Uh1Q7b7J9rGCm8XFtKcVzlWlNg1OmhrELTAM3RwHiVIbHefHKU bNJUC2+13ri1hA5tZlK5XQxXp0BqmPQ2urYp0Wbtktt2DwqfDHa3jr1bJCtz9XOEf4pc 8OWnYFusoiUJ7aVm8IFdT5WDe23PX+mVLOZEXal+AS+/YcVV7FVWvy7JhAyxQO7j59Pl TMBA== X-Gm-Message-State: ANoB5pmMOGcfDXJCkTL0mppRhtZpcxcswy4FRyuIjnlDuIOm/zZtFh6d H2fuiwxSzSQ4Oj/1WXjHL8NACGeLRW7FTzCh9PpNoJCjpf8= X-Google-Smtp-Source: AA0mqf48dffJxy5mWb7xTpg0Yd5V5stKhCLtLBCw1pBKG2plNncG8kUJFS3BqwLVhZtnQrgrqWSNSR3hFyXLvNx/Ukk= X-Received: by 2002:a17:902:9307:b0:189:9284:2140 with SMTP id bc7-20020a170902930700b0018992842140mr45369298plb.111.1670436265678; Wed, 07 Dec 2022 10:04:25 -0800 (PST) MIME-Version: 1.0 From: Vincent Picaud Date: Wed, 7 Dec 2022 19:04:14 +0100 Message-ID: Subject: [BUG] generated ":comment link" when tangling babel src blocks are not complete (or buggy) To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000003c5daf05ef40c019" Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=picaud.vincent@gmail.com; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670436322; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6W50z97gghzhesDMDfAFdOhpZxNoTQOceuwp68Cn8Es=; b=MZz+1pAdGxeDVSX6JszKfbqXx5awOzudntgrakHuZNfdzE+cHgi5DtvmKrbbU6m0p4LMPO 3yLEkAq91yQBwd5odgaomzpYyN2iIkMUKkQMVcGog0wiBW0GRSOmFgNMjVQ87EazUOj58S /K6AN+lrOUxlXRGtG5JA73k6jmzmRSHVgW9TpRVtKK497t5aCzdl2b0kapXMIOSW1TzMza gR5pxIJpFkAjh1iG2KLpuUf8uUJPRBlS0hROc+UGehFdrMNfvl2ai9pb3BZhgCOMcrUdWz +8Bv8pGl9l8/ypW5WUQh71NIwvnB//y8wplRXokPhu+uRSBi6qhZxdxGQLcXLg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670436322; a=rsa-sha256; cv=none; b=TqMr3pB6ZY9fI5kR3xkowpc1QWZoh43bWI0hFPzhFVTGQe3l555TJvRv8hWAxdSDG9QkR1 ysqg+3y5CK7rbpUQbH62RELL5CYJLmJQtzSbKPkL18syo8UtumXIq0UpIZ3g7MkuDfWa8A y8LTq01Z8Xw7H+UVTg580+cM/aqITXwlxvKMYF/48zXRFGK2u0aaGIAtgauJ8hhDZRsO5l ampOjl6SRaLguOSbqUyLd9Wtp3DqVQzInyIYBszAEfcitz1EF+lUHEaFV2m0qE4hx6VrzD Nu2gpKpPOY3x05CPCZYx1rh54vKzKQylP4A4AnNtvYQAUPmNpeOpxYXgfWgzwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Weu5HZ3J; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.96 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Weu5HZ3J; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1DFB61BB8 X-Spam-Score: -5.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: fMVMr7HG5jSf --0000000000003c5daf05ef40c019 Content-Type: text/plain; charset="UTF-8" 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/) --0000000000003c5daf05ef40c019 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When I tangle code &quo= t;C-c C-v t" of this org-mode file:

=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#+title: Demo
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#+property: he= ader-args:sh :tangle example.sh :comments link
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
<= div style=3D"color:rgb(46,52,54);font-family:monospace;font-size:14.6667px;= font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:n= ormal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px= ;text-decoration:none;width:71ch">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0* Part A
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0** source
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#+begin_src = sh
=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 echo "Part A"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0#+end_= src
=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Part B
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0** source<= br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0#+begin_src sh
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0#+end_src
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
I get this example.sh file

=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# [[file:poub.org::*source][source:1]]<= br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0echo "Part A"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# source:1 ends = here
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# [[file:poub.org::*source][sourc= e:1]]
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0echo "Part B"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# source:1= ends here
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
= Now I move to the line "echo "Part B"" of this example.= sh file and call
org-babel-tang= le-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

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# [[file:poub.o= rg::*source][source:2]]
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0echo "Part B"
=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0# source:2 ends here
<= br>
then org-babel-tangle-jump-to-o= rg works correctly and jumps back to
right "* Part B" header's source block.

Do you observe the same behavior ? Is ther= e a way to get expected behavior (still having 2 headings with the same &qu= ot;source" name) ?

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

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


--0000000000003c5daf05ef40c019--