Make default system open function work on Linux

I am not sure why it hasn't been working until now, and I am not sure why it
indeed does work now, but it does, and that sufficient for me – at least for
now.
This commit is contained in:
Daniel - 2023-07-07 17:02:42 +02:00
parent c45ca29ad0
commit 83e66e785f
Signed by: dbo
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 10 additions and 1 deletions

View File

@ -383,7 +383,16 @@ This runs “git annex find” with MATCHING-OPTIONS (a string) in
((eq system-type 'cygwin)
(start-process "" nil "cygstart" path))
(t
(start-process "" nil "xdg-open" path))))
;; Somehow calling xdg-open via `start-process' does not start any
;; application, the subprocess spawned by xdg-open seems to be die
;; somewhen; the same behavior can be observed when using
;; `async-shell-command' instead of `start-process' with the appropriate
;; command. However, using `shell-command' or `call-process' seem to work,
;; but they are blocking Emacs while the programm is running. Wrapping
;; those in an `async-start' does the trick then.
(async-start
#'(lambda ()
(call-process "xdg-open" nil nil nil path))))))
(defun keyboard-quit-context+ ()
"Quit current context.