Don' use `dired-open' when on windows

The reason is that `dired-open--start-process' uses POSIX tools (sh, nohup) that
are not generally available on Windows.
This commit is contained in:
Daniel - 2020-01-10 18:16:03 +01:00
parent 9ab5d55237
commit a4f2428e49
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 6 additions and 7 deletions

13
init.el
View File

@ -1846,14 +1846,13 @@ in the main agenda view."
(add-to-list 'font-lock-maximum-decoration '(wdired-mode . 1))
(add-to-list 'font-lock-maximum-decoration '(dired-mode . 1)))
(with-demoted-errors "Non-Fatal Errors (dired-open): %s"
(when (and (eq system-type 'windows-nt)
(not (package-installed-p 'w32-browser)))
(warn "`w32-browser not installed, dired will have reduced functionality."))
(when (and (eq system-type 'windows-nt)
(not (package-installed-p 'w32-browser)))
(warn "`w32-browser not installed, dired will have reduced functionality."))
(require 'dired-open)
(when (eq system-type 'gnu/linux)
(unless (eq system-type 'windows-nt)
(with-demoted-errors "Non-Fatal Errors (dired-open): %s"
(require 'dired-open)
(bind-key "M-RET" #'dired-open-xdg dired-mode-map)))
;; Gnus support in dired