Browse Source

Revert "Revert "Use `xdg-open' to open files where available""

This reverts commit e26c55f5b5f1189f63c9a0a41f29164fd878a698.
Carsten Dominik 11 years ago
parent
commit
0022904e83
1 changed files with 7 additions and 3 deletions
  1. 7 3
      lisp/org.el

+ 7 - 3
lisp/org.el

@@ -1894,9 +1894,13 @@ single keystroke rather than having to type \"yes\"."
   :type 'regexp)
 
 (defconst org-file-apps-defaults-gnu
-  '((remote . emacs)
-    (system . mailcap)
-    (t . mailcap))
+  (append
+   '((remote . emacs))
+   (if (executable-find "xdg-open")
+       '((system . "xdg-open %s")
+	 (t . "xdg-open %s"))
+     '((system . mailcap)
+       (t . mailcap))))
   "Default file applications on a UNIX or GNU/Linux system.
 See `org-file-apps'.")