GNU bug report logs - #12972
24.3.50; Move `org-open-file' and associated code out of Org mode

Previous Next

Packages: org-mode, emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 23 Nov 2012 19:16:02 UTC

Severity: wishlist

Tags: patch

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Nikulin <manikulin <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 12972 <at> debbugs.gnu.org
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
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
>> sessions.
> 
> 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."
     (make-process
      :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

#!/bin/sh
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.
https://lists.gnu.org/archive/html/emacs-devel/2009-07/msg00279.html




This bug report was last modified 3 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.