emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maxim Nikulin <manikulin@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 12972@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	[thread overview]
Message-ID: <631ca586-51ef-a967-f01b-410f69068aae@gmail.com> (raw)
In-Reply-To: <87r1fgnh7t.fsf_-_@gnus.org>

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




  reply	other threads:[~2021-07-30 12:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F3C1A7E58B2441F7A674239043AC031A@us.oracle.com>
2021-06-01  6:56 ` bug#12972: 24.3.50; Move `org-open-file' and associated code out of Org mode Lars Ingebrigtsen
     [not found] ` <87r1hmdqek.fsf__16088.3597027109$1622530682$gmane$org@gnus.org>
2021-06-02 16:20   ` Maxim Nikulin
2021-07-01 17:01   ` bug#12972: [PATCH] Avoid regression in mailcap-view-file similar to Bug#44824 Maxim Nikulin
2021-07-01 18:38     ` Eli Zaretskii
     [not found]     ` <835yxtlw14.fsf__2546.8955327355$1625164803$gmane$org@gnu.org>
2021-07-02 12:21       ` Maxim Nikulin
2021-07-02 12:37         ` Eli Zaretskii
     [not found]         ` <837di8ki24.fsf__46278.4886871063$1625229533$gmane$org@gnu.org>
2021-07-02 16:24           ` Maxim Nikulin
2021-07-02 17:28             ` Eli Zaretskii
     [not found]             ` <831r8gk4m0.fsf__14172.0669272885$1625246977$gmane$org@gnu.org>
2021-07-03 11:29               ` Maxim Nikulin
2021-07-03 11:56                 ` Eli Zaretskii
     [not found]                 ` <83im1ripaz.fsf__31901.4239286602$1625313464$gmane$org@gnu.org>
2021-07-04 13:37                   ` Maxim Nikulin
2021-07-04 13:49                     ` Eli Zaretskii
2021-07-05 13:12                       ` Maxim Nikulin
2021-07-05 15:23                         ` Eli Zaretskii
2021-07-30 12:01     ` bug#12972: 24.3.50; Move `org-open-file' and associated code out of Org mode Lars Ingebrigtsen
2021-07-30 12:24       ` Maxim Nikulin [this message]
2021-07-30 12:42         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=631ca586-51ef-a967-f01b-410f69068aae@gmail.com \
    --to=manikulin@gmail.com \
    --cc=12972@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).