From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#49897: 28.0.50; [PATCH] Make sense of url-retrieve-synchronously Date: Fri, 06 Aug 2021 13:27:43 +0200 Message-ID: <87r1f6ak40.fsf@gnus.org> References: <87h7g3g7p8.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27629"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 49897@debbugs.gnu.org To: dick.r.chiang@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 06 13:28:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBy1M-0006wu-HS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Aug 2021 13:28:12 +0200 Original-Received: from localhost ([::1]:51938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBy1L-0001gc-Ij for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Aug 2021 07:28:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBy1C-0001gL-Eb for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2021 07:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBy1C-0006gk-7R for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2021 07:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBy1C-0002gW-3l for bug-gnu-emacs@gnu.org; Fri, 06 Aug 2021 07:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Aug 2021 11:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49897 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49897-submit@debbugs.gnu.org id=B49897.162824927510296 (code B ref 49897); Fri, 06 Aug 2021 11:28:02 +0000 Original-Received: (at 49897) by debbugs.gnu.org; 6 Aug 2021 11:27:55 +0000 Original-Received: from localhost ([127.0.0.1]:49297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBy15-0002fy-0P for submit@debbugs.gnu.org; Fri, 06 Aug 2021 07:27:55 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:36110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBy12-0002fg-Mn for 49897@debbugs.gnu.org; Fri, 06 Aug 2021 07:27:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=m7KuOcyNzIlU4Ay3H6XznPxBqiIkXQDY7v32+T4a6So=; b=qTOBwQGk9SLSytjL61670f+eoE 5UJa3FW8Xnz1Edzn7fVdrMypnytm4GzKF2wpjaAcuHzHn7Mvy5R1RoOT8sR/sG04LzaxDXxb7kdtv WVai1qwJC1kpE1y+b+iH/5+KHVfAeGmBHAtruZokghBrqs3ag3Y6DdyQPGkv50WLsrv4=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBy0t-0003tb-Ob; Fri, 06 Aug 2021 13:27:46 +0200 In-Reply-To: <87h7g3g7p8.fsf@dick> (dick r. chiang's message of "Thu, 05 Aug 2021 12:46:59 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211325 Archived-At: dick.r.chiang@gmail.com 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