ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial

Xah Emacs Blog

Tips and tricks for emacs and emacs lisp.

Creating a Sitemap with Emacs Lisp (updated)

Emacs Keybinding vs cua-mode Keys

if you bought my emacs tutorial years ago, you are probably not on the update announcement list. Please email to xah@xahlee.org with subject “emacs tutorial update”. Thanks.

vi Keybinding vs Emacs Keybinding

Emacs Lisp: How to Write a make-html-table Command (updated)

Richard Stallman Lost It 📺

new version of emacs tutorial. If you are a scientist, or other fields but are not a dedicated professional programmer reading lots emacs blogs, then this tutorial just might help you get all the fundamentals of emacs and emacs lisp quickly. Buy Xah Emacs Tutorial. Thank you for support.

in emacs 24.3, the name ucs-insert is now alias to insert-char. A great change.

That command lets you insert Unicode character, or any character. 〔☛ Emacs & Unicode Tips

Unicode: Character Representation, ASCII Character Symbols. Note that emacs heavily uses caret notation, and unprintable ASCII chars are heavily used in terminal.

Emacs Lisp: Copy Column of Text to Clipboard (oldish article. Now on a page by itself.)

Emacs: Edit Column Text, Align Text, ASCII-Diagram (updated.)

Emacs Lisp: Insert Alphabets

Emacs Lisp: Single Key to Copy/Paste from Register (old article, updated. A convenient command, and good for elisp beginners. )

Emacs: Clipboard History and Multiple Clipboards (old article, revised.)

after using mechanical keyboard for a few months, rubber dome keyboard becomes so hard to press. See: the effect of keyboard hardware on you.

not emacs related, but my random opinion that touches on lisp. JavaScript Book by David Flanagan, and the Man-made Complexity in Computer Language

for hand health advice, trust professional typists

A professional typist, a court reporter, Joe, replied a article on typing. See: http://xahlee.blogspot.com/2013/05/the-myth-qwerty-dvorak-keyboard-layout.html?showComment=1370847889291

when it comes to typing and hand health, put weight on professional typist's opinions. Because, they actually type a order of magnitude more than programers.

Emacs: Why Does Cursor Move into Prompt by Default?

〈GNU bug report logs - #988: cursor runs over prompt in minibuffer; suggestion on default〉 @ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=988

Emacs: magit-mode Tutorial

Add Extra Function Keys to Your Keyboard

Emacs: Stop Cursor Going into Minibuffer Prompt

old article. Updated. My Experience of Emacs vs XEmacs

updated. elisp tutorial. Very useful. Emacs Lisp: Multi-Pair String Replacement with Report

Why running shell inside emacs is good. See: Linux: Record a Terminal Session, Logging Shell Output

Got a very nice accolade for ErgoEmacs keybinding from a emacs oldbie, at ErgoEmacs forum. Thank you Paul Michael Reilly. (and thanks to David Capello and Matthew L Fidler for taking it much further than i can.)

The Classic Microsoft Natural Keyboard is Discontinued

The classic Microsoft Natural keyboard is discontinued. Get a few of them while they are still out there.

Chances are, in a year or two, you'll see the price rise to a few hundred. That's usually the case with good but discontinued products.

In my 5 years experience of using this and the Microsoft 4000, i think this is actually better. The 4000 got stiff space bar problem.

some programers, say that the best way to avoid typing injury is not to touch-type. Updated article: Bad Advices from Programers about Typing & Keyboard (RSI). What do you think?

If you use emacs in terminal, this is good to know: Linux: Terminal Control Sequence Keys (tty, stty) ⌨

How Many Keystrokes Programers Type a Day?

For Mac users, a new keyboard designed for Mac. Compact, and mechanical keys. Keyboard: Matias Mini Tactile Pro

updated. Linux: Info Keys, Bash Manual in Chapters, Using Emacs for Info

updated. Symbols for {Super, Hyper, Meta} keys. Unicode: Keyboard Symbols, UI Icons ↹ ⌫ ⌘ ✉ ✍ ⌖. See also: Emacs: How to Define Super & Hyper Keys.

WARNING: rant curve ahead. the Myth of Myth of QWERTY & Dvorak Layout

updated. Keyboard Layout: What is the Most Efficient Layout? Dvorak vs Colemak?

New page. Keyboard: Why Undo Cut Keys Wreck Your Hand

New keyboard layouts: Minimak, Norman. See: Keyboard Layouts Fight! Dvorak, Maltron, Colemak, NEO, Bépo, Turkish-F, …

ErgoEmacs Terminal Arrow Fix

Matthew L Fidler fixed a long-standing major bug in ErgoEmacs keybinding. See: https://code.google.com/p/ergoemacs/issues/detail?id=37

In terminal, when you press arrow keys, ErgoEmacs will insert gibberish. This is a semi-bug in emacs.

In emacs, put this in your init:

(global-set-key (kbd "M-O") 'forward-char)

nothing but just that line. Then, start emacs by emacs --no-window-system. Then press any arrow key, you'll see that it insert gibberish.

This is related to escape sequence in terminal. Kinda have to do with terminal history. The arrow keys actually send escape sequences, and somehow, so does emacs's 【Meta+O】. (this is why emacs's Meta can also be pressed by Esc)

From user's perspective, this is clearly a emacs bug, but it might be such historical issue that it's hard to fix or can't be fixed. A related issue is that in emacs running in terminal, it can't distinguish between 【Ctrl+A】 and 【Ctrl+a】 (same for other letters).

howto. Linux: Swap Control and Alt Keys ⌨

Emacs Lisp: Color Model Conversion (RGB, HSL, HSV, …)

Emacs Tip: Save Position Across Sessions

watch this. Free spin mouse wheel for 28 seconds! Logitech Mouse with Spin Wheel

emacs users usually neglect the mouse. But! Why You Need a 9 Buttons Mouse?

keyboard design. ErgoEmacs Keyboard

updated. Emacs Lisp: Date/Time String

not related to emacs, but might be interesting. Computer Language Character Distribution

Here's how to shift indent a block of Python code in Emacs: Emacs: Python Shift Indent.

update. On its own page. Emacs: Switching Next/Previous User Buffers

on keyboard design. Updated. ErgoEmacs Keyboard

updated. Improved the code. Emacs Lisp: Open File Path Under Cursor Fast

New Version of ergoemacs-mode and New Home Page

ErgoEmacs has a new version, lots improvements in past month by Matthew L Fidler. Matt also created a new home page for ErgoEmacs keybinding minor mode. This should be the new home page going forward for community. At http://mlf176f2.github.io/ErgoEmacs/

on its own page. Emacs Lisp: Batch Convert Line Ending in Dired

Emacs Lisp: Open File Path Under Cursor Fast

video review of the Truly Ergonomic keyboard. More info at Truly Ergonomic Computer Keyboard Review

Note: for those of you who know me, i got the keyboards free, but my opinion isn't bought, judge for yourself.

updated. Now using ido for automatic completion. Emacs Lisp: Hotkeys to Open File Fast

emacs lisp: you can use ido for automatic completion in your own commands. Example use:

(ido-completing-read "your prompt str:" ‹youList› )

Full example: Emacs: Change Brackets () {} [] in Text

How I Write Blogs Using Emacs

A video recording on how i write blogs.

emacs: how i write blogs.

The commands used are:

The video presentation is pretty bad. I have much to learn, tech and presentation. I was using Google Plus hangout feature with Hangout On Air to record directly to YouTube. Not sure what's a good solution on Linux yet.

also, i need to write code so that whatever command i called is displayed in a pane. So viewers can see it without me going over.

updated, with new elisp code to change file line ending in batch. Emacs: Newline Representations ^M ^J ^L

Keyboard pr0n, nth update. Computer Keyboards, Layouts, Hotkeys, Macros, RSI ⌨

Dear all, a new version of my tutorial is out. I'm making this a special version, for $40. If you support it, i'd be greatful, and i'll add your name to the Xah's Emacs Tutorial: Acknowledgment as sponsor.

Buy Xah Emacs Tutorial

Another way to voice your support is funding a emacs major mode that you might want. Please visit http://pledgie.com/campaigns/19973. Please let me know if you have questions..

Thank you for support.

updated. Emacs Lisp: Throw & Catch, Exit a Loop

Been using the Truly Ergonomic keyboard for 5 months now. Added my experience here at bottom: Truly Ergonomic Computer Keyboard Review

updated. Emacs Lisp: Hash Table

updated. Split into 2 pages.

updated. Emacs Lisp: Convert Unicode String to ASCII (Zap Gremlins)

Emacs: Change Brackets () {} [] in Text

there's a fantastic heart-shaped keyboard. If you haven't seen it already, see at Keyboard Porn to Infinity ⌨ ∞. The guy plans to manufacture it. To keep updated for news, watch his website at http://launch.keyboard.io/

Emacs Lisp: Insert Date Time Stamp

much improved “xhm-make-citation”. Now, the order of lines for {title, url, author, date} doesn't matter. Get it in Emacs: Xah HTML Mode

to learn how to write it, see Emacs Lisp: Writing a make-citation Command

keyboard geeking. 〔one thousand function keys, redux @ xahlee.blogspot.com…

inspired from emacs lisp doc: Logic Writing Style: the Incongruousness of the Word “Actually”

updated. Emacs Lisp: Text Processing: Generate a Web Links Report

code and detail at: Emacs, Shell, Abbrev, and ELISP Power to Bear!

the Happy Hacking Keyboard, model “professional 2”, don't even have arrow keys. The Idiocy of Happy Hacking Keyboard

I had a great Ask Emacs Tuesday yesterday. Thanks for asking. Past Q&A links at Ask Emacs Tuesday

emacs 24.3 app for Microsoft Windows is out. See Which Emacs to Download for Windows and Mac?. (thx to xfq)

Ask Emacs Tuesday

i was calling unix uniq from emacs. Got a unexpected result. I thought it's Unicode data passing screwup. Turns out, the bug is in uniq itself. Unix Shell Util uniq Unicode Bug

updated. How to Write grep in Emacs Lisp

Functional Programing Meta Language (ML) in Emacs Lisp!

discovered that emacs has a bundled library for functional programing pattern matching! The package file is pcase.el. It's part of GNU Emacs 24.3.1.

it's written by Stefan Monnier, a professor of functional programing research, and one of the two current leader of emacs dev.

you can get to the file by calling describe-function then pcase-let, then click on the file name.

Note: ML stands for Meta Language. It was a family of languages. Current popular descendants include OCaml and Microsoft's FSharp. 〔☛ Xah's OCaml Tutorial〕 Among functional programing languages, OCaml is one of those that's heavily used in the industry (⁖ Mldonkey, Unison 〔☛ Unison Tutorial〕), especially in math formal proof systems ⁖ Coq. And it's famously used in JaneStreet. 〔☛ OCaml Use in Industry: Janestreet Talk by Yaron Minsky 📺

Proof systems written in OCaml includes: Coq, HOL Light. 〔☛ State of Theorem Proving Systems 2008

Also, the designer of ML is Robin Milner (1934 〜 2010), he died in recent years.

draft version of “xah-html-mode” home page. Some documentation on what it do. Emacs: Xah HTML Mode

new. Emacs: Xah ELISP Mode

updated. Emacs Lisp Mode Syntax Coloring Problem

updated. discovered big chunck of code in emacs lisp using math symbols as function/variable names. Programing Style: Variable Naming: English Words Considered Harmful

see also: Unicode in Ruby, Perl, Python, JavaScript, Java, Emacs Lisp, Mathematica

you should swap middle/right mouse buttons. For why and how, in {Linux, Microsoft Windows}, see: Swap Mouse Buttons: Right-Click & Middle-Click

Emacs: CSS: Convert Hex RGB Color to HSL Format

more improved. Emacs: Xah CSS Mode. You can now convert RGB hex color under cursor to HSL format (⁖ #aabbcchsl(210,25%,73%)). Call xcm-hex-color-to-hsl.

why should you convert? because, #rrggbb is one of the hack from history. HSL model isn't perfect, but is much more intuitive. You can change the hue, saturation, and lightness. For some explanation of HSL model and color samples, see: CSS3 HSL (Hue, Saturation, Lightness) Color Samples.

Emacs: new major modes for HTML, CSS, PHP, ELISP, and Lean Emacs LISP Manual

Emacs: project proposal.

Vote which one you want me to work on. Tell your friends please. http://pledgie.com/campaigns/19973

Past Articles by Date