Manuel Giraud <[email protected]> writes:
> Tags: patch
>
> Hi,
>
> Here is a patch to make `dired-do-open' work on some non GNU/Linux
> systems. I have tested it on OpenBSD with "xdg-open" installed.
>
> Thanks,
>
> In GNU Emacs 31.0.50 (build 19, x86_64-unknown-openbsd7.6) of 2024-09-02
> built on computer
> Repository revision: 92ea393a16e5c99a8860dab368c6ca3ca6abc3c5
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
> System Description: OpenBSD computer 7.6 GENERIC.MP#294 amd64
>
> Configured using:
> 'configure CC=egcc CPPFLAGS=-I/usr/local/include
> LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
> --bindir=/home/manuel/bin --with-x-toolkit=no --without-cairo
> --without-compress-install'
>
>>From ab26a89395b5745c8e3d87a8907344ba774a5ca1 Mon Sep 17 00:00:00 2001
> From: Manuel Giraud <[email protected]>
> Date: Tue, 3 Sep 2024 15:13:51 +0200
> Subject: [PATCH] Make `dired-do-open' work on non GNU/Linux systems
>
> * lisp/dired-aux.el (dired-do-open): Permit this function to
> work on some non GNU/Linux systems.
> ---
> lisp/dired-aux.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
> index cd948bd7dd9..97b1e28a4ff 100644
> --- a/lisp/dired-aux.el
> +++ b/lisp/dired-aux.el
> @@ -1472,7 +1472,7 @@ dired-do-open
> (when command
> (dolist (file files)
> (cond
> - ((memq system-type '(gnu/linux))
> + ((memq system-type '(gnu/linux berkeley-unix))
Are these the only systems with xdg-open? And is xdg-open reliably
available on BSD systems, so that we don't generate an opaque error
message if that is not the case?
> (call-process command nil 0 nil file))
> ((memq system-type '(ms-dos))
> (shell-command (concat command " " (shell-quote-argument file))))
> --
> 2.46.0
--
Philip Kaludercic on siskin