From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +Wt7BRbQ5GIIcgAAbAwnHQ (envelope-from ) for ; Sat, 30 Jul 2022 08:30:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sF95AxbQ5GJsHwAAG6o9tA (envelope-from ) for ; Sat, 30 Jul 2022 08:30:46 +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 9D8BB25C4B for ; Sat, 30 Jul 2022 08:30:45 +0200 (CEST) Received: from localhost ([::1]:55738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHfzo-0000GG-AU for larch@yhetil.org; Sat, 30 Jul 2022 02:30:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHfy6-0000G5-9X for emacs-orgmode@gnu.org; Sat, 30 Jul 2022 02:28:58 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:39471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHfy4-0005Yj-JF for emacs-orgmode@gnu.org; Sat, 30 Jul 2022 02:28:57 -0400 Received: by mail-pg1-x531.google.com with SMTP id q16so5549293pgq.6 for ; Fri, 29 Jul 2022 23:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=nEMH5nzDqVV2wC2RNNJL3U3kD69oK+FeSDn3+EanSo8=; b=gB3hIWIZUxb84g7fCZuD4Xfw32zoKcAOGHa7HB5bKEqlIHfxP4BlFfUj1CjeyToLK3 /P/TtRcIkXePjcC8a/iv7vvCHGy06Dud2jBQTJ1EGc0K12dpUIWAfel3PwKyA0ab4iAf vYZopDXpJSq683do7KgR2CZWeU2qpgRgsBiZ9zc72wWQmjTJiUN6vlmmK6Tf9ge5EK/g VKcxSEDYSHgCqMuwDBvnOYtvcbHFqS/J2X+7qYv5/Z8PCLaEcjROTCOsT88ozm8cGMvK i9PsDPO+IXhaKmqB6VB0RiDnN7a1YftRGOSciFSCKrVGmDhC3ILmrBEH9PUz7Nv9PsPW gflA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=nEMH5nzDqVV2wC2RNNJL3U3kD69oK+FeSDn3+EanSo8=; b=pa1wIxqDYu4+ppkB4vyojxCHcZq8/5JYkKvouXt7TSEdXyxCEMwCaqN9oKTNDDmN5n +TR2hHjLOFx3bXHTHWNxyOmpTiDMPNCdXzelWUONkQhtZvP0jDWiEiFabsYppcMie1QO Dj/RUhuMm6mlWnPOiUE8nhbJ500yK3HrDHvH57hjyLXNEuoMenKtkHIUL+9Vo+Pizaw3 4fCVzkDJtOoRqbHkvEUs8Utr5ECUJtt8JDWvd8WWrOCW2T0db5qcK9yRHkSOS5P7h59R F9MQ+x0X3Knen0vF1kLyuhz9vDJEd9RJSCjuWsnUYjdfnJrptqZ3cEBVOtr2/9w5wfSq jtBw== X-Gm-Message-State: ACgBeo39zFoxUcJXA+Z4vUpeU1RaFs8kiqiHJ6Qu+OMt3IIMCQV+qeKj tGOeSRObK/jTCz+g8B1EC6E= X-Google-Smtp-Source: AGRyM1vn2JjHXsJtJalJNPP5swQWG9ClXGcCdoOUn284EFaeDo9bSyItQ4kAKvEImvFBcPMjbUDZTg== X-Received: by 2002:aa7:8253:0:b0:52b:f4f7:bc55 with SMTP id e19-20020aa78253000000b0052bf4f7bc55mr7146132pfn.4.1659162534790; Fri, 29 Jul 2022 23:28:54 -0700 (PDT) Received: from localhost ([1.83.155.1]) by smtp.gmail.com with ESMTPSA id b12-20020a17090a550c00b001f2fbf2c42esm4123052pji.26.2022.07.29.23.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 23:28:54 -0700 (PDT) From: Ihor Radchenko To: Hugo Heagren Cc: Max Nikulin , emacs-orgmode@gnu.org Subject: Re: [PATCH v9] ol.el: add description format parameter to org-link-parameters In-Reply-To: <87zggrg2om.fsf@heagren.com> References: <87zgl1npow.fsf@localhost> <20220405192931.6747-1-hugo@heagren.com> <87a6cx79xn.fsf@localhost> <87zgi6fckr.fsf@heagren.com> <871qvixhfw.fsf@gmail.com> <87v8s8n1bm.fsf@heagren.com> <87let39d3c.fsf@localhost> <877d4flu3x.fsf@heagren.com> <87cze5e84m.fsf@localhost> <87tu7gkb4l.fsf@heagren.com> <87y1ws6o0c.fsf@localhost> <87k08bjw0t.fsf@heagren.com> <47248a4f-10aa-0980-c054-563f30c05aaa@gmail.com> <87mtd0gthe.fsf@heagren.com> <78b97c9e-fced-0ee4-f3f2-3cbe81080ffa@gmail.com> <87sfms9dx7.fsf@localhost> <87v8rmd53g.fsf@localhost> <871qu9xv8q.fsf@heagren.com> <0da49392-26c6-8ba3-f657-647522d59342@gmail.com> <87zggrg2om.fsf@heagren.com> Date: Sat, 30 Jul 2022 14:29:51 +0800 Message-ID: <87edy3t8o0.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=yantar92@gmail.com; helo=mail-pg1-x531.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=1659162645; 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=nEMH5nzDqVV2wC2RNNJL3U3kD69oK+FeSDn3+EanSo8=; b=Rk/Gf2EfvH4X6BQLIkqJeZOOStDu1557o3XXhrMVpjvUwFbyx738eqjKsufNv6Etgs56e5 ZLMj1OS8lUGUACvo70t3ZW3oP8ZnzHYx3Clogv6aG8En0k9eGRClSI5cHOWBOG5MGUK4LC WacqcyjjGjfGVROrpGkf4/lObsXgV0T4iCNjUp9SPX7yhfA1wvXPxiVwSE3lzE58G6INbs 8Inbni9AuMLt0tiyvT2VzuGOAkaqr/GSVFCk0ZrjJ29EtEn8EsKZsqDdsGB4JQPdUPRuxm AZTl7e6vS++XFSCC67nvciHlOqVryTz8rKt8ZxSwUXRRjessoNwfqylf4YO6Jw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659162645; a=rsa-sha256; cv=none; b=HC+kTYR53dUN9aUO/2b5wCaVXLabgXDB+0WcicMagHIz9dOueAs+vIpTqBQxNcTv6n6ENd KzDfB7fS0IMRvl+pPAayEVtp5C6LqY3sdGn7AzQmLiuE3M5D/SiLsgF/fp/RkRzN9kD2s3 pLnePDK/6lQvZ1e7bOO67pzn4U3PpWQ9ufUj7kWzyvoOo8d0WVYyMU3PNDFBXGpN/mphly pkxqLxsY1h66PsOOX5Yyk/V11eXN6QkMGe2yQFHkI1i9/bA74lXiIPH1LuSsKag4uVwElj ZmmWVwlpdQbij/snIzMpYu70k1v9NpHuPohVZAfSYLiUUSkAArjKnUqG3Nt0OA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gB3hIWIZ; 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: -5.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gB3hIWIZ; 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: 9D8BB25C4B X-Spam-Score: -5.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: g/N13G/y6n7u Hugo Heagren writes: > The test fails because of an error in `rx-to-string', which is called > by `org-insert-link'. It was failing because I have the following > code: > > ,---- > | (rx-to-string `(: string-start (submatch (or ,@all-prefixes)) ":")) > `---- > ... > We could just as easily do it by leaving the parameters as they are, > and using a link 'type' which is definitely not in the list. I have > taken this approach in the new version of the patch. I've used > "fake-link-type", which will surely not be used, even in anyone's > strange personal config. Admittedly it /could/ be used though (it > would be possible to add it if someone wanted), so if you'd rather, I > can develop something which uses a fake link type which is /by > definition/ not in `org-link-parameters', it would just be rather a > lot more work and the test case might subsequently be less clear to > understand. > > Hope that helps -- do the tests pass for you now? The tests are passing on my side. However, even though you fixed the tests, you did nothing to fix the actual problem revealed by the tests. The rx-to-string call may still suffer from the described edge case. Why not simply shield the rx-to-string call with (and all-prefixes ...)? I'd leave the previous version of the tests as they had a benefit of testing this edge case. Best, Ihor