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.bugs Subject: bug#72771: 31.0.50; shr html renderer throwing "Specified window is not displaying the current buffer" Date: Sat, 24 Aug 2024 22:01:05 +0300 Message-ID: <86ed6dn3ta.fsf@gnu.org> References: <875xrrr6x3.fsf@hw.ac.uk> <861q2fqt6r.fsf@gnu.org> <875xrrcgia.fsf@gmail.com> <3482d616-8a1c-d458-8da4-1b9d12ff32c5@gmail.com> <867cc6pi5b.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19153"; mail-complaints-to="usenet@ciao.gmane.io" Cc: R.Stewart@hw.ac.uk, 72771@debbugs.gnu.org, kevin.legouguec@gmail.com To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 24 21:02:30 2024 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 1shw1u-0004sc-Jh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Aug 2024 21:02:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shw1f-0000Tl-G9; Sat, 24 Aug 2024 15:02:15 -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 1shw1d-0000S8-Mp for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 15:02:14 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1shw1d-0000ET-CR for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 15:02:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=21lPqVDbWoq36PTRoMZaDeLSayBfMzub93CTFopI2vQ=; b=jr5OgRoK/LDNKFE79xKx/pyihjZw8hvTCeR6Z0GhBfrSg1ajJ7puh9D1NUBEt4Ei4/8ZFKGIziwHaSFGpzyQRvcggtdfDPxh9/Wy9sTHko/MHQFqKbxoFZ5AZAViZzDcGdqCsNUhxRztRJjg6DuZHrjrmbhST6Uko0ySsR6H8m8WVKzVwJwXe6TCEqsBjVWClUDNK4ykxEESaAyzYRdnwHbF0L9xhSYzSvGslSQzBmOo1Cbv1JhATuQeKS7D13w4CwLcxjdzCMU5b7JPKdOxZbCzSclMhk5Fi7eQVcS4xI2OlGSW8gwRIKdC8jOjlf0tQQE28LbhvASXm6X21/A0CA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shw2P-0008L4-T1 for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 15:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Aug 2024 19:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72771 X-GNU-PR-Package: emacs Original-Received: via spool by 72771-submit@debbugs.gnu.org id=B72771.172452612931987 (code B ref 72771); Sat, 24 Aug 2024 19:03:01 +0000 Original-Received: (at 72771) by debbugs.gnu.org; 24 Aug 2024 19:02:09 +0000 Original-Received: from localhost ([127.0.0.1]:41895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shw1Z-0008Jq-Gl for submit@debbugs.gnu.org; Sat, 24 Aug 2024 15:02:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shw1V-0008JJ-Dp for 72771@debbugs.gnu.org; Sat, 24 Aug 2024 15:02:07 -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 1shw0c-000079-AZ; Sat, 24 Aug 2024 15:01:10 -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=21lPqVDbWoq36PTRoMZaDeLSayBfMzub93CTFopI2vQ=; b=gxPWfwe15oSW UAw6a9duTY0reVXFhUO16i9oQ66PgJJDOgw/sU8kvFuxzAIbUZcuyll7KdvbOPWAzyJDQfi0wZDJT 9E0aL7x+6XG+ERkNX1vtjr9OGVGxVNU9UljHW9yiEy19EN/l9iC5odu1zr7e74oNgU5FT6smjlGP7 gcrVa6+iW5dkN9MrfYWEC2H72y982W1aL1lVX1vazWJeyq+R5TU4DW/xk+QZa+3tLRZR2ejmOuFQW sZDMs7ErtQ8D37/jzTtqG6Mggm2tT+k8sRHpcOWJuiVI4n3Ah3xspjqgcjXiCUmbS7mLYXb9BCAcb 9x0bH9tdvEk5Oc1NvUgDXw==; In-Reply-To: (message from Jim Porter on Sat, 24 Aug 2024 10:10:06 -0700) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290689 Archived-At: > Date: Sat, 24 Aug 2024 10:10:06 -0700 > Cc: R.Stewart@hw.ac.uk, 72771@debbugs.gnu.org, kevin.legouguec@gmail.com > From: Jim Porter > > > . use the font obtained from (face-font 'default) (or the actual face > > of the text, if you can get at it easily), like this: > > > > (aref (font-info (face-font 'default)) 10) > > I think the problem is getting the actual face, which works for simple > cases via 'get-text-property', but not for more complex ones, e.g. when > the 'face' property is a list; 'face-font' raises an error in that case. > Effectively what I want would be a Lisp version of > 'face_at_buffer_position', but that requires a window object anyway, so > I'm back to the original problem... What's wrong with face-at-point? > > . use buffer-text-pixel-size or string-pixel-width to measure the > > width of a string of a single SPC character > > I think this wouldn't work since I want the average font width, not the > width of SPC. Then use a few different characters and take their average width. And I think you place too much faith in the average-width parameter of a font. It can fail you. The display engine uses: char_width = (font->average_width ? font->average_width : font->space_width); > In light of the above, I think what I have now might be the best way to > do it for the time being Do you still think that?