From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GPHAMOlH92J19QAAbAwnHQ (envelope-from ) for ; Sat, 13 Aug 2022 08:42:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sJevMOlH92JfIgEAauVa8A (envelope-from ) for ; Sat, 13 Aug 2022 08:42:49 +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 7047F36DE1 for ; Sat, 13 Aug 2022 08:42:49 +0200 (CEST) Received: from localhost ([::1]:35592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMkrA-0007an-KA for larch@yhetil.org; Sat, 13 Aug 2022 02:42:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMkpd-0007ZN-Np for emacs-orgmode@gnu.org; Sat, 13 Aug 2022 02:41:17 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:50998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMkpY-0004Wb-4w for emacs-orgmode@gnu.org; Sat, 13 Aug 2022 02:41:10 -0400 Received: by mail-pj1-x1035.google.com with SMTP id gj1so2791547pjb.0 for ; Fri, 12 Aug 2022 23:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=r0blwCEPXSvWPc/BGHthNNY1oLFrFt0IZc2NsuStcvI=; b=kd5ncX3A6DF2hmrv0v7NdDvd6NwrI1x4ERH+QGZ8csTnnR7XOgVkC/YKQIaQCamvOd C7M58buEb0Dc9d4zMmwWmplqPn3FJYZ6pfFO6eiKfevpIaVqj1lIlLkF18Nv5VebX/Kr sbKAOsjUUgKrpcoLYvICD5qpKYUynO6uhA/dB9ipvUDS31cxJquC07iO7tqQDuao5p7d ZhSVWF5GVHKKy5i2XofLkmYCH7RxoavXUYgUJu/AvtPy/LkiEPtPoeUeha9cagmWE++Y XLavU9Qi7MYU83vv7rUNHyvKcEWpqYvl72nVq/1dyfJ72DXL+u3vF68mIqFY1ylIkZLR UOTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=r0blwCEPXSvWPc/BGHthNNY1oLFrFt0IZc2NsuStcvI=; b=a8vLBUGUUONBcKygZg9REBdDro3QdorcKFkjUoepAG7Vs7WaJydxiCk40UsYcQG4t3 H0rwuPg9WNO1aQIPtq/pY7Ml6vP6oDhOaNM+guGUhzzONXt2D1O/RN+jFa7K6Tafb75p CkCt03Pl5D7F5Q6wg9EgeQFwWfsWGTIfGAvtBpDEZm5jV0CgQuwjgW31rpnF1ah1o/IM MSIhFu5hOp71dnXOhhAXDkIZ12FXHPhaE/zx7IrswL+juIkYcRr+Ft2hCHoKLCFYSX73 W/QI7tatLRR422mSB0E/v9M5qHdQ8H+CFC+hrq2on45KrCoqAFF1bXXRO1qarBZI2Dyk UdCw== X-Gm-Message-State: ACgBeo2GTUsMnCj6UkuES5vAU8y/+WKp8OtfKH+NdfaBm9IXBdi5p3c7 Ib/+YChIIp21mfJnVvGR0IKGwQwa136HEQ== X-Google-Smtp-Source: AA6agR6n1kCM+eso4zmR6Q+Q30CstLxUtLo82EPyXWoMEdXdVWzKV+q/HDbsgRZb+jz2x7wJlMS58w== X-Received: by 2002:a17:90b:380f:b0:1f5:55ef:a53a with SMTP id mq15-20020a17090b380f00b001f555efa53amr7658697pjb.14.1660372866635; Fri, 12 Aug 2022 23:41:06 -0700 (PDT) Received: from localhost ([2409:8a70:2bf:80b0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id e9-20020a17090301c900b001713d5d095dsm2913220plh.83.2022.08.12.23.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:41:05 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] ob-tangle.el: fix =?utf-8?Q?=E2=80=98=3Acomments_nowe?= =?utf-8?Q?b=E2=80=99?= double linking In-Reply-To: References: <01070182484e44f3-f0fd271a-def3-4c86-961f-9a4bb63949d5-000000@eu-central-1.amazonses.com> <87wnbvtcz9.fsf@localhost> <87o7wr9zhw.fsf@localhost> Date: Sat, 13 Aug 2022 14:42:07 +0800 Message-ID: <87o7wo7igw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1035.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660372969; 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:dkim-signature; bh=r0blwCEPXSvWPc/BGHthNNY1oLFrFt0IZc2NsuStcvI=; b=Rufn0FHNKVkAjdLDDqsUZvaxTkxu/fJC5fp73yLY8+hSICX6uP23ZoWn2cEMrWCoWzJDE0 VOMS2SAJQpk5tES/M/D/yI9Zd1qtUHCYXnWTIFqz+q+TpdS5ZnJiUeEuwvFTw33+jfhTby 6i/oyLYgsmZV23fqaIFQGya1sLnvMFQZvWwBg87TkqPlWGhzmmygwjnojOfPnXUTMVuvIn gtdD0GnsF5oCrfDASWFaoMHSkOyWYfPwnBGRX2yxw0sQWNuHqvRkLAJ1Eg7frcgF7IvxSB qBnT5HL6nWjCXxmUlXak1wkCk55ILYVFX43sxGwTJIk3h6Bvu2PFCNSwKHYvxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660372969; a=rsa-sha256; cv=none; b=lQKYBsedf6aFt0rKFS8oD3RnrtVCgen7L4DbxH5h6OaM/C4njYKgtBx+3XY/b0jlvSsvph cOsl7MBsezhMSnqQe7XhlOThahExEaCuQ84gzjQv80GZE8PotKjsjQYnD+oopRkeTxA+UF x1WDuxqujb4PLXGwZFyJOQp0VvZj6i5s3tr7RjaZkyoVXrwQBA1K6lM13TcZQCP/NuNh3k SSom1XMJgK4bv2P5a6Rg0Acv8fCQebv67al0auUPc1VE4GMiUF47J5IHGK9fmJyU0r1mem LtjpMgGqWXQPq8GDe+SIGbZfSxUHkVQNo+3mztgq0KQ0lJwo9SucHKIwj4u/Ww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kd5ncX3A; 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: -1.86 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kd5ncX3A; 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: 7047F36DE1 X-Spam-Score: -1.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: jf21EH4ZQPGB Max Nikulin writes: >> + (bare (and (string-match org-link-bracket-re l) >> + (match-string 1 l)))) >> + (when bare >> + (if (and org-babel-tangle-use-relative-file-links >> + (string-match org-link-types-re bare) >> + (string= (match-string 1 bare) "file")) > > It looks like (string-prefix-p "file:" bare) but without the complex > regexp. I see, such code was used before. By the way, why it is "bare", > not e.g. "target"? match-end is used later in the code. Thus, string-match is justified. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92