Hello everyone, I was trying to use 'org-open-at-point' with a double prefix arg to open externally a "file:" link to a PDF. It was not working for me, so I looked into the source and eventually found that it depended on the mailcap system. Concretely, it was always opening it in Emacs.
From there, I found the user option 'mailcap-user-mime-data', which Iconfigured to open PDFs externally instead of the default Emacs 'doc-view-mode'.
I attach a patch which simply mentions that user option. I think this can make it easier for users to find what they need. All the best, Protesilaos (or simply "Prot")
From 9359477bf72a94c953ae041900c805c547c95794 Mon Sep 17 00:00:00 2001 Message-ID: <9359477bf72a94c953ae041900c805c547c95794.1791402267.git.i...@protesilaos.com> From: Protesilaos <[email protected]> Date: Wed, 7 Oct 2026 22:42:44 +0300 Subject: [PATCH] Mention 'mailcap-user-mime-data' in 'org-file-apps' docstring Learning about this user option can help users define something like the following: (setq mailcap-user-mime-data '(("pdf" (viewer . "evince %s") (type . "application/pdf") (test . window-system)))) With this, 'org-open-file' and related will open the file externally when called with a double prefix arg. Otherwise, 'org-open-file' will use 'doc-view-mode' by default. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 1d33ed90a..2c1eb1913 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1546,7 +1546,7 @@ (defcustom org-file-apps Most likely, the system-specific version of this variable does define this command, but you can overrule/replace it here. -`mailcap' Use command specified in the mailcaps. +`mailcap' Use command specified in the mailcaps (also see `mailcap-user-mime-data'). string A command to be executed by a shell; %s will be replaced by the path to the file. function A Lisp function, which will be called with two arguments: -- 2.47.3
