From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EBq9DqZVnGBvBAEAgWs5BA (envelope-from ) for ; Thu, 13 May 2021 00:24:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YHhUCqZVnGCAMwAAB5/wlQ (envelope-from ) for ; Wed, 12 May 2021 22:24:38 +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 83AC3205AE for ; Thu, 13 May 2021 00:24:37 +0200 (CEST) Received: from localhost ([::1]:34684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgxHQ-0001dX-DB for larch@yhetil.org; Wed, 12 May 2021 18:24:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgxH4-0001d9-Hs for emacs-orgmode@gnu.org; Wed, 12 May 2021 18:24:14 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:42764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgxH2-0007mg-RC for emacs-orgmode@gnu.org; Wed, 12 May 2021 18:24:14 -0400 Received: by mail-wr1-x435.google.com with SMTP id x8so2850337wrq.9 for ; Wed, 12 May 2021 15:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=iuo7ZOl0n0dhwp6v87lknASuIe8lbmOdoMu5iUtXl4U=; b=t2aJto7HzO/J4RjUl8Gr45Be9r50TqmQMC6EA0AqmojDBo0lK1pPmtMHyrQ8I1EkaM nhbowF/kbOqxBBXNSDmZnlVjdriH/WssW5uaGxSFn+gLf7YA9zxqes1W+33Pue5AUp04 dz7aJ1hOs7ay+f1QE54bAOq+tCB/2CTeb+iPKFgkgMLeqjUpZGruzETPgbpj3so35MoR VZLVhKTPQkGKhjZ8ULGWWL0d5GWusIKWgTNiA5jHVbfpguF97xoCevfPUKP7DurniGTe rNtwZpRoTG3yet7yuZBc+/OPQ1ObaAQohDpgq/IIjRWqa+v4mdnFxCC75BzbDJ/eEZXe yaww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=iuo7ZOl0n0dhwp6v87lknASuIe8lbmOdoMu5iUtXl4U=; b=UiEU7YniWqrES+Gg4Gtf0cSQ/JXWFywHWIVXCEOg/DzvyVwl4rgWGr8Rox3oIRpi7i 58dITILyLb5kksaHZ4/iJ16LNUPxVFh0DtOi5PJUeXXrUfkFQAdBBRetNSG4JImFHfLv ToE//U2gaRl4gJ128hzzCJzQjFEHCjMLwgnY1Sw2DP4BZpO5ivfz/io4MVg/EgxrULHC BEyKDplHkBIpw7NP+eiMh725EhZkCA03PsvO1wV0/UhO0OJeS/9ZJp2SE3J8uGFENEmE AhnOv4/hI/5kUaZUYJHAjfrsseVvUkqXNRHO3WBS7H2T9qXWGmRfX4nHXUhJ5LLOjhfv 7F3w== X-Gm-Message-State: AOAM5336XNh0Qu2zhCI8XEgX2RvM6wznP75HUYz+WE4zWwIy0HiBkiYo XYTSHj8rLT6Yo6dKsLs1RuEOv7ceDTEwk+ZpmGURTpDs4TZgoA== X-Google-Smtp-Source: ABdhPJyEOzbctjtxtoZMUd8hIMFHyo2Tv6eugjWh2N3Br8AyWx6eO0QAcI1OOZctVIw4zBdH4AlH+mqNvDbvKQYtluQ= X-Received: by 2002:adf:f701:: with SMTP id r1mr47443227wrp.67.1620858250419; Wed, 12 May 2021 15:24:10 -0700 (PDT) MIME-Version: 1.0 References: <87lf8k2yr6.fsf@yandex.com> In-Reply-To: From: Tom Gillespie Date: Wed, 12 May 2021 15:23:57 -0700 Message-ID: Subject: Re: URLs with brackets not recognised To: emacs-orgmode Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x435.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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620858277; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=iuo7ZOl0n0dhwp6v87lknASuIe8lbmOdoMu5iUtXl4U=; b=BPgMWuHPtOsTvQGhBFpXBSfb7WWDb848sgKpkU6FGCMnx/8bseCRkmPJ3AcXiKZlAAK7qa JeIFVguBNCCYmyIG2dOVcWPulxn1ZsuJqT9BpN/rbxHsbXjPV+WtfalIHAInF96ajtZ3RH bsuf4L+NWo3UBnePFOHwUqn0nj/tKtq37Vm1zJUifhXL0eM0kTywkTYgrsmEHg0TKgepZU vVRJagdNYJ2hqUflgxw1QQU+BPcQ+UjOMHaHFnY7jJQO3oU1y93RbUQ81Mz6qQYNEMpbL8 7wAQKGtOEf6YIWZXBfXeI78YxWCufs0G1va4NDS3v3PKDWvHepCsaq6Md2E43g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620858277; a=rsa-sha256; cv=none; b=MThIqu6Tg/PTAMyEYs3F4E1JUQFJsgDabXgX4H5PJdG0nlonVoSFvPS+2NzYAsU9SHa4vF 0pXGGo/TRA23yq2BnZez/eCa0qJp47C60g/EpAnetqBh+nXWdhWUMPMmNgr2DXhYsWhfLb hjQiMceEbQhrUOJIzyERshXUJwtVOszYeCGpgiZZVhcoWIjUJwIuj0aors7DKW1c/RAtJI 0dyFV3RT20+9fy5tkFcSj4YQ1A8/EWuCGbwNtfn0oAPgcJL1L+lXq+tUaN5vRtUPcZ6Fnu 8vIIg/rE8TWVnGaOIAdR4xpNp7LOARf8vaMVKhGbbsci54vuhU3Nkuj48E+2Mg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=t2aJto7H; 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-Spam-Score: -3.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=t2aJto7H; 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: 83AC3205AE X-Spam-Score: -3.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: IBaPemj01ZtM A quick fix is to percent encode the troublesome characters, but the underlying issue is in org-link-any-re which is defined in org-link-make-regexps which is what org uses to find the next link. Some improvements might be possible for some of the edge cases there, but a complete solution for bare urls is not possible due to conflicts with native org syntax. Org doesn't handle these cases well because in some cases org's own syntax takes priority over url syntax at the moment adding bare url syntax as part of org syntax is something that could be considered. However, I would suggest against that because it will taint any org parser in the future by forcing it to implement full url parsing at arbitrary positions in paragraphs, which adds a lot of complexity. I also suggest against it because org already has clear ways to demarcate links using <> and [[]] which are guaranteed to behave correctly even in cases where org syntax will always take priority. For example with https://en.wikipedia.org/wiki/Cathedral_Basilica_of_St._John_the_Baptist_[[Savannah,_Georgia]]. > It might be worthwhile to issue an warning each time a url is written in > an org file without enclosing brackets < > or [[ ]]. Unfortunately warning on links without < > or [[ ]] will generate countless annoying false positives for anyone who doesn't hit this edge case. Maybe a separate function could be added to org lint that would not run all the time?