[Re-sent to list: my first reply went to Eli Zaretskii only. Sorry.] On 8/31/20 8:49 PM, Eli Zaretskii wrote: >> Cc: 10483@debbugs.gnu.org >> From: Harald Jörg >> Date: Mon, 31 Aug 2020 20:08:06 +0200 >> >> I was hesitating in this particular case because _if_ this issue ever >> happens again, then the test just hangs forever. >> >> Is there a safeguard against this? > > You could run the test in a subordinate Emacs process, and have the > parent process wait for it to complete with a timeout. So be it: My attempt to do this is attached, together with tests to verify that my loop termination isn't harmful to the function. As always, a review is welcome. I still haven't much experience in Elisp. I haven't found examples to steal from, and also missed the fork/waitpid stuff which I use for such tasks in Perl. -- Cheers, haj