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 ms0.migadu.com with LMTPS id mJxaEWw952GsjQAAgWs5BA (envelope-from ) for ; Tue, 18 Jan 2022 23:21:32 +0100 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 yHANCmw952E8GQAAG6o9tA (envelope-from ) for ; Tue, 18 Jan 2022 23:21:32 +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 DF0CF14BBE for ; Tue, 18 Jan 2022 23:21:31 +0100 (CET) Received: from localhost ([::1]:41214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9wr3-0002xp-AR for larch@yhetil.org; Tue, 18 Jan 2022 17:21:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9wq8-0002u0-Up for emacs-orgmode@gnu.org; Tue, 18 Jan 2022 17:20:35 -0500 Received: from [2a00:1450:4864:20::530] (port=36467 helo=mail-ed1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9wq1-0002Ml-98 for emacs-orgmode@gnu.org; Tue, 18 Jan 2022 17:20:29 -0500 Received: by mail-ed1-x530.google.com with SMTP id 30so1923183edv.3 for ; Tue, 18 Jan 2022 14:20:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=ELCAsKZCnOpFhAED4XdXxYN0xIahtmwc7v6tyKmqeHo=; b=KkWp3AVlnw9GtXLGacrFCpxa5uq1nUd8kW+RvVWlcfS3ts9oCQi7dzgH57x33+Kq0C fAKf7TeWoo1pqTQ/3ICra8OVuUe+HBCQQdGvMt8jK9dwKRSUZL8lV9RFbBSp9rFHf1UJ 1xhPm7Dtd5mqWodVMUffp66uZHgbJUIDtdGnCACWQUieF/s3FFWUpm6BXEwG9q+MZV08 /I1fBeFpay+FTeh/yWQ2K28OsQ33ghrkV9SjM3l+7ucbrsIitA4vTjHniOHqCJYptuNh hFP84lCskq7kkUEbC5tj8vv5Nw1S+HET4H4JiGPnbmqGO1bI2+kgAF4DRYU2tarV72BB yzKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ELCAsKZCnOpFhAED4XdXxYN0xIahtmwc7v6tyKmqeHo=; b=JIMqi9hIZcGj3+2zQghqHKhx9LkdJtmjyrRw8wway1QwXQfGMe7/va1LJdvxVw5tQT 2NJiRBBO4gvtQyQYIpgzt81LxvzHlPZJkvh6kqW75PPZxzMRVF4gHPE/5WhWsiMCY6E2 Kj/QWU6wEbL1fBxo7CQvFKiBUliptALmOWHeXMqEE0uUxL43A6LTJouYia6Ltt3iPS6s qwFulYUPVfyvVj2ormqlDRIrB12+9Lp4ToYY70p9FPWVA5WQFOkQWDJb/Btk+UWq0ZZ0 mm1i2ZLdJ6JRq9KClIPyRFnIHk0Ba9osFXBJhav40P6qNTd/eFsUeNrFHqXD1gBBm1XL hSrw== X-Gm-Message-State: AOAM533B9sOYb7x/1VRqlu5M7VhTXwYhDj8TBQeYclzbkPsRqTgfc6Wb ene80PSYPZm5K9waOruhjb4Z/g35WyZ3KGBv4KGsZjY7j0Q= X-Google-Smtp-Source: ABdhPJwPzzCXU+7AgKi1ttJMO5tr5zPtj5ylB3eOL2R9PZWHyV/DRO5950Gx7hvxX7gJw0S3k5dxNGDmtwRAZUhGJMY= X-Received: by 2002:a17:907:a088:: with SMTP id hu8mr9722880ejc.371.1642544422684; Tue, 18 Jan 2022 14:20:22 -0800 (PST) MIME-Version: 1.0 From: Luis Osa Date: Tue, 18 Jan 2022 23:20:11 +0100 Message-ID: Subject: Problem when tangling source blocks with custom coderefs To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000d78acc05d5e2acc0" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::530 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=luis.osa.gdc@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: 17 X-Spam_score: 1.7 X-Spam_bar: + X-Spam_report: (1.7 / 5.0 requ) AC_FROM_MANY_DOTS=2.997, 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" 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=1642544491; 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=ELCAsKZCnOpFhAED4XdXxYN0xIahtmwc7v6tyKmqeHo=; b=Jkbh229UgiO0soaF9Yl1kST/Yv5EgQr96zyUGF8SGONttXBxR/YdngSFYX97SZZr5SWaUp ZZGSHi8M86TZ1+tvhRH36tYK5mqNRUPRRpqmZI1xJKlOpZLB7PpcpwJmB7wrqYi/vaAJQ3 oOflQP3uwV4OyiDE2QZkiImDTudLTiasBjXamCpFzJ//T+uVaPY2OY4nIQHPp9LliCxIad 1rihkIAa6FaWmLStY6/EVX0yoY9+cLdk67oRDXTFWqDtQY70F5xiJBqLHgOzFGMOXgScar WWzsn+KnTfTP0565VsyCzXnleb69lp9Qibvd4WHIShPi9ArLEFSwca0zpe86pw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642544491; a=rsa-sha256; cv=none; b=NTEK2XAD/dXzWvE1PCKam6F3WeGBgZVskM4zADnYtwSKXVOnmDVrV5FutcNMuPOEjPd3jR IX6rHY5qvJHdZWCzhzA+23A4A2+wM7K+ZAxEgw28GYDdZ8peWGuZXXxJAC5oJOluI+BuJM pLjBNN2bRwfkjIVGf6Teb3aXan7v/pIbV2qCWbPmGK+MdpmjELaqrKhE8L3KAyuMoJrOGE E/rJrB2JxkQW67j9uI1f/Ki3+kYPnflaMIR7ulyDn1S/hBHCMlTpRoVCBy+blLiEij0396 HVqOJ368HkuecKAS5DqGnNyHZf31SKbyMV0zJsc1FscBagYI4dxhSdTfQO9WAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KkWp3AVl; 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: -4.32 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KkWp3AVl; 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: DF0CF14BBE X-Spam-Score: -4.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: v8W4wHZR8VsM --000000000000d78acc05d5e2acc0 Content-Type: text/plain; charset="UTF-8" Dear all, I would like to tangle source code blocks that contain coderefs. I have found that the coderefs are correctly filtered out from the tangled files if they follow the default format, i.e. "(ref:%s)", but not if I try to customize the format using the documented "-l" switch [1] to change them to something else, e.g. "|%s|". Here is an example: #+begin_src python -r -l "|%s|" :tangle example.py try: sys.exit(app.run()) except: |\label{line:except}\ding{182}| sys.exit(1) #+end_src In line \ref{line:except}, marked \ding{182}, we are catching all exceptions ... After using `org-babel-tangle`, I would expect `example.py` to not have any of the text between the `||` characters, but it is there and it makes the file invalid to run. I have found a thread in this mail list [2] where the coderef format used during tangle is streamlined to use the function `org-src-coderef-regexp`. That seems to be correct, but the behavior I am seeing does not recognize the custom format correctly. Can someone please tell me if I am doing something wrong? Or is that function not doing what it is intended to do? I am running Org mode version 9.6 on top of GNU Emacs 27.2. Thank you, Luis References: [1] https://orgmode.org/manual/Literal-Examples.html [2] https://list.orgmode.org/CA+G3_PONzfmfB-UpUcE3jzPw5fVsbjzTeCCO4UkToa9NeUUU-w@mail.gmail.com/#R --000000000000d78acc05d5e2acc0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear all,

I would like to ta= ngle source code blocks that contain coderefs. I have found that the codere= fs are correctly filtered out from the tangled files if they follow the def= ault format, i.e. "(ref:%s)", but not if I try to customize the f= ormat using the documented "-l" switch [1] to change them to some= thing else, e.g. "|%s|".

Here is an = example:

=C2=A0 =C2=A0 #+begin_src python -r -l &q= uot;|%s|" :tangle example.py
=C2=A0 =C2=A0 try:
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 sys.exit(app.run())
=C2=A0 =C2=A0 except: =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0|\label{line:except}\ding{182}|
=C2=A0 =C2=A0= =C2=A0 =C2=A0 sys.exit(1)
=C2=A0 =C2=A0 #+end_src

=C2=A0 =C2=A0 = In line \ref{line:except}, marked \ding{182}, we are catching all exception= s ...

After using `org-babel-tangle`, I would expe= ct `example.py` to not have any of the text between the `||` characters, bu= t it is there and it makes the file invalid to run.

I have found a thread in this mail list [2] where the coderef format= used during tangle is streamlined to use the function `org-src-coderef-regexp`. That seems to be correct, but the behavior = I am seeing does not recognize the custom format correctly. Can someone ple= ase tell me if I am doing something wrong? Or is that function not doing wh= at it is intended to do?
I am running Org mode version = 9.6 on top of GNU Emacs 27.2.
Thank you,
<= span class=3D"gmail-add">=C2=A0 Luis

Re= ferences:
--000000000000d78acc05d5e2acc0--