Xah Emacs Blog Archive 2015-08 to 2015-08

Richard Stallman: What's magit? Emacs Dev Condition 2015

Emacs Books

A new version is out. Buy Xah Emacs Tutorial.

Of all emacs books out there, online or in print, i do not believe there's anything that comes in close, in breath or in depth. Counting, all the emacs books O'Reilly published. (but excluding emacs lisp reference manual)

Not because Xah Emacs Tutorial is that great, but because, there is actually not much out there.

Of book-length emacs tutorials, there are just maybe 5 of them. Half of which are decade old, and none of them cover much emacs lisp. Except one: https://www.masteringemacs.org/.

Buy that book, and or buy my book. Thanks.

Elisp: How to Write Comment Command in Major Mode (new)

Emacs Menu Usability Problem (repost)

what features would you want for a keyboard

Reddit question: https://www.reddit.com/r/emacs/comments/3igjwa/what_features_would_you_want_for_a_keyboard/

See also:

Emacs: Run Emacs in GUI or Terminal? (someone asked on reddit)

Emacs: Unicode Tutorial (minor update)

emacs 24.5 is out. Download Emacs for Windows, Mac, Linux

it's out in April. Somehow i missed it.

on linux, you should build it yourself. [see How to Build Emacs on Linux]

xah fly keys. Major update. Now you can load it without errors. No dependencies. I'll be polishing it more in coming days.

Emacs: Run Current File (now supports Java, and Clojure, TeX/LaTeX.)

Emacs: Copy/Cut All or Selection (new)

How to Edit Lisp Code with Emacs

Essential knowledge if you ever code emacs lisp.

emacs: should you use evil-mode?

here's my recommendation.

if you want efficient keyset, there are 3 choices. evil-mode, ergoemacs-mode, xah-fly-keys.

if you don't like modal keys, then ergoemacs-mode is the best. It also supports standard keys for open close new copy cut paste undo etc, like any other software. Install and use right away, no need to learn. Also, extremely efficient keys. Keys are based on statistics of command call, mapped to score of key position, and using Alt+key instead of Control for fundamental cursor commands or delete operations.

use evil-mode if you are also a vi user, or plan to use vi too in the future. Modal keys is more efficient than Control/Alt. This also has large user base.

if you want the utmost efficiency, use xah-fly-keys. It's modal like vi, but without any vi baggage or compatibility. Key choice based on statistics of command call. Most keys are same as ergoemacs but modal. You'll need to learn everything fresh.

When in xah-fly-keys, you NEVER need to press Control+x. Everything C-x is a sequence of 2 to 3 single keys. Meta key is never used neither. You can still use all gnu emacs keys because xah-fly-keys doesn't use any of emacs keys.

from question on g+ about whether one should use evil. https://plus.google.com/107417407213709101682/posts/JKuXLk83aN6

About keybinding, each point above i have detailed article about it. About 2 hundred articles on every aspect of keybinding and keyboard too. You can find them at the following indexes.

Emacs: Run Current File (minor update)

Emacs Autotetris Mode

elisp program that play emacs tetris-mode by itself.

See the package here: https://github.com/skeeto/autotetris-mode

See explanation here: http://nullprogram.com/blog/2014/10/19/

Chris Wellons is a expert emacs lisp programer. He wrote quite a few non-trivial emacs software.

non-trivial here means, takes several months to do, involving not just emacs lisp knowledge, but algorithms and protocols and languages outside of emacs. In contrast, a typical language major mode takes 1 day to a week.

Some of the notable include:

Wellons is also a professional Java developer. So, if you work with Java, i'd recommend looking into his emacs config.

Wellons has mentioned in sacha's emacs talk 〔http://sachachua.com/blog/2014/05/emacs-chat-christopher-wellons/ 〕 that he has read the emacs lisp manual cover-to-cover several times. (info "(elisp) index") (yours truly, haven't done so even once.)

Wellons's got quite a lot interesting things in his blog. Of all emacs blogs out there, if you want me to name just 1, i can only think of Chris Wellons.

in emacs, Alt+x display-time-world.

Elisp: Run Elisp Script in Shell (repost)

i do this every day for the past 6 years, text processing 5k html files.

#Emacs «how» ‘to’ 「type」 ‹curly› “quotes”, 〔and〕 【ALWAYS】 (insert) [Brackets] {by} 〈Pair〉 Emacs: Insert Brackets by Pair

Emacs: Cycle Replace Space Hyphen Underscore (updated code)

Clojure Instaparse Parser Tutorial

Emacs: subword-mode, superword-mode, camelCase, snake_case (minor update. repost)

Emacs: Backup Current File (updated code. Now, if in dired, it'll backup current file or all marked files.)

thanks to reddit discussion, more keyboard added to

List of Keyboards with Topre Switch

reddit link at bottom.

Find File Location of a Feature Name

in emacs, if you know a feature name, you can locate the file by Alt+x find-library

For example, Alt+x describe-variable then type “features”. Then pick any of the item. Then, Alt+x find-library, type that item. Emacs will jump to the file where the feature is defined.

[see Elisp: What's “feature”?]

I usually do describe-function, then jump to the file location. But, find-library is more direct, and useful. Because sometimes you only know the feature name, not the command to invoke it.

got the tip from https://twitter.com/_wilfredh

List of Keyboards with Topre Switches (on its own page) This is the famous switch used in Happy Hacking Keyboard.

xah fly keys

is now a minor mode.

if you have question using it, just ask me. Best way is just to post a comment on the page or on the github page. You can also ask me on twitter or g+. Email's ok too but sometimes got eaten by spam filter.

currently it's suitable for those who love to tweak emacs keys.

i've seen pretty much all emacs keybinding systems out there. Especially in the past few years with lots packages. Including, evil, hydra, god-mode, etc. They are, scientifically, less efficient. But, better than GNU emacs default.

if you want something quality that works out of the box with lots users, then i recommend:

the ergoemacs-mode is Alt+key based. Evil is vi based.

Emacs Conference 2015, San Francisco

There's a emacs conference, (a Saturday) in San Francisco, CA, USA.

http://emacsconf2015.org/

register or plan at the above site.

i learned about it from the following emacs hangout.

2015-08-13 Emacs Hangout European Edition

sachachua leads the emacs hangout. Check out schedule and news at her site at http://sachachua.com/blog/tag/emacs-hangout/

emacs lisp programer for hire

if you have a emacs project, such as writing a mode for your company, i'm available. I charge $50/hour.

For basic mode, 1 hour would do.

Please contact me at 〔xahlee@gmail.com〕. (twitter ping me if i didn't respond. Sometimes new email are filtered by spam)

Emacs highlight current line

How to Set Emacs's User Interface (added a screenshot for global-hl-line-mode)

Emacs: Delete Current File (update from yesterday's code. Now it won't ask to save if buffer is modified)

Mac OS X: How to Create Keyboard Layout and Keybinding ⌨ (repost)

Mac OS X supports basics emacs keys. But you can add more.

Emacs in Microsoft Windows FAQ

repost:

Emacs: Delete Current File.

A new version of the command. The new one doesn't make backup, but simply copy file content to emacs's clipboard first.

fun emacs lisp: emulate real typing

(defun insert-typewriter (str)
  "Insert STR into the current buffer as if you were typing it by hand.

2015-08-10
Modified from
URL `https://gist.github.com/howardabrams/b5dc2082bcce46fdc9b8'
"
  (interactive "s")
  (mapc
   (lambda (char)
     (insert char)
     (sit-for (/ 1.0 (1+ (random 100)))))
   str))

;; test
(insert-typewriter "something, paste for example source code here.
Be sure to escape double quotes.")

via https://twitter.com/howardabrams

scifi author Tony Ballantyne on emacs

scifi author Tony Ballantyne (Recursion (novel) etc.), wrote a article on using emacs. See:

[• My Emacs Writing Setup By Tony Ballantyne. At http://www.tonyballantyne.com/EmacsWritingTips.html , Accessed on 2015-08-09 ]

eshell now has doc

in emacs 24.4.1, there's finally documentation for eshell. Alt+x info, then just go to the eshell point.

you can also read it online at GNU site at http://www.gnu.org/software/emacs/manual/html_mono/eshell.html

Emacs: Copy File Path of Current Buffer (improved code)

try this. blind fold yourself. Use your favorite language, favorite editor, write “hello world”, and run it.

did you succeed?

if so, it means, you can blind type, super fluent with your editor and without using mouse, familiar with your language.

comment at https://plus.google.com/113859563190964307534/posts/3SfNXQ6oc7D

Banish Key Chords. (repost. Whence Key Chord Came From? Is emacs keys or vi keys more efficient?)

Emacs: git, magit-mode (minor update)

printed org-mode manual

there's a printed org-mode manual, published by GNU.

emacs org mode manual cover
Buy at amazon

Emacs: Save Split Windows Configuration (repost)

emacs major version of magit is out. To upgrade, Alt+x list-packages, press U x.