On 16/06/2025 18:47, Christian Moe wrote:
Mint and xfce. The browser is Firefox.
I can not reproduce the issue with double slash after org-prtocol: in a
VM with Debian 12 bookworm (stable), XFCE 4.18, Firefox 128.11 ESR,
Emacs-28.2
Single slash does work, and so
does triple slash, quadruple slash, etc. Only double slash after
org-protocol fails.
To avoid the known Firefox issue, I tried trailing void. Notice double slash
javascript:location.href='org-protocol://store-link:/'+encodeURIComponent(location.href)+'/'+encodeURIComponent(document.title);void(0)
While configuring org-protocol, I faced all sort of issues, but double
slash was not an obstacle.
If you are interested in debugging then you may try
xdg-open org-protocol://store-link/http%3a%2f%2flocalhost/some%20title
or XFCE native exo-open to determine if it is a Firefox issue. In
Firefox developer tools console settings you may enable "Persist logs"
to not clear messages on navigation events. It should allow to inspect
what URL Firefox actually tries to open.
You may try to configure alternative URL scheme handler instead of
emacsclient to see what command is executed by desktop environment. You
may use a dialog tool like xmessage or zenity directly or with a wrapper
like
<https://github.com/maxnikulin/linkremark/blob/master/examples/linux-desktop/org_protocol_debug.py>
(with -d option it may generate contents of .desktop file).
When the URL scheme is handled by emacsclient, in some cases the
following command may provide a clue concerning actual command
(store-link should finish quick enough, but capture may wait for buffer
edits).
ps xw | grep '[e]macsclient
May you post .desktop file that is used as org-protocol: scheme handler?
Perhaps it is better to start a new thread and later to post here a
result if we have one more case when double slash URL variant causes
trouble.