[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12972: 24.3.50; Move `org-open-file' and associated code out of Org

From: Maxim Nikulin
Subject: bug#12972: 24.3.50; Move `org-open-file' and associated code out of Org mode
Date: Fri, 30 Jul 2021 19:24:47 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 30/07/2021 19:01, Lars Ingebrigtsen wrote:
Maxim Nikulin writes:

I am attaching a patch similar to proposed to Org mode that should
help to avoid obscure failures of viewers due to unnecessary terminal

Thanks; makes sense to me (and seems to fix these persistent issues with
xgd-open etc), so I've applied it to Emacs 28.

Thanks for looking into this issue. Please, consider the following additional change:

----- 8< -----
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index f64897ac9b..aeeb9bd8d3 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -1186,7 +1186,6 @@ See \"~/.mailcap\", `mailcap-mime-data' and related files and variables."
      :name "mailcap-view-file"
      :connection-type 'pipe
-     :noquery t
      :buffer nil ; "*Messages*" may be suitable for debugging
      :sentinel (lambda (proc event)
                  (when (and (memq (process-status proc) '(exit signal))
---- >8 ----

I did not update the patch since Eli had some objections (unclear to me). I wrongly added :noquery expecting to get a process completely detached from Emacs, something like result of "synchronous"

    (process-file-shell-command command nil 0 nil)

on linux (on stackoverflow I have seen a note that w32 requires special treatment).

Notice that "pipe" asynchronous Emacs processes have a problem with CPU consumption if a process does something like

exec 1>&-
exec 2>&-
sleep 30

Though I believe even silently killed on exit children and CPU-hungry Emacs in rare cases are better than decade old pseudoterminal+SIGHUP problem with xdg-open. I suppose, it is an Emacs bug, note Gnome or KDE issue.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]