My Path to Emacs Lisp
My Path to Emacs Lisp
My path to elisp is similar to this.
- I code HTML raw since 1996, by manually typing each tag.
- I started to use emacs in 1998.
- Emacs HTML mode is very basic, i started to master that mode, to insert tags, delete tags.
- I started to learn elisp in 2006.
- I started to write many commands to help me code and maintain my websites, that's about 5 thousand hand-coded HTML pages (with the help of emacs automation, and some perl, python, scripts. (vast majority of these scripts are now emacs lisp)).
Here's one of my first elisp code. I was actually overjoyed when i learned it.
(defun insert-p-tag () "Insert <p></p> at cursor point." (interactive) (insert "<p></p>") (backward-char 4))
Today, this code went thru many versions, and now is a full html mode of 5k lines. Emacs: Xah HTML Mode 📦
I have close to a hundred other commands for HTML. For example:
- Create customized link to Wikipedia. 〔see Elisp: Wikipedia URL Linkify〕
- Create links to image with width and height attributes. 〔see Writing a image-linkify Function〕
- Create customized link to Amazon, YouTube, references to elisp, perl, python〔see Elisp: Change URL into HTML Link〕
- Create customized link to Google Earth and Google Map〔see Writing a google-earth Function〕
- Create customized citation formats〔see Writing a make-citation Command〕
- Export to Atom Webfeed (RSS). 〔see Elisp: Command to Update RSS/Atom Webfeed〕
- Export to Blogger.
- Automatically generate HTML syntax-highlighting for programing language source code. 〔see Syntax Color Source Code in HTML〕
And any CSS related needs, HTML5, … anything i need or want. After some 5 years, i started my own HTML mode, the way i wanted things to work. 〔see Emacs: Xah HTML Mode 📦〕
When you use a light-weight markup system, you type a few chars to markup, such as =title=
or ==title==
.
〔see Markdown Tutorial〕
But with my own system, i press ONE KEY to transfrom text under cursor to a customized HTML markup i want.
I can confidently say that writing raw HTML is actually faster than using any light-weight markup (such as org-mode or markdown) or any web site framework, plus, i have complete control of the raw HTML code, and can use full HTML features, any tag, not limited to what light-weight markup supports, and the generated HTML are all W3C valid HTML.
〔see HTML Correctness and Validators〕
Interesting? Start your own mode today!