2.1 Interactive

Htmlfontify provides the following interactive functions:

htmlfontify-buffer

(htmlfontify-buffer &optional srcdir file)

Create a new buffer, named for the current buffer + a .html extension, containing an inline CSS-stylesheet and formatted CSS-markup html that reproduces the look of the current Emacs buffer as closely as possible.

“Dangerous” characters in the existing buffer are turned into html entities, so you should even be able to do html-within-html fontified display.

You should, however, note that random control or non-ASCII characters such as ^L (U+000C FORM FEED (FF)) or ยค (U+00A4 CURRENCY SIGN) won’t get mapped yet.

If the srcdir and file arguments are set, lookup etags derived entries in the hfy-tags-cache and add html anchors and hyperlinks as appropriate.

htmlfontify-run-etags

(htmlfontify-run-etags srcdir)

Load the etags cache for srcdir. See hfy-load-tags-cache.


(htmlfontify-copy-and-link-dir srcdir dstdir &optional f-ext l-ext)

Trawl srcdir and write fontified-and-hyperlinked output in dstdir. f-ext and l-ext specify values for hfy-extn and hfy-link-extn.

You may also want to set hfy-page-header and hfy-page-footer.

htmlfontify-load-rgb-file

(htmlfontify-load-rgb-file &optional file)

Load an X11 style rgb.txt file (search hfy-rgb-load-path if file is not specified).

Note that this is not necessary if all you want is the standard X11 (XFree86 4.1.0) color name -> rgb triplet mapping. Htmlfontify has a copy built in, for use when it cannot contact an X server.

Loads the variable hfy-rgb-txt-color-map, which is used by hfy-fallback-color-values.

htmlfontify-unload-rgb-file

(htmlfontify-unload-rgb-file)

Unload the currently loaded X11 style rgb.txt file (if any).