ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial
Web Hosting by 1&1

Xah Emacs Blog

Tips and tricks for emacs and emacs lisp.

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

Emacswiki New Site Design

Looks like emacswiki had a new site design. ⁖ http://www.emacswiki.org/emacs/DiredPlus

the new seems to be a downgrade for me.

now it's black on gray. Parts are gray on gray. Less readable than before. 〔☛ Web Design: Say No to Grey Text on White Background

The older logo is much better. It was a real logo, with elements of art. The new, is just plain letters. 〔☛ Purpose of Logo and Principle of Logo Design

emacs community logo
emacs community logo, designed by Daniel Lundin

worst of all, the new site requires JavaScript. Without, you lose some rather significant CSS for readability. This is quite odd.

PS you can go back to the old.

but then, that means you must have cookies on.

You can use apropos-variable and apropos-value to search. Updated: Emacs: Finding Functions and Documentation Lookup

am running ask emacs Tuesday, on g+ and twitter. Me at your service.

also, updated. Emacs Lisp: Writing Command to Accept universal-argument

Emacs: Power of Icicles

lol. this is a gem.

Tim Pope,

In which Richard Stallman learns what “tabs” are and contemplates adding them to Emacs http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg02254.html

keyboard station one thousand function keys 2012-08-10
master station: one thousand function keys

detail: Keyboard Master: One Thousand Function Keys

XML Nested Syntax vs Lisp Nested Syntax

updated. All the ways you can set keys. Emacs is all about keys. Set any command to any key you want. Set one key today! Emacs Keybinding Syntax Examples

emacs tabbar screenshot 2013-04-20
Emacs tabbar screenshot

updated. How to Set Emacs's User Interface to Modern Conventions. Thanks to Matthew L Fidler

Sunday Excursion. 2 hands pen-spinning, by yours truely. The keyboard at the bottom is the Truly Ergonomic Keyboard.

2 hands pen-spinning.

yesterday i wrote about a bug. Now there's solution. See: Emacs Bug: global-linum-mode Freeze Emacs on Big Image Files

new index page. All about Emacs Keybinding, Keyboard, RSI

mark5 heart keyboard jesse 2013-04-19
mark5 heart keyboard jesse . img source ©cc

more fancy keyboards

updated. Emacs: How to Evaluate Emacs Lisp Code. thanks to jcs.

Emacs Bug: global-linum-mode Freeze Emacs on Big Image Files

Emacs: Xah CSS Mode

updated. Emacs: How to Define Super & Hyper Keys

ErgoEmacs Keybinding Movement Feature

Matt has done a lot to ErgoEmacs keybinding. I haven't kept up with the features, but i'll blog as i learn. Here's one.

When you use any of the cursor movement keys, you can keep pressing movement key without holding down the Alt. For example, on QWERTY layout, press 【Alt+j j】, it'll move cursor to the left twice. You can turn this off by putting this in your init:

;; turn off ErgoEmacs repeat move without holding Alt feature
(setq ergoemacs-repeat-movement-commands 'nil)

;; set ErgoEmacs repeat movement. Example, on QWERTY, once you press any of 【Alt+i】 or 【Alt+j】 or 【Alt+k】 or 【Alt+l】, then any i j k l key will move cursor, no need to hold Alt anymore. Type any other key automatically exit.
(setq ergoemacs-repeat-movement-commands 'all)

;; set ErgoEmacs repeat move without holding Alt, but one key afterward. Example, on QWERTY, 【Alt+j j】 will move left twice
(setq ergoemacs-repeat-movement-commands 'single)

You can read more about features, settings, on his repo at https://github.com/mlf176f2/ErgoEmacs/tree/master/ergoemacs/ergoemacs-keybindings

may be offensive. FSF Spread FUD on Microsoft

emacs lisp is so primitive. You have sort, but it can't sort vector, only list.

also, you can't have literals for hash.

and really lots primitive issues. Any of Perl, Python, Ruby, JavaScript, PHP, beats emacs lisp easily.

the only hope for this to improve is waiting for Guile Scheme Lisp to takeover Elisp. The talk has been on for perhaps a decade now. Last hopeful news i heard is about 2 years ago.

zippy the pinhead

this one is old-school fun.

download this file http://www.vim.org/scripts/script.php?script_id=2411

rename the file and put this in your init:

(setq yow-file "~/.emacs.d/zippy_pinhead_quotes.txt" )

now, open that file, trim out the header and tail. So, the first line should be “Zippy the pinhead data base.” and last line should be the line about “synapses”.

Now, in emacs, call yow, and a zippism will show. To insert, call universal-argumentCtrl+u】 first.

(via George Jones)

some digging… the zippy quote were deleted out of copyright concerns, in emacs 22. http://lists.gnu.org/archive/html/emacs-devel/2006-06/msg00290.html

if you don't know, it's a old (1970s) comics. Zippy the Pinhead. See also: Art of Robert Crumb.

more update. Emacs: How to Make Ctrl+x Easier to Type on Dvorak Keyboard

updated. Keyboard Hardware Design Flaws

for those of you who prefer running emacs in max/fullscreen. Emacs: Manage Split Windows

for those of you who prefer multiple non-fullscreen windows. Emacs: Full-Screen vs Multiple Window

Emacs 24.3 Elisp Macro Speedup

emacs 24.3 made elisp code much faster. Quote:

** Emacs tries to macroexpand interpreted (non-compiled) files during load.

This can significantly speed up execution of non-byte-compiled code, but can also bump into previously unnoticed cyclic dependencies. These are generally harmless: they will simply cause the macro calls to be left for later expansion (as before), but will result in a warning (“Eager macro-expansion skipped due to cycle”) describing the cycle. You may wish to restructure your code so this does not happen.

Dmitry Gutov wrote a nice article that shows the speed increase: 〔Emacs 24.3's Killer Feature: Eager Macro-Expansion By Dmitry Gutov. @ dgutov.github.io…

It's a bit deep. If you code elisp, you should read it. If you don't code elisp, here's the gist:

via Andrew Hyatt

Emacs 24 Copy Directory Change

rewrote a previous article. Now on its own. This is useful for keyboard freaks only. Banish Key Chords. See also: Keyboard Shortcut Design: Repeatable vs Non-Repeatable Commands and Keys.

added this to my emacs. You type a comma, and a space is automatically added.

(global-set-key (kbd ",") (lambda() (interactive) (insert ", ")))

it'll take a while to get used to.

idea pilfered from 〔Minimizing Keystrokes Required by Punctuation By Eric Crosson. @ ericscrosson.wordpress.com…

warning: he's saying nice things about me.

in the name of uber efficiency: Emacs Keybinding Efficiency: Page Up/Down and Pigeon Hole Principle

worth repeating. Tips on Long Term Emacs Productivity

here's ErgoEmacs setup tutorial, by Sindikat: 〔ErgoEmacs tutorial By Sindikat. @ abstractnonsense.net…

new version of ErgoEmacs Keybinding is out again. I'm happy to report that the current maintainer Matthew L Fidler has adopted a idea i suggested. Now, “all” of chorded keys has a non-chorded replacement! You can press them by pressing ▤ Menu key first. Here's the current keys:

;; QWERTY used to indicate key position

("<menu> g" keyboard-quit "Quit")
("<menu> j" ergoemacs-ctl-c "Ctl-c")
("<menu> u" ergoemacs-ctl-c-unchorded "Ctl-c*")
("<menu> f" ergoemacs-ctl-x "Ctl-x")

("<menu> h" ergoemacs-ctl-h "Ctl-h")
("<menu> y" ergoemacs-ctl-h-unchorded "Ctl-h*")
("<menu> m" ergoemacs-ctl-c-ctl-c "C-c C-c")
("<menu> SPC" set-mark-command "Set Mark")

The keys are position based, and QWERTY layout is used to indicate their position. That means, doesn't matter whether you are using Dvorak, Colemak, Workman, Bépo, …, you can just look at the labels on your keyboard for the right key. The keys may not be final. But Matt is the maintainer now, so, you'd have to ask him, for suggestions or code push. Also, i haven't been keeping up my documentation of it. I hope to fix it down the road. Another new layout support is Persian standard layout, contributed by Shahin Azad. (it also supports Workman layout. and quite a few others now. You can see all layout supported in the menu 〖ErgoEmacs〗)

Matt also created a emacswiki page at http://www.emacswiki.org/emacs/ErgoemacsKeybindings, so you can post there, ask for help, or help make it better. (Matt says that don't use the emacswiki for question, because it's automatically generated from info file.)

for why about the non-chorded keys, you might get a good idea from my notes here: The Roadmap to Completely Replace Emacs's Key System, Part 2

i think this is really great, because for years i've been thinking how to resolve the cua-mode and emacs C-x issue. Now, i think this is the answer. The implementation is simple, and we don't need the complex hack of cua-mode anymore, and the traditional C-x are still there if one wanted, and the whole system is one step more efficient and ergonomic, even beats vi-like modes. (the main issue of vi's modal ways is that you need to constantly switch modes.)

there's a great page-break-lines-mode by Steve Purcell. It displays FORM FEED char (^L) by a horizontal line. The package is on MELPA. Call list-packages to install. 〔☛ A Guide on Emacs 24 Package System

After you install, you need to specify which major modes it should activate. Like this:

(setq page-break-lines-modes (quote (emacs-lisp-mode xah-elisp-mode compilation-mode fundamental-mode text-mode org-mode ruby-mode python-mode xah-html-mode html-mode nxml-mode)) )

this package is great because there are few others but interfere with whitespace-mode settings for some reason. 〔☛ How to Use and Setup Emacs's whitespace-mode

updated. Emacs: Insert Parenthesis/Brackets by Pair

on its own page. Lisp Logo Latte Art

updated. Emacs: Use Alias to Increase Productivity

the classic mechanical keyboard. IBM Model M keyboard, Unicomp

new. edited and on its own page. Emacs: Buffer Management

updated. Emacs Lisp: Hotkeys to Open File Fast

if you have a zip file, you can use emacs to open that, and edit any file content in it directly. No need to unzip. Same for gz files.

old tip. Now on its own page. Emacs: Open File Fast: recentf-mode

emacs conference. live. right now, Steve Yegge speaking thru video hangout. http://live.forwardtechnology.co.uk/

here's the official website, with speaker schedule. http://emacsconf.org/

a new version of my emacs tutorial is out. Buy Xah Emacs Tutorial. Thank you. For those who bought it before, i'm sending the new version out.

todo list crossout nothing
source: SpongeBob SquarePants cartoon.

you can do that with org-mode

# -*- coding: utf-8; mode: org -*-

* DONE <2013-03-29 Fri> nothing

updated. Emacs: Copy/Cut Current Line If No Selection

tip from last year, now on its own page. Emacs Lisp: Make Backup of Current File

Using Voice to Code Faster than Keyboard 📺

sacha chua, the famous female emacs hacker, (video) interviews the org-mode creator Carsten Dominik. 1 hour long. Fun to watch. http://sachachua.com/blog/2013/03/emacs-chat-carsten-dominik/

(via jcs)

Summery of My Typing & RSI Experience 1992 〜 2013

on its own page. Emacs Lisp: Refactoring, Move Code to Files

Microsoft Sculpt Comfort Keyboard. Space bar is now split into a ⌫ Backspace key.

Emacs Project Poll 2013-03-23

Emacs 24 added a new feature. Some function's inline doc now has a link to elisp manual. For example, call describe-variable on “font-lock-defaults”. Excerpt:

font-lock-defaults is a variable defined in `font-core.el'.

…

(See also Info node `(elisp)Font Lock Basics'.)

…

see also New Features in Emacs 24 and Emacs Lisp: Inline Docstring Markup.

actually, not sure this is new in emacs 24. I sure hope every function's inline doc links to elisp manual.

anyhow, you could easily find the elisp doc yourself. See Emacs: Finding Functions and Documentation Lookup. For elisp coders, you might define a advice so that describe-function will always have a link at bottom to elisp manual.

Tech Humor: Apache vs Node.js vs NGINX 📺 The relevance of lisp is the climax.

old page, one of my earliest tutorial in 2007, updated. Emacs Lisp: Writing a image-linkify Function. The updating process usually involves removing verbiage and auto-admiration, and removing learning thought-flow.

got a kick out of reading this. 〔Just Use Sublime Text “Sublime Text 2 vs Vim” By Andrew Ray. @ delvarworld.github.com…

Emacs Rocks on Paredit

slighly updated the home page of ErgoEmacs at ErgoEmacs. Window programing guru David Capello recently created a new build of ErgoEmacs app for Microsoft Windows. The download link is at the home page, or here https://code.google.com/p/ergoemacs/downloads/list.

facelift. Xah Emacs Tutorial

added a photo of Commodore 64 keyboard. Keyboard: Control vs Capslock Position

Emacs Dired: Open File in External App. Code updated. If you've copied this code before, be sure to update.

Unicode Rhapsody: Symbols to Represent “emacs lisp”

for Unicode freaks. Found symbols to represent emacs lisp ε . In normal text, it looks like this “εℓ”. Depending on what browser and OS you are using, it may look beautiful or ugly. Alternatively, use scripted “e” . ⁖ ℯℓ. But that's got too much affinity with Spanish.

the best way to setup to type them is emacs abbrev system. 〔☛ Using Emacs Abbrev Mode for Abbreviation〕 So, when you type “el”, it automatically becomes “εℓ”. (you can see my current abbrevs at https://github.com/xahlee/xah_emacs_init (it changes about every week.))

likewise, “ε” can represent “emacs” in a pinch, if you want your writing to become cryptic and symbolic logic like, like i do. 😎

though, i can't help but feel something is missing. the scripted “el” is kinda boring. Maybe we need to add a gnu head or something? Though, there's no gnu but ox and water buffalo and ram and goat. 〔☛ Unicode Animal & Insect Icons 🐭 🐮 🐍 🐵 🐞

updated. How to Write a Emacs Major Mode for Syntax Coloring

Emacs Lisp “defvar” Doesn't Override

new fancy pointing device. Contour Roller Mouse.

elisp home page got a facelift. Xah Emacs Lisp Tutorial

the design is flow based. Am not fond of fixed-layout. 〔☛ Web Design: Fixed-Layout vs Flowed-Layout〕 If you are learning CSS, checkout CSS Tutorial.

on its own page. Annoying Invisible ZERO WIDTH NO-BREAK SPACE Character from Google Plus, Twitter and how to use elisp to solve the problem.

on its own page. Emacs Lisp: update-title

on its own page. Emacs Lisp: Delete Current File

TypeMatrix Keyboard Review

Docstring Convention: Python vs Emacs Lisp

new version of ErgoEmacs Keybinding is out, by one advanced emacs lisp hacker Matthew L Fidler. He fixed lots hard problems and adding features. You can get a idea what's been fixed/added here: https://code.google.com/p/ergoemacs/source/list. You can also see his other emacs lisp projects here: Matthew L Fidler

Should You Type Space After Comma? and Tiny Space Bar on Japanese Keyboards

on its own page. Emacs Lisp: Python 2to3 Wrapper

in emacs 24.3, now execute-extended-command is now written in elisp, not C code. You can see the lisp code by calling describe-function. The emacs 24.3 release notes didn't mention this. This change is made by Aaron S Hawley. Thanks Aaron.

One great new feature of emacs 24.3:

when you isearch a phrase (⁖ “some thing”) and if the 2 words happens to be hard-wrapped into 2 lines, it'll still find it. In other words, emacs added a feature in isearch such that space can stand for a sequence of whitespaces.

This problem has been bugging me before, and i deeply blame it to the damages unix has done to computing. 〔☛ Programing: the Harm of Hard-wrapping Lines〕 But at least now emacs works-around it.

you can read more about this feature by calling view-emacs-news then search for “isearch”.

Mickey of “Mastering Emacs” wrote a easy-to-understand doc of what's new in emacs 24.3. Check it out. 〔WHAT'S NEW IN EMACS 24.3 By Mickey Petersen. @ www.masteringemacs.org…

a friend just got the truely ergonomic keyboard. Photo at http://www.flickr.com/photos/to1ne/8549811926/

if you gonna buy it, let me know too! Also, tell them Xah send you. Thanks.

emacs 24.3 is out. Download at:

release notes: http://www.gnu.org/software/emacs/NEWS.24.3

if you don't know how to compile on linux, see Building Emacs on Linux — a Guide

wrote a JavaScript app. Go to any Unicode gallery here: Unicode Symbology ☸ ⚕ ☯ ∑ ∞ © § ♀ ♂ ♥ ☺. Mouse hover or click on a character to see its Unicode name.

very useful, if you haven't used yet. Emacs: Rename Files Interactively by Pattern (regex; wdired)

on the keyboard layout front, there's a new layout, the qwpr. See qwpr Keyboard Layout

also, the Workman layout has vastly improved home page, plus now a forum. http://www.workmanlayout.com/

if you are not familiar with all these, see: Keyboard Layouts Fight! Dvorak, Maltron, Colemak, NEO, Bépo, Turkish-F, … (updated with images)

emacs global-set-key macro bug.

The following doesn't work.

(global-set-key (kbd "<menu> u SPC") " ") ; insert non-breaking space

but this works:

(global-set-key (kbd "<menu> u SPC") (lambda () (interactive) (insert " "))) ; insert non-breaking space

GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-02-04 on xah-p6813w ErgoEmacs distribution 2.0.0

learned a great command vc-annotate from Jon's blog. See:〔vc-annotate By jcs. @ irreal.org…

Emacs: Personal Keybinding, Habit, Muscle Memory, Incompatible Key Sets

when you use your personal key for about 2 months, it becomes muscle memory. Just as people who work among {Windows, Mac, Linux}, or switch between {emacs/bash, browser, photoshop}.

you'd unconsciously learn to adopt the different systems. Though, sometimes some error key press still happen. e.g. on the Mac, emacs copy 【Alt+w】 is prone to close a window — very painful. So, when i used to use default emacs keys, i developed a habit to copy by 【Esc w】.

ideally, all systems should use the same key system, but that's ideal. haha.

sometimes i read people who reviewed ErgoEmacs keybinding and liked it, but is reserved about using it, because it's another set to learn, creating clash with bash. But the fact is, one already is exposed to so many different systems, one just adopt. (btw, current version of ErgoEmacs can generate keysets for bash or AutoHotkey.)

even web browser, doesn't agree on keys, within the same OS. e.g the keys to switch tabs is different on different browser, and few others. Same browser on diff OS also disagree on keys. ⁖ in Chrome, go back is ⌫ Backspace on Windows, but 【Alt+】 in Linux.

then, even KDE and Gnome don't agree on many keys. What can you do?

i post frequently on Google Plus at ErgoEmacs. I like g+. It's very convenient for small tips and chat. So, you might give it a try. Also, i use twitter. Emacs related are posted to ErgoEmacs. So, if you want to quick contact or ask questions, follow. Thanks.

emacs. learned this new trick. delete-indentation. default key is 【Alt+^】. Seems it'll be very useful. (thx to Alexander Gallego)

u ♥ (λ ∨ ∑)? 👀 𝔰𝔶𝔪𝔟𝔬𝔩𝔬𝔤𝔶 @ Xah's Programing Blog.

all i ever wanted to know about keyboard, i didn't learn in kindergarten. Three hundred fourty images of keyboards. Keyboard Image Index

Apple iMac Keyboard A1242
updated. Apple Computer Keyboards Review

emacs packages update: xmsi-mode, ergoemacs-mode

lots more update: Emacs Unicode Math Symbols Input Mode (xmsi-mode). You can get it either by sending me $3 paypal (to xah@xahlee.org) or on ErgoEmacs repository.

also, there's more updates and fixes and features on the ErgoEmacs Keybinding minor mode, by Matthew L Fidler. Get it on MELPA.

Kinesis has a new generation of their split keyboard, Freestyle 2. 2-Piece Split Keyboards

updated. Emacs Lisp Multi-Pair Find/Replace Applications

hot keyboard news! Logitech now also makes mechanical keyboard. amazon

logitech g710plus keyboard
Logitech Mechanical Keyboard for programers

This is the best straight form mechanical keyboard for programers. See the review for my reasons why.

emacs dired tip: hiding some files

learned a new command. In dired, call dired-do-kill-linesk】 to hide marked files. Amazing. Using dired for over a decade and didn't know this command. This is useful when you call find-dired to show all subdirs when you want to do dired-do-query-replace-regexp, but some files you don't want to work on.

new to emacs? onto

updated. List of Keyboards with Mechanical Switch

Ducky keyboard and KeyBoardCheer keyboard!

discovered that the Ducky keyboard from Taiwan makes real quality keyboards. Check out their website. I don't think you can easily buy it in USA though. But you might be able to buy from the company's site via oversea shipping. (KBC is also quality.)

ducky channel girls 01
KBC Poker Keyboard, Ducky Keyboard

this gonna be a keyboard week. Lots updates, all about keyboards.

i'll also have lots to say about my new-found-love the Truly Ergonomic Computer Keyboard (TECP). I'll be telling you my experience in adopting the new physical layout.

there are lots new keyboards out there too, including from hushhush and hushhush, won't tell till i write it out.

also, exclusive news, that i'll be writing the firmware for TECP, and tell you how you can help, or sources, etc. For now, just run and buy TECP first. ☺

if you just subscribed to my emacs blog, there's lots existing articles. Do browse around for many tips. After blogging about emacs for 5 years, most generic tips are covered. A good tip is to browse one article a day.

there are still lots of elisp areas i haven't covered and need to learn myself. ⁖ font system, text overlay, window/frame/buffer manipulation, deep understanding of keymap system, process manipulation, networking, minor mode, lisp macros, comprehensive coverage of emacs's completion system, …, i'll gradually do so in the future. So far, the one elisp area i think i pretty much covered is writing interactive or batch text processing commands/scripts. This is probably the most useful.

also, i am starting to do ask emacs Tuesday again. I found that usually i won't be able to answer questions satisfactorily, because the questions are diverse, and usually not about using emacs or elisp, but rather about best modes for xyz or how to make xyz mode do abc. In anycase, i think it's still good to have ask/answer sessions. So, on every Tuesday, you can ask me on any social network, and i'll try my best to answer.

also, again, if you haven't gotten my tutorial, do buy it, as it'll help me really churn out the deeper elisp parts, and create more useful packages (they are all in ErgoEmacs project repo). Only $5 bucks.

Keyboarding: the Effect of Mechanical Key Switches on You

Programing Challenge: Replace String Pairs

should be fun. This problem started in elisp for me few years ago. Over the years, tried several elisp approaches… but overall i was stung twice. Few weeks ago, found a bug in my code. Rewrote it with a new algorithm thinking it's much better, but bang, another bug. That is, incorrect behavior.

Now i think i have a good solution, but still has certain limitations. So, am posting this as a fun coding problem, pulling on the talent pool.

am posting this as a general programing problem, not specific to emacs lisp. I do have a elisp solution, but can be easily translated to any other lang.

Programing Language Design: Why Lisp Macro Sucks (YMMV very much!)

another keyboard post.

I don't think this is for emacs users, but a fun funky keyboard, with mechanical keys (Cherry MX Black). Levetron Mech gaming keyboard

it uses Cherry MX Black, which is linear but require more force to press. I've tried Cherry MX Black, didn't like it at all.

there's a interesting bit about gaming keyboards. For gaming, many don't like any “click” in key press, because imagine pressing the fire button. You need to press it fast repeatedly, so clicky may not be good.

so, ALMOST ALL gaming keyboards, mechanical switch or not, are designed with linear feel.

in particular, all of Logitech's gaming keyboards (which do not use mechanical switch)

i've tried Logitech keyboard, don't like the key feel at all.

another interesting bit about gaming keyboard is that they are actually the vanguard of keyboard tech. 6 to 20 extra function keys, robust and easy-to-use software for on-the-fly key recording, onboard memory (no need to diddle with AutoHotkey or whatnot xmodmap, wmctrl, xdotool), backlighting, built-in display, all from gaming keyboards.

also, many gaming keyboards do have mechanical keys. I think most uses the Cherry MX Black, but some uses Blue (which is most clicky), or Brown (which is kinda standard for typing). 〔☛ Guide to Computer Keyboard Key Switch Mechanisms

update on the Happy Hacking keyboard. I love it not. But you might. Just drew the layout diagram of Happy Hacking Keyboard in SVG. The Idiocy of the Happy Hacking Keyboard

PS if you gonna buy it, buy it from my amazon link!

One of the major developer of xemacs was Ben Wing. He also suffered from severe RSI.

I was not able to find any info about him before, but a friend helped today.

See his linkedin profile at Celebrity Programers with RSI (Repetitive Strain Injury)

lisp logo latte art
lisp logo latte art. by Yuko Honda of http://geeklatte.com/. (img src, ©cc)

perm url Lisp Logo Latte Art

just annotated Matz's talk, with links, photos, comments, history. Ruby Creator Matz on How Emacs Changed My Life

xkcd comics workflow emacs
“every change breaks someone's workflow” http://xkcd.com/1172/

updated. Ruby Creator Matz on How Emacs Changed My Life

Emacs Lisp: Python 2to3 Wrapper

Emacs Power Challenge!

another Emacs Power Challenge from jcs. These “emacs golf” problems, seemingly trivial and irrelevant in real world, but is often the most fun way to horn your skills and learn new tricks, which will then burn into your muscle memory and increase your emacs power. Check it out.

EmacsGolf Challenge 2 By Jon Snader. @ irreal.org…

updated. Emacs Lisp Wrapper for Perl/Python/Ruby Scripts

you can use emacs lisp as a command line script just like Ruby, Python, Perl. Here's how to: Emacs Lisp: Getting Command Line Arguments.

𝔉𝔬𝔯 𝔞 𝔩𝔦𝔱𝔱𝔩𝔢 𝔣𝔲𝔫 𝔱𝔬𝔡𝔞𝔶, 𝔦 𝔴𝔯𝔬𝔱𝔢 “𝔯𝔢𝔭𝔩𝔞𝔠𝔢-𝔩𝔞𝔱𝔦𝔫-𝔞𝔩𝔭𝔥𝔞𝔟𝔢𝔱-𝔱𝔬-𝔤𝔬𝔱𝔥𝔦𝔠”. 𝔗𝔥𝔦𝔰 𝔴𝔦𝔩𝔩 𝔯𝔢𝔭𝔩𝔞𝔠𝔢 𝔞𝔩𝔩 𝔈𝔫𝔤𝔩𝔦𝔰𝔥 𝔞𝔩𝔭𝔥𝔞𝔟𝔢𝔱 𝔟𝔶 𝔊𝔬𝔱𝔥𝔦𝔠 𝔳𝔢𝔯𝔰𝔦𝔬𝔫 (𝔞𝔨𝔞 𝔅𝔩𝔞𝔠𝔨𝔩𝔢𝔱𝔱𝔢𝔯, 𝔉𝔯𝔞𝔨𝔱𝔲𝔯) 𝔱𝔥𝔞𝔱'𝔰 𝔞𝔳𝔞𝔦𝔩𝔞𝔟𝔩𝔢 𝔦𝔫 𝔘𝔫𝔦𝔠𝔬𝔡𝔢 𝔞𝔰 𝔠𝔥𝔞𝔯𝔞𝔠𝔱𝔢𝔯𝔰. ℌ𝔢𝔯𝔢'𝔰 𝔱𝔥𝔢 𝔠𝔬𝔡𝔢. 𝔗𝔥𝔬𝔲 𝔖𝔥𝔞𝔩𝔱 𝔘𝔰𝔢 𝔈𝔪𝔞𝔠𝔰 𝔏𝔦𝔰𝔭

for Linux users.

;; after copy Ctrl+c in X11 apps, you can paste by `yank' in emacs
(setq x-select-enable-clipboard t)

;; after mouse selection in X11, you can paste by `yank' in emacs
(setq x-select-enable-primary t)

tangential to emacs. aspell's Dismal Vocabulary Size

bottom line: add words to your aspell.

might be useful to emacsers. In Linux, sync X11 primary selection with clipboard, so you can copy/paste by both mouth and hand in unison. Linux: Commands Related to GUI Apps

also note, in emacs 24, a change is made to how emacs handle X11 copy/paste mechanism, so its more compatible with the rest Linux apps. see: New Features in Emacs 24

Is it true that keyboards before PC have Control key right besides the A key?

Emacs Lisp: Delete Trailing Whitespace on Save and Compact Empty Lines

when doing git push to github in shell inside emacs, it prints the password you typed.

Username for 'https://github.com': xahlee
Password for 'https://xahlee@github.com': 123456

not sure who to blame here.

normally, typed password isn't shown in the clear. But am not sure how emacs detect that. Anyone knows?

every now and then, people will ask what's the best keyboard for emacs. I thought i'll start a article dedicated to that. Best Keyboard for Emacs

updated. Why Emacs's Keyboard Shortcuts are Painful

geek vs non geek repetitive tasks
geek vs non-geek repetitive tasks

you can run emacs lisp as executable script from command line, just like other languages.

Emacs Lisp Idioms for Text Processing in Batch Style

Emacs Lisp: Writing Command to Accept universal-argument

emacs golf at Irreal

jcs over at Irreal is thinking of starting a blog or website dedicated to “emacs golf”. I submitted a problem and Jon wrote about it.

See: 〔A First Emacs Challenge By Jon Snader. @ irreal.org…

What approach would you take?

learning emacs lisp: output to separate buffer

yesterday, we had a elisp problem about extending the code for “extract-url” function. Did you understand the code? Here's simpler version with explanation. Emacs Lisp: Writing a Command to Extract URL

Elisp Exercise: Extract URL

emacs: ido-mode open file tricks

learned a new trick in ido-mode. When calling ido-find-file, you can use and to go to prev/next subdir. Here's a summery.

not sure what's ido-mode? See:

Emacs on Linux vs Windows

if you work between Microsoft Windows and Linux, this might be interesting to you. Linux: Speed Comparison: Linux Perl vs Cygwin Perl vs Strawberry Perl vs ext4 vs NTFS. (The Price You Pay for Layers and Emulations)

emacs on Microsoft Windows is much inferior when compared to Linux version. Here's quick list.

We try to fixed many of these in ErgoEmacs, but still, many just can't be fixed.

elisp tip. You can call apropos-value to search a string in emacs variables.

more update. Emacs: Commands and Keys to Navigate Brackets If you have used the functions there in your init, you might want to update too.

Emacs users typically spit on mouse. Still, you need a mouse or similar device, because it is the best device for browsing web, or manipulating 3D objects. What interesting ones do you use?

Kensington Expert Mouse and Slimblade Kensington Expert Mouse and Slimblade side-view
Kensington Expert Mouse vs Slimblade Trackball. 1024×768 photo by ronin amazon

Updated. Best Trackball Mouse

learned that the ⌘ Cmd key and ❖ Win are really identical in keyboard hardware. They send out the same scancode. Similarly, ⌥ Opt and Alt are identical. Updated: Difference Between Apple and PC keyboards

Just send off new version of emacs tutorial. Thank you for support.

If you like it, please tell friends.

If you bought my tutorial but isn't on the mailing list, please email me (xah@xahlee.org). Or, if you want to be taken off the list, just reply with “unsubscribe”. It'll be send out at most once a month.

If you haven't bought, buy it here: Buy Xah Emacs Tutorial. Ask me if you have questions.

updated. How to Avoid the Emacs Pinky Problem

Past Articles by Date

2013-012012-122012-112012-102012-092012-082012-072012-062012-052012-042012-032012-012011-122011-112011-102011-092011-062011-042010-122010-092010-05