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.
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."
(save-window-excursion
(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))