[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core package offering - engrave-faces.el

From: Timothy
Subject: Re: Core package offering - engrave-faces.el
Date: Fri, 16 Jul 2021 14:04:00 +0800
User-agent: mu4e 1.4.15; emacs 28.0.50

It would be great if someone might be willing to take a look at this and
respond :) If my proposal doesn't sound good, I'd rather it was rejected
outright so I know where I stand before I get started with an exploratory
Org branch to integrate this with some of the current exporters.

Timothy <tecosaur@gmail.com> writes:

> Hi All,
> Over the last few months I have worked on a package that I think may be
> a good candidate for inclusion into Emacs. It has recently reached what
> I consider a sufficient quality for consideration - though I anticipate
> that should this be seen as promising there will likely be suggested
> improvements.
> This has been motivated by a desire to produce a better method of
> formatting Org source blocks in PDF export, and inspired by htmlize.
> Unlike htmlize, Engrave Faces provides general functionality to
> transform a buffer into another format with font-lock information.
> This core functionality is currently made us of in
> engrave-faces-latex.el, engrave-faces-ansi.el, and engrave-faces-html.el
> to provide exporters for LaTeX, ASCII/ANSI, and HTML.
> Compared to htmlize and htmlfontify.el, Engrave Faces currently lacks
> the ability to treat links specially, or properly handle the text
> transformation performed by overlays*. However, this is also much smaller
> and hopefully more maintainable.
> - engrave-faces.el is 250 sloc
> - engrave-faces-latex.el is 100 sloc
> - engrave-faces-ansi.el is 140 sloc
> - engrave-faces-html.el is 115 sloc
> ( *there may be other differences, but this is what's apparent to me. )
> For comparison, htmlize.el is 1700 sloc and htmlfontify.el is 2200 sloc.
> Engrave Faces also possesses the unique capability that it can be given
> a list of preset face styles which will override the current attributes
> of those faces. These overrides are also passed down with inheritance,
> via an internal expansion and merging of face attribute information.
> This allows one to save the details for a certain theme, and "engrave"
> the buffer with font-lock attributes from that theme regardless of what
> the current theme is. For ease of applying this to with your current
> theme a function `engrave-faces-generate-preset' is provided which
> re-generates the saved face information using the current theme.
> I feel that this is likely generally useful functionality, and so would
> like to offer it to Emacs to make it more accessible and more visible
> for improvement.
> I am currently an FSF-assigned contributor to Org mode, and assume that
> this should make contributing to Emacs fairly straightforward.
> Attached you may find the engrave-faces{,-latex,-ansi,-html}.el as well
> as LaTeX, ASCII/ANSI, and HTML versions of engrave-faces.el for sampling.
> The code is also available at https://github.com/tecosaur/engrave-faces.
> All the best,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]