From d635236e48b31cc32e7f627e9d47236d1ce57d2c Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Tue, 16 Jan 2018 08:44:44 +0100 Subject: [PATCH] =?UTF-8?q?[Utils]=20Use=20=E2=80=98cygstart=E2=80=99=20to?= =?UTF-8?q?=20open=20documents=20in=20custom=20helm=20interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site-lisp/db-utils.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index 0362476..b7b2448 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -281,9 +281,13 @@ path." (defun db/system-open (path) "Open PATH with default program as defined by the underlying system." - (if on-windows - (w32-shell-execute "open" path) - (start-process "" nil "xdg-open" path))) + (cond + ((eq system-type 'windows-nt) + (w32-shell-execute "open" path)) + ((eq system-type 'cygwin) + (start-process "" nil "cygstart" path)) + (t + (start-process "" nil "xdg-open" path)))) (defvar db/helm-source-important-documents '((name . "Important files")