Org-mode mailing list
 help / color / mirror / Atom feed
From: Maxim Nikulin <>
Subject: Re: [PATCH] Re: [BUG] [C-u C-u C-c C-o] open link with external program invalid to open file
Date: Fri, 22 Jan 2021 00:12:33 +0700
Message-ID: <ruccm2$r9d$> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]

On 21/01/2021 07:58, Christopher Miles wrote:
> I "=git am=" your first patch, but failed to apply your second patch. Seems not
> continuous. So I modify code manually. I found I can't find the local variable
> ~shell-command~, and ~shell-command-switch~. Can your provide complete patch? So I
> can test it.

Second patch is an alternative to the first one. I could do 'git apply 
org-open-file-make-process-min.patch' to the current master with no 
conflict. However you are right, it should be ~shell-file-name~, not 
~shell-command~. There is a typo in ~shell-command-switch~. Both 
~shell-file-name~ and ~shell-command-switch~ are defined in emacs 
sources, they are not local variables.

I do not think that the first patch could be accepted in any form. 
Launching a handler without shell is a serious change. However trying to 
rewrite that part, I realized that original code has a problem.

I intentionally do not add formal patch description since I suppose that 
error reporting should be improved.

[-- Attachment #2: org-open-file-make-process-min-2.patch --]
[-- Type: text/x-patch, Size: 571 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 5b1443c4e..cf9e46525 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8765,7 +8765,9 @@ If the file does not exist, throw an error."
 	(message "Running %s...done" cmd)
-	(start-process-shell-command cmd nil cmd)
+	(make-process :name "org-open-file" :connection-type 'pipe
+		      :buffer "*Messages*" :noquery 't
+		      :command (list shell-file-name shell-command-switch cmd))
 	(and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))))
      ((or (stringp cmd)
 	  (eq cmd 'emacs))

  reply	other threads:[~2021-01-21 17:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13  7:49 stardiviner
2020-06-13 14:51 ` Nicolas Goaziou
2020-06-14  9:08   ` stardiviner
2020-06-14 21:06     ` Nicolas Goaziou
2021-01-10 11:26   ` [BUG] [C-u C-u C-c C-o] open link with external program auto exited before child process " Christopher Miles
     [not found]   ` <87sg799gnx.fsf@numbchild>
2021-01-10 12:13     ` Christopher Miles
2020-09-05  7:52 ` [BUG] [C-u C-u C-c C-o] open link with external program invalid to " Bastien
2021-01-18 16:32   ` Maxim Nikulin
2021-01-19  1:53     ` Christopher Miles
2021-01-19 17:00       ` Maxim Nikulin
2021-01-20  3:21         ` Christopher Miles
2021-01-20 16:27           ` Maxim Nikulin
2021-01-21  0:58             ` [PATCH] " Christopher Miles
2021-01-21 17:12               ` Maxim Nikulin [this message]
2021-01-22  6:00                 ` Christopher Miles
2021-03-10 14:55                   ` Maxim Nikulin
2021-03-11  9:33                     ` Christopher Miles

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:

  List information:

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

  git send-email \
    --in-reply-to='ruccm2$r9d$' \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ \
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone