Subject: Re: bug#33855: 27.0.50; Can't see markup in HELLO

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 18 May 2022 15:07:59 +0200

Stefan Monnier <[email-masked]> writes:

> I can't seem to figure out how to conveniently edit the markup.
> In modes like image-mode, postscript-mode, doc-view-mode, ..., we can
> choose between the "edit source" and "view rendering", but for
> enriched-mode buffers, all I find is find-file-literally which not only
> makes the markup explicit but also shows me the bytes rather than the
> chars, which is not what I want.
>
> I think we should add a way to see (and edit) the markup.
> Maybe the corresponding command can be `enriched-mode` (tho currently
> that command doesn't do this).
> And maybe it can be bound to C-c C-c.

This doesn't seem like it should be that difficult to implement.
Round-tripping with

(enriched-encode (point-min) (point-max) (current-buffer))

and

(enriched-decode (point-min) (point-max))

seems to work fine (well, with some post-processing after the first to
get rid of colours, so they're not doubly encoded).

I'm not quite sure that having the `C-c C-c' command be `enriched-mode'
would be all that helpful, though -- was there any particular reason for
that in the feature spec?  

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