Xah Emacs Blog Archive 2012-10

Emacs Chinese Input for fun and profit!

Started a blog in Chinese. 李杀網誌 Posts there will be in Chinese. (topic vary)

Ask Emacs Tuesday.

Emacs Commandments

Steve Purcell at https://twitter.com/sanityinc gave this tip for listing holidays: call holidays. It lists holidays starting from last month. To list holiday for a specific year/month, first call universal-argumentCtrl+u】.

everyone had a good Halloween party?

sometimes i forgot the exact date of holidays. You can check in emacs. Alt+x calendar, then in the menu [Holidays].

what's some other way to find holidays easily?

best emacs keyboard? Take n!

i think this is the best keyboard for emacs: μTRON Keyboard.

last i checked, it's USD$550, and you have to buy it in Japan.

you may find this keyboard weird. But the point of this keyboard is the physical layout, that's the important part. Key layout one can remap thru software, it's the physical layout, key physical positions, that is fixed, and your fingers have to live with.

The good thing about this keyboard is that it fixes many traditional PC keyboard key problems. See: Computer Keyboard Design Flaws

much of the problems is due to history, much like QWERTY layout is.

In traditional PC keyboard, the Enter, Backspace, are placed in bad positions, hit by pinky. Keys are unnaturally jagged. And many other flaws.

ergonomic keyboards, such as Kinesis, Maltron, Truly Ergo, MS 4000, all fixed these problems (with MS 4000 being the least radical)

From my 2 decades of keyboard geeking, especially in the past 3 years, i discovered that, habituation is the number one enemy to progress. People are resistant to change. This applies to keyboard layout (For example, QWERTY), as well as physical layout (For example, PC straight keyboard), and also applies to keyboard shortcut/keybinding (For example, emacs, vi), and many others such as bash syntax, C language syntax, etc.

In the past 3 years, i spent about few hours per week, tweaking, thinking, about emacs keybinding, and keyboard shortcuts several other apps i use (browsers, Second Life, OS keys), and across OSes, and log my keystrokes, typing habit, RSI, analysis of keybinding ergonomics…. I tweak my emacs keys about every week. Usually, by logical analysis, i felt xyz way is better, so i change it in my emacs init. But often, i find it a pain, until after few months, then i find it much better. So, even to myself, habituation is progress killer. Of the common vi, emacs, dogma you see on the net, about their key efficiency, is pure bullshit. Both vi, and emacs's keys, are FAR from being efficient. If you are serious, you can simply analyze it yourself, think about different keybinding systems. However, due to much habituation and perpetual myth, this is a religious issue. Before you can even start, people will tell you to swap capslock, or such, or tell you that that “emacs shouldn't become Notepad”. [see Emacs Cult Problem: Emacs vs Windows Notepad]

There are those programers who don't touch-type, yet, they INSIST that hunt'n'peck is perfectly sufficient for programing work. There are programers who touch type QWERTY but INSIST that Dvorak's efficiency is a myth. (not going to cite names, but some of these are my friends, or celebrity coders) Then, there's vi or emacs cultists who never invested time into study alternate keybinding systems, will insist, that everyone should learn the “proper” way.

These religious views, you can never expel, unless, you start something that's successful. I'm glad that i started ErgoEmacs keybinding, which now have a number of users. Another example is the Colemak layout [see Alternative Keyboard Layouts], of which the author aggressively market it (For example, created a dedicated website, forum, and lobbied to have it included in all major Linux distros). Similarly is the success story of JSON format (over XML). Basically, it's about marketing, politics, than true quality. Nobody will listen to your impeccable argument. But once you are successful, in marketing, everybody will claim they agree with it all along — “I told you so!”.

See also: Computer Keyboards, Layouts, Hotkeys, Macros, RSI ⌨.

emacs clone-buffer command

Learned this great tip from @emacs_knight:

Alt+x clone-buffer to create a copy of a existing buffer.

Note: it can only clone buffers that are not files. If you want to copy a buffer that's a file, Alt+x write-file (Save As). (in ErgoEmacs, the key is Ctrl+Shift+s)

Emacs ROT13 and MD5: Intro to Public-key Cryptography for Sys Admin; What's HTTPS, SSH, SSL, TLS, AES, SHA-1, MD5, …

Ask Emacs Tuesday.

Chinese Sina Weibo emacs client; 新浪微博 emacs 客户端

For Chinese Sina Weibo users, there's a emacs client. Home page at http://austinycn.github.com/weibo.emacs/, also on github at at https://github.com/austin-----/weibo.emacs

Sina Weibo is a micro-blogging service in China. It's similar to twitter, tumblr, etc.

My account there is http://www.weibo.com/xahlee

thanks to Joseph Pan for the news.

Emacs: Font Setup

A lisp hacker François-René Rideau, is interviewed. He discusses his work writing Common Lisp code, at ITA (then now Google). [Lisp Hackers: François-René (Faré) Rideau By Vsevolod Dyomkin. At http://lisp-univ-etc.blogspot.com/2012/10/lisp-hackers-francois-rene-fare-rideau.html , accessed on 2012-10-21 ]

I was aware of François-René over a decade ago on comp.lang.lisp newsgroup. I don't remember what exactly was our first exchange. I only remembered him being a lisp hacker. Recently, we connected thru Google Plus, Facebook.

He is a dedicated emacs users, as basically all lisp hackers.

via jcs

if you are on Windows, then AutoHotkey is indispensable. For example, the most useful is to set a single key, F9, to switch to emacs. See: AutoHotkey Tutorial. There are lots examples there. Also, i just put my ~50 AutoHotkey scripts on github. See: https://github.com/xahlee/autohotkey.

For Mac and Linux, you can do the same. See: Keyboard Tip: One Key to Switch to {Firefox, Emacs, Terminal}.

want to start a blog? The Ease of Making Money by Professional Blogging

If you haven't already, you really should add MELPA to your emacs 24 repository list. MELPA has so many updates daily. You can call list-packages and just explore. Chances are, whatever you have installed there's probably a new version. And you'll probably find something new and useful.

Much thanks to the hard work of Donald Ephraim Curtis (aka milkypostman) and Steve Purcell. And also all the package developers. MELPA has a twitter account, tweeting lots updates daily. https://twitter.com/melpa_emacs.

If you haven't used package before, here's how to add MELPA: Emacs: Install Package with ELPA/MELPA.

updated. a Command to Execute/Compile Current File. Added code to save file if not saved. Thanks to Evgeniy Dolzhenko.

Want to save your split-pane configuration across sessions? Use revive.el by HIROSE Yuuji. It's in emacs MELPA package repository. [see Emacs: Install Package with ELPA/MELPA] For usage detail, see: Emacs: Save Split Windows Configuration.

Ask Emacs Tuesday.

Reading Linux man page with Emacs

when you use emacs to read linux man pages, you can use mouse too, just like a web browser. All links in the man page can be clicked.

for example, in emacs, Alt+x man, passwd. Then press Tab to jump to first link, then hit Enter to view /etc/passwd file. Or, scroll down and click to read other related man pages.

see also: Emacs: View Info Page

updated: Emacs Modernization: Simple Changes Emacs Should Adopt. If for nothing, you should watch Crockford's video there.

emacs color theme misterioso 2012-10-12-2
emacs color theme misterioso

Emacs: Set Color Theme

Microsoft Linux ad edge 1

Beginner to intermediate Linux sys admin tips. Xah Unix/Linux Tutorial

A Gander into Emacs Dev Mailing List

once in a while, it's fun to drop into the emacs dev list, to see what the devs are doing.

here's a link to this month's mail archive: http://lists.gnu.org/archive/html/emacs-devel/2012-10/threads.html

there, you can see who are the devs, what do they do, how they do it.

most people there are emacs core developers. Though, in general, you won't see them in modern sites such as Reddit, Hacker News, Github, Twitter, etc. They are usually old school. You'll find many with programing experience back to 1970s. Many still just use newsgroup and email only.

on the other hand, the cool packages that we hear/use often, in github, reddit, twitter, emacs rocks, youtube, dedicated emacs blog site authors… it's vary rare to see their names appear in the dev mailing list.

it's somewhat strange as if 2 different worlds.

current emacs dev leaders are {Stefan Monnier, Chong Yidong} (aka maintainers). Though Richald Stallman posts frequently.

the GNU emacs dev mailing list has strong milieu of FSF idealism. (note: not Open Source) If you ever post there, make sure you always say GNU/Linux, else you'll get a public response from Richard Stallman asking you to do so. It's my guess that 50% or more of the frequent participants on that list are also FSF believers. For the rest, most are Open Source advocates.

see also: Emacs vs Windows Notepad

Ask Emacs Tuesday.

A new mode for working with mixed {HTML, PHP, Java, JSP, ASPX, JavaScript, CSS}. web-mode.el At http://web-mode.org/

Thanks to Jon Snader for the tip.

I haven't tried it. Have you used it? Let me know how you like it.

Bash Manual in Chapters; Using Emacs for Reading Info; Info Keys

emacs M-x donuts 2012-09-15
Photo by [Will Willis https://plus.google.com/105762610392707809304/posts] (used with permission)

perm url emacs M-x Donuts vs vim fitness

my init is now at https://github.com/xahlee/xah_emacs_init

emacs python highlight indent 2-2
Screenshot of emacs minor mode “highlight-indentation.el” by Anton Johansson.

People have been asking for this. Python indentation highlight mode. https://github.com/antonj/Highlight-Indentation-for-Emacs/

It's also on MELPA package repository. [see Emacs: Install Package with ELPA/MELPA]

A Syntax Highlighting Language?

Microsoft cites ErgoEmacs!

emacs package system init problem

If you have problems using emacs 24's package system, here's a tip. Before you set config in your init file for any packages installed thru the package system, you should call this first: (package-initialize). For more detail, see: Emacs 24 Package System Problems, updated near bottom. See also: Emacs: Install Package with ELPA/MELPA.

Ask Emacs Tuesday.

Dvorak keyboard layout. Might be of interest to emacs users. Dvorak Keyboard Layout, My Experience ⌨

Emacs 24 Windows bug: “ShellExecute failed: Not enough storage is available to process this command.” and “Spawning child process, resource temporarily unavailable”. See: Emacs Misc Bugs

If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial