Subject: Re: bug#19462: shr: use wrap-prefix when possible, instead of filling the text

From: Clément Pit--Claudel <[email-masked]>
Date: Sun, 27 Dec 2015 04:36:40 +0100

On 12/26/2015 05:53 PM, Clément Pit--Claudel wrote:
> On 12/25/2015 11:51 PM, Lars Ingebrigtsen wrote:
>> Clément Pit--Claudel <[email-masked]> writes:
>>
>>> I do not know how to do this, but it sounds like a convenient
>>> solution! How does one tell shr to apply a particular font to its
>>> target (all that I know of is `shr-target-id', which seems to insert a
>>> '*')?
>>
>> Look at `shr-tag-h1', for instance, and create whatever similar version
>> of that you want by overriding with `shr-external-rendering-functions'.
> 
> That sounds like a great idea, actually. And I guess I can get the id of the current element to check it against the target id using (equal (dom-attr dom 'id) TARGET-ID).
> 
> I'll try that!

I just tried this (capturing the id that I was interested in in a closure instead of putting it in shr-target-id), but shr-descend only works with globally defined functions; is there a reason for that? It's due to the following bit: 

	(if (fboundp function)
	    (funcall function dom)
	  (shr-generic dom))

Clément.