From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 5f9b5803bea: Fix zooming images in SHR Date: Mon, 24 Jun 2024 14:51:27 +0300 Message-ID: <86y16ublts.fsf@gnu.org> References: <171912324641.7384.11296304660836747605@vcs2.savannah.gnu.org> <20240623061407.0C6DDC1FB5C@vcs2.savannah.gnu.org> <5f6b8e84-cd41-4229-ab22-64c931ff7966@app.fastmail.com> <50938116-7ba6-5625-94e0-fb55dfdc449d@gmail.com> <86o77rcvjz.fsf@gnu.org> <4f280b27-80f6-c691-2a74-1b667160e7cd@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40448"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jm@pub.pink, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 24 13:52:04 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sLiEu-000AJ2-05 for ged-emacs-devel@m.gmane-mx.org; Mon, 24 Jun 2024 13:52:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLiEN-0006zU-Tj; Mon, 24 Jun 2024 07:51:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLiEM-0006zA-LZ for emacs-devel@gnu.org; Mon, 24 Jun 2024 07:51:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLiEL-0003tP-VT; Mon, 24 Jun 2024 07:51:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Qh+xOnLVo4hfg1Oyry2/VSXG5YrsFr3iQ0fbBHT/MzA=; b=q5UqazkDP2bE NF4gm12swbbdcgY5n3wUo99sJd8tfJoWTnVtWmG7Jr58Sis5A7aYScRCfPC7TrLQ/hFRQ/6jYKg2R B7Hz9Srso0FKFAd7qkOqg+XdRxoXWASSFi3b9qQiXprvAOT4iPn5GRddAEndBFu2zmjxatjnQUUK5 dn/kBfIlECv3jLSaZ7qyBm1FsM9kBFAkCKaTBtWaAJlwn4xxY07Vv2vqc2DPPP7yS91ZHvrBaf8wH MQ3l+Dgaoo+6cn3yKoub1B5tgcMWK3iO/skMfjYUOoahFhLwWXOE1kv0zCgYXq375l74nrNJslJMr 296+tB4zEokPP8+lG/Bfwg==; In-Reply-To: <4f280b27-80f6-c691-2a74-1b667160e7cd@gmail.com> (message from Jim Porter on Sun, 23 Jun 2024 15:13:36 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320598 Archived-At: > Date: Sun, 23 Jun 2024 15:13:36 -0700 > Cc: jm@pub.pink, emacs-devel@gnu.org > From: Jim Porter > > On 6/23/2024 12:23 PM, Eli Zaretskii wrote: > > Thanks, but the test fails for me on MS-Windows: > > > > Test shr-test/zoom-image condition: > > Info: image with alt=nil > > (error "timed out waiting for condition") > > FAILED 3/4 shr-test/zoom-image (5.053704 sec) at lisp/net/shr-tests.el:136 > > > > (The other test failed as well, but I fixed it.) > > > > Frankly, I have no idea why it fails, because I only vaguely > > understand the idea of the test. Feel free to ask questions or > > suggests what to test. > > Could you try commenting out the "(inhibit-message t)" line in the test > and rerunning it? My guess is that on MS-Windows, something goes wrong > when inserting the image into the buffer, so 'shr-zoom-image' can't find > the image. (For reasons I'm not sure about, when 'shr-zoom-image' fails > to find an image, it just prints a message instead of signaling an error.) I don't see any additional info when I delete that line, but maybe I'm missing something. Here: passed 1/4 rendering (0.020026 sec) passed 2/4 shr-srcset (0.000348 sec) Test shr-test/zoom-image backtrace: signal(error ("timed out waiting for condition")) error("timed out waiting for condition") (progn (error message)) (if (> (float-time (time-since start)) shr-test--max-wait-time) (pro (while (not (funcall predicate)) (if (> (float-time (time-since star (let ((start (current-time)) (message (or message "timed out waiting shr-test-wait-for(#f(lambda () [(put-image-calls 0)] (= put-image-ca (let ((dom (libxml-parse-html-region (point-min) (point-max)))) (era (let ((shr-image-animate nil)) (let ((dom (libxml-parse-html-region (let ((shr-use-fonts nil)) (let ((shr-image-animate nil)) (let ((dom (let ((shr-width 80)) (let ((shr-use-fonts nil)) (let ((shr-image-an (let ((shr-put-image-function #'(lambda (&rest args) (setq put-image (let ((put-image-calls 0)) (let ((shr-put-image-function #'(lambda ( (progn (fset 'url-queue-retrieve vnew) (let ((put-image-calls 0)) (l (unwind-protect (progn (fset 'url-queue-retrieve vnew) (let ((put-im (let* ((vnew #'(lambda (&rest args) (apply #'run-at-time 0 nil #'url (progn (fset 'display-graphic-p #'always) (let* ((vnew #'(lambda (&r (unwind-protect (progn (fset 'display-graphic-p #'always) (let* ((vn (let* ((old (symbol-function 'display-graphic-p))) (unwind-protect ( (let ((ert--infos (cons (cons "Info: " (format "image with alt=%S" a (progn (let ((ert--infos (cons (cons "Info: " (format "image with al (unwind-protect (progn (let ((ert--infos (cons (cons "Info: " (forma (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current (let ((alt (car tail))) (let ((temp-buffer (generate-new-buffer " *t (while tail (let ((alt (car tail))) (let ((temp-buffer (generate-new (let ((tail '(nil "" "nothing to see here"))) (while tail (let ((alt (let ((image (expand-file-name "data/image/blank-100x200.png" (geten #f(lambda () [t] (let ((value-60 (gensym "ert-form-evaluation-aborte #f(compiled-function () #)() handler-bind-1(#f(compiled-function () #