org-capture-extension: broken when using xdg-open
Hi there,
I had to change the URI to var uri = 'org-protocol:///';(note the three /) in order to make the extension work on Linux where it calls xdg-open. This seems to be a known problem, cf. https://github.com/alphapapa/org-protocol-capture-html#chrome
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (9 by maintainers)
Commits related to this issue
- fix URL handling when using xdg-open using two `/` leads to the second `:` being eaten by xdg-open fixes #16 — committed to malb/org-capture-extension by malb 8 years ago
- Added workaround from #16 to readme — committed to sprig/org-capture-extension by sprig 7 years ago
Update: This is outdated. Turns out
gioalso shares the same “bug”!I too am witnessing the second colon getting eaten.
tl;dr To the best I can surmise, the culprit is actually KDE.
NOT this extension; NOT xdg-open.
Here’s what I can see. Rather than debugging on emacs directly, here’s a script that just prints its arguments.
argdebug~/.local/share/applications/emacs-capture.desktopa direct call, of course, works fine…
xdg-open eats a colon…
but there’s more to the story than just that. If I trace
xdg-openusingbash -x, I find that it very quickly delegates its job to another program:kde-open5 is eating the colon!
What is kde-open5? As far as I can tell, it’s part of a CLI front end to various features of
kio, which appears to be KDE’s own magical url-handling system that tries to abstract file operations over “file://”, “http://”, “ssh://”, zip files, radio transmissions from mars, and etc., etc.,I tried looking further into it, but kde has a large and heavily factored C++ codebase that would take a while to digest.
aside: It’s also very picky about what colons it eats. It’s actually quite amusing. I have no cohesive explanation that can describe all of its output.
(the last example shows why #17 works as a workaround for KDE users; the extra slash somehow protects the colon)