浏览代码

Use `xdg-open' to open files where available

* lisp/org.el (org-file-apps-defaults-gnu): Use `xdg-open' to open files
  where available.
Carsten Dominik 11 年之前
父节点
当前提交
15ae89b394
共有 1 个文件被更改,包括 7 次插入3 次删除
  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'.")