From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible Date: Sat, 03 Oct 2015 10:08:42 +0200 Message-ID: <87zj00tlv9.fsf@web.de> References: <87twteh65g.fsf@web.de> <834mlduyz8.fsf@gnu.org> <87egkh3xl3.fsf@web.de> <83pp40blcq.fsf@gnu.org> <874mlcgoka.fsf@web.de> <83bnfkb1rs.fsf@gnu.org> <87pp40nlnj.fsf@web.de> <838uaoax9a.fsf@gnu.org> <87fv4vsxc4.fsf@web.de> <837fq7c0n6.fsf@gnu.org> <87h9pbzuq1.fsf@web.de> <834mlbbyi0.fsf@gnu.org> <87380usxzx.fsf@web.de> <83vbdqaju6.fsf@gnu.org> <87a8uqpz5b.fsf@web.de> <83oaj64wjy.fsf@gnu.org> <87h9oxuz0f.fsf@web.de> <87h9mio8wh.fsf@web.de> <87eghikz9h.fsf@web.de> <83lhbpdbuw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1443859773 5173 80.91.229.3 (3 Oct 2015 08:09:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Oct 2015 08:09:33 +0000 (UTC) Cc: yamaoka@jpl.org, 21012@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 03 10:09:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZiHsU-0006Iv-RH for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Oct 2015 10:09:11 +0200 Original-Received: from localhost ([::1]:37374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiHsU-000559-8K for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Oct 2015 04:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiHsQ-00054y-Bf for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 04:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiHsN-0006yI-3J for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 04:09:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiHsN-0006y3-0X for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 04:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZiHsM-0001nA-FL for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2015 04:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Oct 2015 08:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21012 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21012-submit@debbugs.gnu.org id=B21012.14438597356872 (code B ref 21012); Sat, 03 Oct 2015 08:09:02 +0000 Original-Received: (at 21012) by debbugs.gnu.org; 3 Oct 2015 08:08:55 +0000 Original-Received: from localhost ([127.0.0.1]:52725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZiHsE-0001mm-8e for submit@debbugs.gnu.org; Sat, 03 Oct 2015 04:08:54 -0400 Original-Received: from mout.web.de ([212.227.15.3]:56513) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZiHsB-0001md-3w for 21012@debbugs.gnu.org; Sat, 03 Oct 2015 04:08:51 -0400 Original-Received: from drachen.dragon ([90.186.2.63]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0M7Kis-1abmTQ0x7u-00x4Ue; Sat, 03 Oct 2015 10:08:46 +0200 In-Reply-To: <83lhbpdbuw.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 29 Sep 2015 08:37:59 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:Co/Zyew4XkmeVYF5//Cwj0LLZMYEtIKDJt6mtBf5mzp2QNeR//6 K7o0K408JqyzKvS9Gkn3U/Ca+GjOyceMnddQtWzN4J5VdonnwagigZMkBnx1iX0MLsQ+A99 nqyP6yI+5QozPiACSD3pEjjqHRRsMvWJaFlyBVEzz2qYBqLkYTGX+QzNe2nxPSKyw+WWDyo sJ/GgYAwnQzLDyM19pzrw== X-UI-Out-Filterresults: notjunk:1;V01:K0:Nl1NECm/tUU=:zkL6mMbS9AbviZ3c+kAZP1 aazlfa4p+Rh9jhT/vPtp89ZAdtOyz9kU75qponUxiwALa9WuH3xQDZXBUWn0L869I89vnYDPO eypNSG5ZdAhlpwdKcvVMc4+pDB+R7Tv7yK9VJD6rnT0QjtdsGQfVbUsAjN5iycraBrzO2+LYy crHUO2RIAkkz5uW9oiCElqpmWVb1ZEp5w+QecgTAUAKnVMC26OZIX/zdIULUUjcA5iv0UQgq3 Eh3RNPgy6iHU9ImR4LOz1lTXyFc6j2UIIjwZt/s9BqvrL2FISYvpsc+dsQQLYtM+KDZO+2THv W21Dk9/n86ScKIFiQ9yA1783W4+rTVpGkW9ShpciJ9AiOjFOOC7ZCfQN7uWYhe0+j7AiRQWgL S7YFbkpz1LPS1+mTEaCEoEGzpTlnCDgA4ucc5fX97NdHKJSS/fH9cUUI8Zt5PPEoxZhoNfz0T N+TXJQIt5vbyKyQmQ98s6UC6joMUsX/SActKufAapdnDpk2E9SJR++Bpt0hYS+tk3/brz5+cK 0+/2EgcjDrb9hqepFd3fz6EmW2pNENoGSD5jpq4wNlxKxvJT7UjWpM9MNDaFQOiJKjEHngwKq LbPuXMzh39GLQK5gPi0A6K6jaTiMx+FH7UbAebcjXNwwKKDzj8HM8ph5fHYHWo+U/p5l7pmRl NDQL032epSZZjp6oRaWxgOZhFGWt8OjvzXUHTe8QnQ5pxidyqPPR2hObletKD8l9mY3SfMVai ugE/SK1tL5VbdrgEFV2J6JPp4NCkYVtkCpuh4t8iQufitSb7zMJp+qMXH78sLkqvkWXOcjIz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107242 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Fine with me, please go ahead. I thought it would be easier to send you the contents of commit buffer in magit - it includes even more information than git format-patch -1. Here it is: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=the-commit.txt master d72b05282033821884cfaef59f278a2bf6af33b6 Author: Eli Zaretskii AuthorDate: Thu Jul 9 05:38:29 2015 +0300 Commit: Michael Heerdegen CommitDate: Sat Oct 3 09:43:03 2015 +0200 Parent: e160525 Adapt to new prettify-symbols-unprettify-at-point default Merged: master Containing: master Follows: emacs-24.5-rc3-fixed (6094) shr: fix too long lines in rendered buffers (Bug#21012) * lisp/net/shr.el (shr-insert-document, shr-fill-text): Correct calculation of available width. (shr-find-fill-point): Don't overflow window edge if shr-kinsoku-shorten is nil. 1 file changed, 42 insertions(+), 8 deletions(-) lisp/net/shr.el | 50 ++++++++++++++++++++++++++++++++++++++++++-------- modified lisp/net/shr.el @@ -222,10 +222,29 @@ DOM should be a parse tree as generated by (if (not shr-use-fonts) shr-width (* shr-width (frame-char-width)))) + ;; We need to adjust the available + ;; width for when the user disables + ;; the fringes, which will cause the + ;; display engine usurp one column for + ;; the continuation glyph. (if (not shr-use-fonts) - (- (window-width) 2) - (- (window-pixel-width) - (* (frame-fringe-width) 2)))))) + (- (window-body-width) 1 + (if (and (null shr-width) + (or (zerop + (fringe-columns 'right)) + (zerop + (fringe-columns 'left)))) + 0 + 1)) + (- (window-body-width nil t) + (* 2 (frame-char-width)) + (if (and (null shr-width) + (or (zerop + (fringe-columns 'right)) + (zerop + (fringe-columns 'left)))) + (* (frame-char-width) 2) + 0)))))) (shr-descend dom) (shr-fill-lines start (point)) (shr-remove-trailing-whitespace start (point)) @@ -439,8 +458,18 @@ size, and full-buffer size." (with-temp-buffer (let ((shr-indentation 0) (shr-start nil) - (shr-internal-width (- (window-pixel-width) - (* (frame-fringe-width) 2)))) + (shr-internal-width (- (window-body-width nil t) + (* 2 (frame-char-width)) + ;; Adjust the window width for when + ;; the user disables the fringes, + ;; which causes the display engine + ;; usurp one coplumn for the + ;; continuation glyph. + (if (and (null shr-width) + (or (zerop (fringe-columns 'right)) + (zerop (fringe-columns 'left)))) + (* (frame-char-width) 2) + 0)))) (shr-insert text) (buffer-string))))) @@ -620,7 +649,9 @@ size, and full-buffer size." ;; There's no breakable point, so we give it up. (let (found) (goto-char bp) - (unless shr-kinsoku-shorten + ;; Don't overflow the window edge, even if + ;; shr-kinsoku-shorten is nil. + (unless (or shr-kinsoku-shorten (null shr-width)) (while (setq found (re-search-forward "\\(\\c>\\)\\| \\|\\c<\\|\\c|" (line-end-position) 'move))) @@ -632,9 +663,12 @@ size, and full-buffer size." ;; Don't put kinsoku-bol characters at the beginning of a line, ;; or kinsoku-eol characters at the end of a line. (cond - (shr-kinsoku-shorten + ;; Don't overflow the window edge, even if shr-kinsoku-shorten + ;; is nil. + ((or shr-kinsoku-shorten (null shr-width)) (while (and (not (memq (preceding-char) (list ?\C-@ ?\n ? ))) - (shr-char-kinsoku-eol-p (preceding-char))) + (or (shr-char-kinsoku-eol-p (preceding-char)) + (shr-char-kinsoku-bol-p (following-char)))) (backward-char 1)) (when (setq failed (<= (point) start)) ;; There's no breakable point that doesn't violate kinsoku, --=-=-= Content-Type: text/plain Does that all make sense and play by the rules (commit message)? I specified you as the author (since all but some chars is from you), and specified the date you had sent the patch as commit --date (aka "author date"). Oh, and I don't know anything about `shr-kinsoku-shorten', I hope what I wrote makes sense. If you are agreed with everything, I plan to pull --rebase, and push. Thanks for your review in advance. Regards, Michael. --=-=-=--