From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0J8oA8m4pmQyJQEASxT56A (envelope-from ) for ; Thu, 06 Jul 2023 14:51:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yLgxAsm4pmSDIQEAG6o9tA (envelope-from ) for ; Thu, 06 Jul 2023 14:51:21 +0200 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 CCA543EEF5 for ; Thu, 6 Jul 2023 14:51:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHOR6-0007Le-5I; Thu, 06 Jul 2023 08:50:16 -0400 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 1qHOR4-0007L1-HO for emacs-orgmode@gnu.org; Thu, 06 Jul 2023 08:50:14 -0400 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHOR2-0001tS-K5 for emacs-orgmode@gnu.org; Thu, 06 Jul 2023 08:50:14 -0400 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-56597d949b1so426873eaf.1 for ; Thu, 06 Jul 2023 05:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688647810; x=1691239810; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=a2aaLFHq/V9x5/NoZld3CSzMuqJBzFx3d+AemWElx6M=; b=if8LM/yM5K8E67VpJDFx5LJuC1nwVmj5CBruGZZhCM9GuxLsGrMveZTb5OFvjeVQqd 7grGUxdCcVh45Q32ZH+EQDRnbmaynjMTyRlu4SLIueFlu23OBPUfkcv8Ms1WT8N/7r9+ 9K6gSPeKucY1VJC1lZ38Z9GF9q2ZfZNlBndA5ZFx3g9m9yKemIGnugv6ebs5S+8fJinT tCQaMuVMRyyM5y76M3xaSm/3XoDojuCd3QntS6olZD8DeA8Hp6WCTaCesfN9k9eXR56y 2U29Wu2TG00BPUowb/sDGt+cymRg8wnlUgQOzgVSCi+LS/YmE+7pXtWpDrm6XV3MbK+8 emAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688647810; x=1691239810; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=a2aaLFHq/V9x5/NoZld3CSzMuqJBzFx3d+AemWElx6M=; b=ABWQLlvoakLo8Z/WNI7HB4E9TVCmCPOaqDqkJKHAz1xQxrkcrv/xGS3y//r8R7o3Xf F8WO19LNHsZI09zjAVh9kiw8ROIp9rNfk4cU7GQNkXr/J8kfx+Bzjb+yFY3yb5igcOgK LJ3It4TlLUIIZl8MS8CNmCg4YtVnOy4Wet39Os2HIr+Au2UE2Icvkh4OphOIC9U+TzR8 AYWWUf0abrVWEaSMRqVR08Nt7JXje1qvu9i9ZIbmPKoJscuk4o5hb2GEJm3dsA7+sErv MuJysuG+dgnSToYwwZJfTdVLJfpO94nL4TB9nymYgViJU7fc6cUk1WzeSzsgwt3zIjjs ZXwQ== X-Gm-Message-State: ABy/qLa7UGNfxiLTV6ad9bXy3xuS6boTFsC+Ut9DVPTAmvE0Aqqa4JTq TZ/GY4wFk6P0re3/RKC/oTWX61QkAp+NCyosZci5HuZt/Dw= X-Google-Smtp-Source: APBJJlEFzt4EwTD4QcMVS6PbAli60+BUJR4FfhgIBWRxI9VXsqEk8lByv5SrLZfhZ231WGWwuQ9rQ92Xv+tgduG05d8= X-Received: by 2002:a05:6808:255:b0:3a1:f36c:3fdb with SMTP id m21-20020a056808025500b003a1f36c3fdbmr1402800oie.47.1688647810110; Thu, 06 Jul 2023 05:50:10 -0700 (PDT) MIME-Version: 1.0 From: Dan Drake Date: Thu, 6 Jul 2023 07:49:59 -0500 Message-ID: Subject: inconsistency links and code line labels To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000df5ae905ffd0f466" Received-SPF: pass client-ip=2607:f8b0:4864:20::c31; envelope-from=dan.drake@gmail.com; helo=mail-oo1-xc31.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, T_SCC_BODY_TEXT_LINE=-0.01 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688647880; 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=a2aaLFHq/V9x5/NoZld3CSzMuqJBzFx3d+AemWElx6M=; b=SWh27SmijMAQWdmxC3hrsVmju9YFpE4dT6B06DNatL8aTxIMiKOONMvj9JPuMTGIUi8u8b q1PFCpK+MPa1BijbvzXhGOyi7FBOcH9tPFJcMRzrtcTYSOfxcLf8tfKq3hZ5ijeIMJTYU5 xnMj6QmsOc7llC46XKF2KxIY3h2e55W82+jp7pCiPP4qrmxkwTOdzRSGW6jFdlJXEnwF+V F0obxwEL2YFXMJw0OTpHAQLlSU3RPwz57FFjw0t31V+NgM0Ky9Se4kw3UfZIxo+PexAxeT zR5U7KIv1pyiy5nxJnWXws/DvTtFUcrUW+V6ul4TdEUQ0yuf1QD2oXjZBwcUow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="if8LM/yM"; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688647880; a=rsa-sha256; cv=none; b=bFzreRi0PKSiYsVA0yACnEQsk6yFiEpn7VbnSLS1tpcKXIqww8MZgxRXLbsrN8n+boAumO 1dbr3GDh+hKKOo13CWS9gh/XwQeP8RLGc/kCPNRKFFzo2yNAuKNwzO43CsMXyljYwghjM3 ugvGMfPlPpMllp2ruijOl6oR0AOEd34aU6j+J5Vvwx9k5WbY7i3drqkuNzj7hkZUbw4N8G 9nP1INJU1r3H24i5mTOsxhujNDHq5joq+5pmhDo6eJktWUTq4xTGNU28+EdbjfENICnnH5 WvUYi4ss6kMDGOSQyZXW+VaR6zYX3nqIB70ZvMW+HPPlXM8vqxxJDpEQFgxTgQ== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="if8LM/yM"; 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: CCA543EEF5 X-Spam-Score: -4.94 X-TUID: JZ/1Wq47J9JG --000000000000df5ae905ffd0f466 Content-Type: text/plain; charset="UTF-8" Hello -- I'm wondering about my question from here: https://emacs.stackexchange.com/questions/77768/why-the-inconsistency-with-org-mode-code-line-labels-and-links Copying my question: in a source code special block, I can add code line labels, which have ref: in the label -- but when I make a link there, I have to omit the ref:. For example: #+begin_src csharp 1044 string foo = someFunction(1234); 1045 if (foo == "1") 1046 { 1047 bar = 5; // (ref:my-code-line-label) 1048 } // etc etc #+end_src There's a bug [[(my-code-line-label)][right here]]. This seems inconsistent. Why do I have to omit the ref: bit? This always confuses me; it seems like it would be simpler to just make the label and the links to that line of code be exactly the same. I don't see any particular reference to this in the org manual ( https://orgmode.org/manual/Internal-Links.html). Any insights? My idea would be to get rid of the special behavior for code line labels and just make this work with dedicated targets: in regular parts of my org file, I use <> and can make links to that. It would be simple and consistent to make that also work the same when <> is inside a code block. Thanks! -- Ceci n'est pas une .signature. --000000000000df5ae905ffd0f466 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello -- I'm wondering about my question from her= e:


Copying my question: in a= source code special block, I can add code line labels, which have ref: in = the label -- but when I make a link there, I have to omit the ref:. For exa= mple:

#+begin_src csharp
1044 string foo =3D someFunction(1234);<= br>1045 if (foo =3D=3D "1")
1046 {
1047 =C2=A0 =C2=A0 bar = =3D 5; // =C2=A0(ref:my-code-line-label)
1048 }
// etc etc
#+end_s= rc

There's a bug [[(my-code-line-label)][right here]].

This seems inconsistent. Why do I have to omit the ref: bit? This always= confuses me; it seems like it would be simpler to just make the label and = the links to that line of code be exactly the same. I don't see any par= ticular reference to this in the org manual (https://orgmode.org/manual/Internal-Links.html= ). Any insights?

My idea=20 would be to get rid of the special behav= ior for code line=20 labels and just make this work with dedicated targets: in regular parts=20 of my org file, I use <<link-target>> and can make links to=20 that. It would be simple and consistent to make that also work the same=20 when <<link-target>> is inside a code block.
<= span class=3D"gmail-comment-copy">
Thanks!
=20

--
Ceci= n'est pas une .signature.
--000000000000df5ae905ffd0f466--