Ads by Google

Showing posts with label htmlize. Show all posts
Showing posts with label htmlize. Show all posts

Thursday, April 1, 2010

Using org-mode to send HTML mail

From the org-mode mailing list, here's a way to post HTML mail messages using org-mode. The link that works is this one. Apparently, one can still see the text part even if you set the Gnus reader to discourage HTML. And in it's present form, it works only with Gnus and not any other Emacs MUAs.

Presumably, one would use this feature only when required, as HTML is not something that is recommended as mail text as there is no guarantee that mail clients would be able to render it or render it the way you'd initially formatted the HTML.

Stick to plain text; Besides, if you're going all flashy in getting your point across, you've got a bigger problem than using HTML to say it.

Sunday, April 19, 2009

Htmlize latest version

Just so you know, the latest version of htmlize.el seems to be in the contrib directory of org-mode git repository. Of course, you can also download it from here, the author's site.

For an explanation of what htmlize is, see the emacswiki page. or if you go to the author's site, you will see this file, which is the generated HTML output of his emacs buffer as he sees htmlize.el! Htmlize is able to generate the appropriate html colour codes so that the generated output matches the way you have set up font locking in your Emacs buffer!

The simplest way to understand how htmlize works is to
  1. Download htmlize and load it
  2. Open an existing text file or some code file like a C/C++ program
  3. M-x Htmlize-buffer
  4. Save the generated .html file
  5. Open it using the browser
It would also help to read the documentation commentary in the elisp code.

I've used it many times to show my co-workers my code, instead of just sending the actual code file. You see, their editors (which are definitely not Emacs) does not do syntax highlighting like the way I'm used to or does not have syntax highlighting at all. With this, I have a portable html file and still have the font locking that I want while I'm explaining my brain dead code to them.