Xah Emacs Blog Archive 2013-05 to 2013-05

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

updated. What's the Most Efficient Keyboard Layout? Dvorak?

New page. Why Undo Cut Shortcut Keys Are Bad?

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 Escape)

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 ⌨

Elisp: Convert Color Formats: 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. Elisp: Format Date Time

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: Open File Path Under Cursor

New Version of ergoemacs-mode and Documentation Page

ErgoEmacs has a new version, lots improvements in past month by Matthew L Fidler. Matt also created a new documentation page for ErgoEmacs keybinding minor mode. At https://ergoemacs.github.io/

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

Emacs: Open File Path Under Cursor

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: Open File Fast

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

(ido-completing-read "your prompt str:" mylist )

Full example: Emacs: Change Brackets and Quotes

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. Elisp: Exit Loop/Function, catch/throw

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

updated. Elisp: Hash Table

updated. Split into 2 pages.

updated. Emacs: Remove Accent Marks

Emacs: Change Brackets and Quotes

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

Emacs: Insert Date Time

much improved “xah-html-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 Elisp: Writing a make-citation Command

keyboard geeking. [• one thousand function keys, redux At http://xahlee.blogspot.com/2013/05/keyboard-one-thousand-function-keys.html , Accessed on 2013-05-10 ]

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

updated. Elisp: Generate Web Links Report

code and detail at: Emacs: Interactive Abbrev

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 Download Emacs for Windows, Mac, Linux. (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 Alt+x 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. [see Xah's OCaml Tutorial] Among functional programing languages, OCaml is one of those that's heavily used in the industry (For example, Mldonkey, Unison [see Unison Tutorial]), especially in math formal proof systems, for example: Coq. And it's famously used in JaneStreet. [see OCaml Use in Industry: Janestreet Talk by Yaron Minsky 📺]

Proof systems written in OCaml includes: Coq, HOL Light. [see 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 Emacs Lisp 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 (For example, #aabbcchsl(210,25%,73%)). Alt+x xah-css-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: CSS: HSL Color.

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

Like my tutorial? Put $5 at patreon

Or Buy Xah Emacs Tutorial

Or buy a nice keyboard: Best Keyboard for Emacs

Ask me question on patreon