all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: 31196@debbugs.gnu.org
Subject: bug#31196: 27.0.50; shr sometimes doesn't break lines as it should
Date: Tue, 17 Apr 2018 19:03:38 +0200	[thread overview]
Message-ID: <87muy1rcid.fsf@mouse.gnus.org> (raw)
In-Reply-To: <87sh7trikw.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Tue, 17 Apr 2018 16:52:31 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> With the following HTML, on this laptop with whatever font Emacs is
> using right now, 80 characters wide, the following is one pixel too
> wide:

This is the problem, I think:

(- (window-body-width nil t)
   (* 2 (frame-char-width))
   (if (and (null shr-width)
            (not (shr--have-one-fringe-p)))
       (* (frame-char-width) 2)
     0))

This kludge is how shr computes how many pixels the window has
horizontally.

Surely there's a better way to find the practical "inner" width of a
window; i.e., the space where we can put text and stuff?  Does anybody
know?

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





  reply	other threads:[~2018-04-17 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 14:52 bug#31196: 27.0.50; shr sometimes doesn't break lines as it should Lars Ingebrigtsen
2018-04-17 17:03 ` Lars Ingebrigtsen [this message]
2018-04-17 17:05   ` Lars Ingebrigtsen
2018-04-17 17:35   ` Eli Zaretskii
2018-04-17 17:43     ` Lars Ingebrigtsen
2018-04-17 18:25       ` Eli Zaretskii
2018-04-17 18:32         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muy1rcid.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=31196@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.