From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KJ4RGRvTcGDubQAAgWs5BA (envelope-from ) for ; Sat, 10 Apr 2021 00:20:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QIoOExvTcGBeAwAA1q6Kng (envelope-from ) for ; Fri, 09 Apr 2021 22:20:11 +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 9A72317E62 for ; Sat, 10 Apr 2021 00:20:10 +0200 (CEST) Received: from localhost ([::1]:60356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUzU0-0000Rk-RB for larch@yhetil.org; Fri, 09 Apr 2021 18:20:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUzTf-0000Re-1C for emacs-orgmode@gnu.org; Fri, 09 Apr 2021 18:19:47 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:50075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUzTc-0006rn-Qy for emacs-orgmode@gnu.org; Fri, 09 Apr 2021 18:19:46 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 7BE53C0003; Fri, 9 Apr 2021 22:19:41 +0000 (UTC) From: Nicolas Goaziou To: Tom Gillespie Subject: Re: Bug: inconsistent escaping of coderef regexp References: <877dlmhuu9.fsf@nicolasgoaziou.fr> <877dlhod94.fsf@nicolasgoaziou.fr> <875z0ym0x8.fsf@nicolasgoaziou.fr> Mail-Followup-To: Tom Gillespie , emacs-orgmode Date: Sat, 10 Apr 2021 00:19:40 +0200 In-Reply-To: (Tom Gillespie's message of "Wed, 7 Apr 2021 12:44:28 -0700") Message-ID: <878s5rt81v.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.198; envelope-from=mail@nicolasgoaziou.fr; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618006810; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=cthYKQeoQZ3rbLZtpUoIHCzRvBfNIMu+cycp/lvlWu0=; b=nIVZyorkfjG9sMJUNrllq/M79t6tr/UdpRVWH66tMgJCAwv/gXcEmUWXrnORpcCpeq54eV DXOaJ3UX7S1eifnF6mkTqMp+81HmOj+/y/vpQ4FhD/ci8gO+zOC/0ylvlyIhXBwHB522oy Z2waMroIAS8+UwGbLkN7JrMo7yox37k1orMHyRyLxNn7UOLwjxMT6AvUbNLRJ9ZxnFYiM+ M3bxRvfbX+7Doqc5PV/4ZQxQQfpDCjDgsG5lFi48yVxECLVEHYRP3fuJ5c/nynu8TMSmSX yVSkL43/9XlWULHRDsQUs6obQ6hQB7uqCOM7/5+p3V2ITVhBcaIg1yOpQyB6Dw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618006810; a=rsa-sha256; cv=none; b=SGRz8a0eiJoDbXXBBYuYp1V1uPKOU5k6DE8KwluHDnai1CyDpn/xLvH7qtTnawAu8dpAGz NSgV+RCfxtC89jTXHSABzWRoRSRizXsdAAcJn8tHHvD40rSmQgghiEHSVaWaZi12bETEmu N1EN/GuMuqEUvDCVII47UmHeh+tUkOJmDL4vnaz6es29NtihmcIAbfrZxOH+fIS6/sJEW/ CmGcCNe2GD/I0PmIi6bWuc79pr8lykdqi2d46fBl71E3oTeJ7F+fj/dFWS//PkhauPT61f 2P6Yxn/bwEH4lmycb6nAZovkedwZ7Djn2KktZOM82cRHxsKuSVWolnk/fJpvPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 9A72317E62 X-Spam-Score: -2.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: dDcwGbQx2AGQ Hello, Tom Gillespie writes: > I've included the simplest patch I could come up with for the > divergence in behavior between org-babel-tangle-single-file and > org-link-search. Thank you. I applied it. > https://code.orgmode.org/bzg/org-mode/src/2d78ea57cfad1ddc3e993c949daf117b76315170/lisp/org-src.el#L882 > > That line defines a hardcoded regular expression for matching > coderefs. It is a reasonable one, however, since it just means "the coderef is the last thing on the line". > The codref prefix is the first =[ \t]*= and the coderef > regexp is the equivalent to the fully formatted version of that format > string. Neither of those can currently be specified by the user. [...] > The coderef prefix is something that should probably be configurable > by the user so that empty comments are not left in the file. I'm not convinced this should be configurable, as I fail to see a use-case for such a customization. Note that in the case you mention, comment syntax should probably be part of the coderef label itself. Regards, -- Nicolas Goaziou