Subject: Re: bug#49897: 28.0.50; [PATCH] Make sense of url-retrieve-synchronously

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 06 Aug 2021 13:27:43 +0200

[email-masked] writes:

> It's impossible to reason about this function without the
> conveniences of throw-catch and unwind-protect.  Related bug#49861.

Well, that's a big change here, and the code had a lot of special-casing
to handle various edge cases with quit-ing and stuff...  which...  I
agree with you shouldn't be necessary, so I've done some tests and
applied your patch (with some trivial changes):

> +    (if-let ((start-time (current-time))

Doing if-lets on things that can't be nil is mildly confusing, so I
moved that up to the surrounding let...

> +             (proc-buffer (url-retrieve url callback nil silent inhibit-cookies)))

... and the same here, which allowed for less indentation.

So now I guess we'll wait for the bug reports to arrive about something
subtle not working any more here.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no