On 31/01/2021 23:33, Eli Zaretskii wrote:

To fix the problem it is better to use (make-process :connection-type
'pipe ...) that unfortunately has no higher level wrappers.

Wouldn't it work to let-bind process-connection-type to nil around the
function that starts the async subprocess?

...

Well, I think we should try this, because if it works, it will show us
a way to fix the problem.  (I don't see how lexical-binding could
interfere with let-binding.)

It is not a great problem to use make-process:

https://lists.gnu.org/archive/html/emacs-orgmode/2021-01/msg00364.html

I think that at least a :sentinel should be added to improve error reporting. The code just before these lines has another problem (I hope it is really rare): https://lists.gnu.org/archive/html/emacs-orgmode/2021-01/msg00353.html

I would avoid shell since direct execution of the handler should be more robust, e.g. quoting of arguments is not necessary. Unfortunately RFC on mailcap states that command is executed by shell. On the other hand only a few of viewer entries have commands that could not be handled without shell.



Reply via email to