unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Core package offering - engrave-faces.el
Date: Fri, 16 Jul 2021 14:04:00 +0800	[thread overview]
Message-ID: <871r7yztf3.fsf@gmail.com> (raw)
In-Reply-To: <87y2afv122.fsf@gmail.com>


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,


--
Timothy



  parent reply	other threads:[~2021-07-16  6:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09 17:39 Core package offering - engrave-faces.el Timothy
2021-07-09 21:14 ` Clément Pit-Claudel
2021-07-16  6:04 ` Timothy [this message]
2021-07-16  7:09   ` Eli Zaretskii
2021-07-16  7:36     ` Timothy
     [not found]   ` <7319ffa7-d566-41b8-b778-69db2f6becc9@gmail.com>
2021-07-16 13:08     ` Timothy
2021-07-23 15:49       ` Timothy
2021-07-23 20:08         ` Clément Pit-Claudel
2021-07-24  5:54           ` Eli Zaretskii
2021-07-23 20:32         ` Stefan Monnier
2021-08-29 19:11           ` Timothy
2021-08-29 23:33             ` Stefan Monnier
2021-08-30 18:22               ` Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r7yztf3.fsf@gmail.com \
    --to=tecosaur@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).