[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#19462: shr: use wrap-prefix when possible, instead of filling th
From: |
Clément Pit--Claudel |
Subject: |
Re: bug#19462: shr: use wrap-prefix when possible, instead of filling the text |
Date: |
Fri, 25 Dec 2015 19:43:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 12/25/2015 06:34 PM, Lars Ingebrigtsen wrote:
> Ivan Shmakov <address@hidden> writes:
>
>> >> (Yes, Emacs can display proportional fonts and fonts of different
>> >> sizes, but until you can fold (etc) proportional text (and text with
>> >> a mixture of font sizes) in a pretty manner, that's more of a toy
>> >> than anything else.)
>>
>> > What's non-pretty with how we do this now? What features are
>> > missing?
>>
>> The only feature that I’m aware to be missing is the actual
>> support for Emacs native text wrapping (as in: the word-wrap
>> variable and wrap-prefix text property) in SHR.
>>
>> Please thus consider the patch MIMEd.
>
> I think this was superseded by the shr proportional font rewrite, so I'm
> closing the bug.
I'd love a tiny bit more of information about this :)
In one of my packages I do some post-processing of a buffer rendered by shr
from an html page to increase the font size of a particular title (this is
combined with company's support for documentation buffers for completion).
For this to work properly, I need to ensure that shr does not insert hard
newlines to wrap the text; otherwise, the larger sized textx wraps in awkward
ways. To do this in Emacs < 25 I set `shr-width' to `most-positive-fixnum' and
preprocess the html to remove <table>s and <hr>s (which otherwise cause an out
of memory exception due to the `shr-width' hack), and in Emacs >= 25 I set it
to 0, which shr seems to recognize there thanks to this test in
`shr-fill-lines':
(if (<= shr-internal-width 0)
nil
Is there another solution to use visual-line-mode with shr that I have
overlooked?
Clément.
signature.asc
Description: OpenPGP digital signature