0

For some reason doom emacs fails to open links that point to a local file ([[file:firejail.html][file]]). It's X11 KDE Arch doom emacs and if opened with xdg-open default application to open .html files works correctly (librewolf).

Messages claims that it's Running open /mnt/notes/firejail.html but nothing happens.

I'm tracing it with edebugger all the way to the org-open-file function hoping that some bug will come up. The problem appears to be that values in org-file-apps get mixed with values obtained with the org--file-default-apps run as part of the org-open-file function. One of these values appears to be (t . mailcap), which seems to take precedence over ("\\.x?html?\\'" . default).

Has anyone come across this before? Are there any common bugs on KDE with org-open-file? Any rules of thumb/workarounds?

2

1 Answer 1

1

The problem turned out to be incorrect .mailcap file:

text/html; open %s; nametemplate=%s.html
...

changing it to:

text/html; /usr/bin/xdg-open %s; nametemplate=%s.html
...

made it work. open I believe is a MacOS thing, not sure how it got there.

I managed to solve it by painstakingly tracing function call by function call and setting up edebugger to display local variables in backtrace, so it became clear at some point that there is a check against org-file-apps contents that was changed to contain mailcap.

By the way edebug-toggle-locals for debugging is such a useful tool!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.