xah lee ([info]xah_lee) wrote in [info]emacs,
@ 2008-04-28 20:29:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Elisp Lesson: Writing make-html-table
Elisp Lesson: Writing make-html-table

Xah Lee, 2008-04

This page shows a example of writing a emacs lisp function that turns the current block of text into a HTML table. If you don't know elisp, first take a look at Emacs Lisp Basics.

The Problem

I want to write a function, such that, when called, the current block of text the cursor is on, becomes a HTML table. Suppose the block of text is this:

a b c
1 2 3
this and that


after, pressing a button, it becomes html table.

(raw code contains too many html code that screws up livejournal, and lj doesn't have a raw mode. Full text at http://xahlee.org/emacs/elisp_make-html-table.html )



(Post a new comment)


[info]lightning_rose
2008-04-29 04:33 pm UTC (link)

I wrote a simple text to html that preserves formatting (including tabs) that can be accessed here:

http://www.lightning-rose.com/projects/txt2html.htm

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…