On 31/05/2025 08:09, Charles Choi wrote:
Interim snapshot of rewrite of Org Protocol page.
I have added "URL format" to subject of this branch of the discussion.
+++ b/org-contrib/org-protocol.org
+The host part of the URL is interpreted as a /sub-protocol/.
I would avoid explicit statement about "host part". There was various
issues with interpreting of URL parts, e.g. notice triple slash in:
<https://github.com/sprig/org-capture-extension/pull/30>
I admit that old variant of URLs with "missed port number" (after colon)
is obsolete now:
org-protocol://sub-protocol:/URL/....
and slash is allowed before query part since Org-9.4, "path" part may be
added before "?" query. Earlier URLs may be considered invalid:
org-protocol://sub-protocol?url=...
I would not be surprised if some system may try to resolve "host part"
to IP address to perform some checks. From my point of view, single (or
triple) slash after scheme part is more reliable and compatible
org-protocol:/sub-protocol[/]?url=...&body=...
I would consider no slashes at all (similar to mailto:), but it is not
supported currently and migration to `server-eval-args-left' likely
should be done before.
Docs currently use double slash, however I prefer to avoid using "host
part" term, so convention may be changed later. OS-level handlers should
treat everything after org-protocol: as a opaque string.