From: Tom Gillespie <firstname.lastname@example.org> To: emacs-orgmode <email@example.com> Subject: Re: URLs with brackets not recognised Date: Wed, 12 May 2021 15:23:57 -0700 [thread overview] Message-ID: <CA+G3_PNftfRfrfuUJLC7efCPwpMgAwG74rYf=8bzOPeCN+GpeQ@mail.gmail.com> (raw) In-Reply-To: <firstname.lastname@example.org> 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?
next prev parent reply other threads:[~2021-05-12 22:24 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-12 7:32 Colin Baxter 2021-05-12 10:38 ` Nick Savage 2021-05-12 11:58 ` Maxim Nikulin 2021-05-12 13:32 ` Colin Baxter 2021-05-12 16:44 ` Colin Baxter 2021-05-12 20:06 ` Rudolf Adamkovič 2021-05-12 22:23 ` Tom Gillespie [this message] 2021-05-13 2:21 ` Tim Cross 2021-05-13 16:30 ` Maxim Nikulin 2021-05-13 1:25 ` Ihor Radchenko 2021-05-13 5:50 ` Colin Baxter 2021-05-15 9:06 ` Bastien 2021-05-15 9:29 ` Ihor Radchenko 2021-05-15 9:30 ` Ihor Radchenko 2021-05-15 9:47 ` Bastien
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CA+G3_PNftfRfrfuUJLC7efCPwpMgAwG74rYf=8bzOPeCN+GpeQ@mail.gmail.com' \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: URLs with brackets not recognised' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).