Xah Emacs Blog Archive 2013-05

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

updated. What is the Most Efficient Keyboard Layout? Dvorak?

New page. Why Undo Cut Shortcut Keys Are Bad?

New keyboard layouts: Minimak, Norman. See: Ergonomic Keyboard Layouts

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.

Put this in your Emacs Init File:

(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?

updated. ELisp: Print 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

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: Convert File Line Ending 🚀

Emacs: Open File Path Under Cursor 🚀

video review of the Truly Ergonomic keyboard. 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/Quotes 🚀

How I Write Blogs Using Emacs

A video recording on how i write blogs.

[emacs: how i write blogs. [https://youtu.be/1L0ru5bXGjw]] (2022-03-26 bad vid. now private.)

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 or Function (throw, catch)

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/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 Emacs: HTML, Make Citation Link

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

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

updated. ELisp: Generate Web Links Report

Emacs: Interactive Abbrev 🚀

the Happy Hacking Keyboard, model “professional 2”, don't even have arrow keys. Happy Hacking Keyboard (HHKB)

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. (thanks to Fuqiao Xue (xfq) https://github.com/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. ELisp: Write grep

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 to 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 (xah-elisp-mode.el)

updated. Emacs Lisp Mode Syntax Coloring Problem

updated. discovered big chunck of code in emacs lisp using math symbols as function/variable names. 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 Hexadecimal RGB Color to HSL Format

more improved. Emacs: Xah CSS Mode (xah-css-mode.el). You can now convert RGB hexadecimal 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.][https://youtu.be/xR7jVUpmRNs] (2022-03-26 video now private)

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