summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2013-09-02 12:05:42 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2013-09-02 12:06:28 +0200
commit15ae89b3949f52db1b5579e383c2d9f6c9173992 (patch)
tree06a6ed482fc434b518f1f6fb83d0bf9a21458cf8
parent3f10db731c81944536cc592b62ba15796af6a3df (diff)
downloadorg-mode-15ae89b3949f52db1b5579e383c2d9f6c9173992.tar.gz
Use `xdg-open' to open files where available
* lisp/org.el (org-file-apps-defaults-gnu): Use `xdg-open' to open files where available.
-rw-r--r--lisp/org.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 5d39e08..48518be 100644
--- a/lisp/org.el
+++ b/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'.")