all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-devel@gnu.org
Subject: Re: htmlize/Hrvoje Niksic
Date: Fri, 15 Jan 2016 23:41:08 +0100	[thread overview]
Message-ID: <87a8o6ea9n.fsf@gmx.us> (raw)
In-Reply-To: 87oacmv79r.fsf@russet.org.uk

phillip.lord@russet.org.uk (Phillip Lord) writes:

>  > Out of interest, was there a particular reson or feature which led you
>  > to use htmlize rather than htmlfontify (which has been merged for a
>  > while)?
>
>  > [ I am curious as I wrote htmlfontify, which can already choose the colours
>  >   emacs would use for a different display class, which sounds similar to
>  >   what you are describing here ]

So just to understand correctly, would htmlfontify be able to chose
correct colors for a buffer even if run via batch mode where text is not
colored?  Or would it "just" allow be to match against a style sheet?

> So, first, I didn't know about htmlfontify (or rather I didn't know what
> it did, even though I changed it recently!). I found out about it a
> couple of days ago on Emacs wiki, and was thinking of seeing whether it
> would serve.

I also hadn’t heard of it before now...

> The second reason is that org-mode uses htmlize, and it was for use
> within org-mode that I am interested. I don't know why it does this, esp
> given that htmlfontify is available.

It would be great to have a built-in alternative to htmlize in Org.  Just
today I ran into the issue of not having htmlize bundled...

> A quick investigation of htmlfontify suggests that it is missing two
> features. I need to be able to publish using inline fonts, and not CSS
> -- I need to produce HTML snippets that I am embedding in a page that I
> don't control. And, in term of org-mode, it uses htmlize-region, which
> at first glance htmlfontify lacks an equivalent for.

Thanks for checking this.  I agree that CSS declaration support is
important (see org-html-htmlize-output-type).  BTW: what you mean by
inline fonts?

As for htmlize-region, I guess it’s easy to replace using
with-temp-buffer, so I wouldn’t worry about it from the point of view of
Org, though it’s really handy to have in any case.

> The display class feature you describe would be useful: at the moment,
> running Emacs in batch generates the terminal fonts in html. But I'd
> also like to be able to say "this face is this colour, this face is
> that, and every other face just ignore". This is for when I am
> generating HTML to embed in a page I do not otherwise control, with a
> white background (I use dark).

I know you don’t want to use external files, but if you can relax this
requirement you could generate a stylesheet with
org-html-htmlize-generate-css.

Rasmus

-- 
To err is human. To screw up 10⁶ times per second, you need a computer




      reply	other threads:[~2016-01-15 22:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-10 17:26 htmlize/Hrvoje Niksic Phillip Lord
2016-01-11 16:28 ` Uwe Brauer
2016-01-12 17:15 ` Barry Warsaw
2016-01-14 17:11   ` Phillip Lord
2016-01-14 17:27     ` Vivek Dasmohapatra
2016-01-14 17:32       ` Patches for htmlfontify (was Re: htmlize/Hrvoje Niksic) Clément Pit--Claudel
2016-01-14 17:37         ` Vivek Dasmohapatra
2016-01-14 17:43           ` Vivek Dasmohapatra
2016-01-14 18:08             ` Clément Pit--Claudel
2016-01-14 18:29               ` Clément Pit--Claudel
2016-01-16  8:13       ` htmlize/Hrvoje Niksic Anders Lindgren
2016-01-17 16:12         ` Vivek Dasmohapatra
2016-01-19 14:51           ` Phillip Lord
2016-01-15 21:53   ` Phillip Lord
2016-01-15 22:41     ` Rasmus [this message]

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

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

  git send-email \
    --in-reply-to=87a8o6ea9n.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.