On 28/06/2025 17:51, Max Nikulin wrote:
The player is killed by SIGPIPE when it tries to write a warning to
stderr.
[...]
https://list.orgmode.org/t7aqif$c2f$1...@ciao.gmane.io/
[PATCH] org.el: Use `call-process' to launch external viewers (was: Re:
[BUG] org-open-file immediately termininates when calling xdg-open that
calls emacsclient).
Fri, 3 Jun 2022 00:04:12 +0700
Comments should be updated.
The question is which way switching to `call-process' may affect macOS
and Windows users. (I am in doubts if anybody opens file from Org while
using DOS.) Are there Windows users who have something besides
system/default in `org-file-apps'? Certainly error handling becomes
completely impossible.
`browse-url-default-macosx-browser' and `shell-command-do-open' use
`start-process' on macOS. We may define a new function to spawn xdg-open
using `call-process' and leave current approach for other commands.
In addition, I have noticed `browse-url-process-environment' that may be
useful for `org-open-file' as well. The question here is why
`browse-url' has another code related to environment.
Ideally, there should be a native method to launch file viewer similar
to URL handler recently added in
72eb5f8bedb 2024-12-23 13:34:11 -0500 Daniel Colascione:
Make browser windows pop up when browsing URLs on Wayland
<https://yhetil.org/emacs/20241223192320.39021-1-dan...@dancol.org/>
Comment to the commit says that it is necessary for support of
xdg-activation Wayland protocol. Otherwise viewer may be silently
started behind Emacs frame.
The main question is effect of the patch on macOS, other complications
may be postponed.