Subject: bug#15703: [PATCH 1/8] EWW: Support user defined representation for checkbox.

From: Ted Zlatanov <[email-masked]>
Date: Fri, 25 Oct 2013 14:04:58 -0400

On Fri, 25 Oct 2013 19:39:50 +0200 Rüdiger Sonderfeld <[email-masked]> wrote: 

RS> On Friday 25 October 2013 11:00:20 Ted Zlatanov wrote:
>> This seems very specific just for eww... maybe it should just use the
>> recently added `prettify-symbols-mode'?

RS> `prettify-symbols-mode' only works with font-lock-mode

Ah, OK, I see.  But it seems like kind of the same ideas, so maybe a
generic facility would be useful... not a font-lock interaction, but for
keeping the record of "this string maps to this Unicode symbol"?
Basically a big hashtable with some user control.  Then
`prettify-symbols-mode' could use that facility too.

RS> and it would be complicated to determine whether the [ ] or [x] are
RS> input-elements or literal text.  (Or can `prettify-symbols-mode'
RS> also match properties?)

It can't, but this theoretical generic facility could filter by property
as well, not just by string. Something like:

(setq output (generic-unicode-symbol-replace "input-string-with-properties"))

and the record would be: key "[]", value: '(:symbol unicode-checkmark :properties (...))

I'm just thinking out loud.  Sorry if this looks like overengineering
the problem, but it seems to me that this would be generally useful.

Oh, for example Gnus has special functionality to draw the thread trees.
Users like to control that kind of customization.

Another example: I would use ◐◑◒◓◔◕ in many places that show progress if
I could.  But perhaps that's too arcane :)

Ted