On 20/01/2021 10:21, Christopher Miles wrote:
Thanks for your working. I will modify my mailcap config temporary until Org Mode fix this issue. You're right, this change might break some behavior of some users. I don't understand Emacs sub-process mechanism. Can't help on this problem. But I'm interested in this. I will take some time to study in. Anyway, thanks for your work.
Changes could be less intrusive, see another (untested) patch. However I am against shell where it is really necessary.
Personally, I am not comfortable with emacs subprocess functions as well. I just tried to avoid creation of a pseudoterminal that could make some harm to GUI application. I do not know if someone uses a handler that really require terminal features.
I have realized that :filter argument is not appropriate to arbitrary handler that could spam with various assert messages. Maybe :sentinel is better to report configuration problem to user when handler is called with inappropriate arguments.
diff --git a/lisp/org.el b/lisp/org.el index 5b1443c4e..43838783b 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-command shell-commad-switch cmd)) (and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait)))) ((or (stringp cmd) (eq cmd 'emacs))