Subject: bug#32722: [O] bug#32722: bug#32722: 26.1; Org-publish depend on non-free platform ?

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Sep 2018 10:22:36 +0300

> Date: Tue, 18 Sep 2018 14:14:27 +0200
> From: Robert Klein <[email-masked]>
> Cc: Nicolas Goaziou <[email-masked]>, [email-masked],
>  [email-masked], [email-masked], [email-masked]
> 
> > From my POV, the immediate problem is to switch Org-publish from using
> > htmlize to htmlfontify.  Can this be done, please?
> 
> Not easily, no.  Afaik htmlfontify always creates a complete HTML
> document, which htmlize doesn't.  Also, htmlize can format parts of a
> buffer. which htmlfontify can't.

This should be very easy to fix, by using temporary buffers with a
copy of the region to produce HTML for.  Right?

> Additionally htmlfontify also requires several external tools
> (according to the man page) which might not be available on all
> platform Emacs and org-mode is used on:
> 
> - a copy of “find” which provides the “-path” predicate
> - a copy of “sed”
> - a copy of the “file” command

These are only needed if one invokes htmlfontify-copy-and-link-dir to
produce HTML for files in a directory.  Is that an important use case
for the issue at hand?  E.g., if you need to produce HTML for a region
of a buffer, these facilities seem to not be relevant, AFAIU.  Did I
miss something?

> A switch to htmlfontify might end up in rewriting a good part of
> htmlfontify or some very ugly hacks.

I wonder whether we could begin by just supporting the immediate use
case(s) in point, maybe that is possible without too much rewriting.

> If Hrvoje Niksic has or is willing to sign the copyright assignment
> documents it will be easier to put htmlize.el into Emacs.

We've been through this several times in the past: it isn't going to
happen.  I think htmlfontify was added to Emacs for that rteason,
among others.