From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SKUNLeN781/3HgAA0tVLHw (envelope-from ) for ; Mon, 04 Jan 2021 20:34:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oB3YKON7819hcwAAbx9fmQ (envelope-from ) for ; Mon, 04 Jan 2021 20:34:43 +0000 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 3DDB2940341 for ; Mon, 4 Jan 2021 20:34:43 +0000 (UTC) Received: from localhost ([::1]:33538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwWYq-0000QJ-EY for larch@yhetil.org; Mon, 04 Jan 2021 15:34:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwWXq-0000Mo-8z for emacs-orgmode@gnu.org; Mon, 04 Jan 2021 15:33:39 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:45601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwWXm-0000X5-0X for emacs-orgmode@gnu.org; Mon, 04 Jan 2021 15:33:37 -0500 Received: by mail-wr1-x430.google.com with SMTP id d26so33390797wrb.12 for ; Mon, 04 Jan 2021 12:33:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jecHWJ9hiB0IqElae4ml9/C25BJYz3Bx7+/WCbk01no=; b=KpKWZ3VxhdPwVvs5b4GdrqcF5lLJm5PgDNquzznjesCHrYZ/9utu+ORvWBXOqkZO5q DkvbPybMzFySg9FmAQdlEgCl4vo/QWcB1LNS12duIr/ewilqLUoxXIaGrpXbUbPSE2an 1NGczyiVgZLI30WZAtyd/Qdvr758Fkc5oxhSBJJvcrhfHuGEGM3jnLQd06wUmrv9ddcw fhfbozeGTW0sb66Acy3kZCqrwHypD6uTEFkHOeIOYTt+An/iGqHnKXZgdyGJ7E5s5+LQ W4VBBLllxPPyIvwBLWhQCLUCV5Xh4fhJJnyKMSZBQZNsbUrmtPZv7C1SloJSRPHxYgcL p6+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jecHWJ9hiB0IqElae4ml9/C25BJYz3Bx7+/WCbk01no=; b=iZOtXPb4zAOSBAysxmlHaJutH4OnPhfLMOaKOhdBGK7nkb97mLT33GUbMqGT/lwF3q dDCTvrAdiNxD4mdgr7Y53jcYr00NgXHI/WWsqHSdOT3w4Zwwur8NgyuRUEGf4X3cnKmP RSC9jbkTOZq9V4kNWj6FdLnL2r8mRlMSqaBG+A9U12e1lyx3O1bFV2foXBb9fDMav2V/ PkR4MLDTox3lo2PnvzIBPoLd4KBvmErcrUGDVzaiY44puV/ejm6JeixIjF/scT52OG8z Qgg5yCMiWTPvUunqt66UlfkGKwzfKsWQs2O2O6xIZ7CYZIlma+EQ56GDimMhjCElo/oC CHww== X-Gm-Message-State: AOAM530JP++uMz2QNXvOQHsva6bcDBR9Pg30biNMOxcrTvkx7qvdz/QO wtyTw1Hre4K6iK+BcRzcVFYpRt86be29oH1jNc+g9VhYrYA= X-Google-Smtp-Source: ABdhPJxci9VfGjkLdXOaSsGdnq4Q4r6pEiX8DmUDhOXSpkJ2/TZsJOwbMw3RrXjyLKvvXQ87V7klhusltnzba/HOZyQ= X-Received: by 2002:adf:c403:: with SMTP id v3mr80241749wrf.55.1609792410647; Mon, 04 Jan 2021 12:33:30 -0800 (PST) MIME-Version: 1.0 From: Tom Gillespie Date: Mon, 4 Jan 2021 15:33:19 -0500 Message-ID: Subject: Bug: inconsistent escaping of coderef regexp To: emacs-orgmode Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x430.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, 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.23 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-Spam-Score: -3.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=KpKWZ3Vx; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3DDB2940341 X-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: EVmNuCe7W6sr It is not possible to strip coderefs when tangling and also search for those coderefs using org-link-search. This is because org-link-search uses org-src-coderef-regexp which calls regexp-quote on the regexp string while org-babel-tangle-single-block does not and uses the regexp string directly without quoting it. I'm not sure about the best way to fix this. It seems to me that the call to regexp-quote should be removed but I'm not entirely sure of the consequences of doing that. Thoughts? Best, Tom PS While on the topic of coderefs, let me drop a note that is a preview of some of the issues I have encountered while working on a full formal grammar for org. Having the -l switch control this is an awful design that induces more complexity into the org-mode grammar than nearly any other feature. Source block switches are completely inconsistent with the rest of org and completely undiscoverable. I had no idea they even existed until I was trying to figure out which header argument could be used to set the coderef regexp. The -l option and switches in general need to have their behavior implemented as part of the standard header arguments like everything else so that users can migrate away from switches with an eye toward removing them entirely.