() Felix Dietrich () Thu, 24 Mar 2022 03:33:50 +0100 > would like to use Emacs' threads and ‘url-http’ funcs. You are much braver than I ;). I am not sure if the url library is robust enough for that task, but you can certainly try and play around with it. 'Tis a fine line between brave and foolish, i'm told. :-D > (a) Can anyone else reproduce this on their Emacs? Yes (also Debianʼs 27.1), but it does not appear to have anything to do with threads: it happens just as well when you call ‘func’ directly. I think this tells us that error handing wrt threads are as if they were invoked as a (top-level) command. [analysis: chain of failures] I have not found a good way to handle these errors with the url library. Thanks for digging into the details. After some poking around, i realize that the url*.el facility has quite a lot of baggage to deal w/, as well. It's amazing how much cruft RFCs output! > (c) Is there a recommended way to trap process filter > errors for a noninteractive (perhaps batch) session? Fix the process filter ;). Haha! I found the variable ‘command-error-function’ in the Emacs Lisp manual [...]. Good eye! I have managed to adapt your code fragment to produce a bad.el (attached here):