Xah Emacs Blog Archive 2017-04 to 2017-05

Emacs: What's the Best Setup for Python, Ruby, Java, JavaScript, etc? (rewrite)

doc string popup update

Now, when you browse my tutorial, all commands have popup doc string.

For example, go to Emacs Keys Overview or Emacs Lisp Basics, move hover on any command name.

(note, technically not ALL, but all that are documented in emacs and elisp manuals.)

Emacs: Avoid Lambda in Hook (minor update)

Emacs: Change Major Mode Keys

Emacs: Change Minor Mode Keys

minor updates

Emacs: Uncolor Region/Buffer (minor update)

emacs lisp find/replace text processing saved the day

2017 05 30 174228 660x761 scrot
emacs find/replace code.

this saved the day. 250 files, among some 7 thousand html files.

Emacs: Select Line, between Quotes, Extend Selection (code update for xah-select-block )

Why Clojure is Dense

Emacs: Select Line, between Quotes, Extend Selection (code update for xah-select-block. fixed bug where it select block before cursor)

Emacs AutoHotkey Mode (ahk-mode) (minor update)

Emacs: Insert Random Number/Hex/String (code update. Now, by default, insert 4 digits.)

History of Emacs and vi Keys, on hackernews

my article hit hackernews. yay. https://news.ycombinator.com/item?id=14367207

the article is History of Emacs and vi Keys

thanks to whoever submitted.

Emacs: Change Brackets and Quotes (now supports ascii quote)

Emacs: xah-lookup.el, Lookup the Web (package updated)

emacs tutorial update 2017 May

Buy Xah Emacs Tutorial

new version of emacs tutorial is out. If you haven't got it yet, buy it. Thanks. (sending update to previous buyers this week)

last update is Feb 17. So it's been full 3 months.

in the past 3 months, quite a lot updates, you can see here in the blog. They are pretty much minor updates and code updates on tens of pages, and few pages are complete rewrite. (only content update counts here. I typically make typo and format updates (such as adding/changing navigation bar etc) every week on lots pages.)

also, i work on my emacs packages all the time. [see Xah Emacs Packages] The updates there are not counted for the tutorial here.

or, if you liked my work, please donate. goto paypal.com, and pay to “xah@xahlee.org”. Or, buy something from my keyboard pages at Keyboard Articles Index.

Thank you.

Elisp: Association List (new article)

Elisp: Sequence: List, Array (new figure added)

Xah teaching emacs/lisp, one-on-one video hangout

i'm teaching emacs or elisp, one-on-one, via video hangout.

It can be free-form, where you can ask me questions randomly.

or, we can do it in a free-form course format. Where, i teach you emacs for beginner from the ground up, or, i teach you elisp from the ground up. Starting at a level you are comfortable with.

I charge $25 per hour, via paypal.

please email me xahlee@gmail.com or private message via twitter to schedule a time. my twitter: https://twitter.com/ErgoEmacs

Emacs: xah-lookup.el, Lookup the Web (package updated. More ergonomic default keys.)

someone on reddit asking about whether he should use ergoemacs.

If you use it, please voice your views. Thanks.


Elisp: Font Lock Mode Basics (on its own page, expanded.)

pen spinning

yours truly fidgeting with pens like double lightsaber

xah lee pen spinning

good for preventing Repetitive Strain Injury!

and onto the roads of How to Avoid the Emacs Pinky Problem

and Why Emacs's Keyboard Shortcuts are Painful

Emacs: Move Cursor to Beginning of Line/Paragraph (sorry, more fixes.)

Emacs: Xah Fly Keys, swapped keys for copy/cut

Emacs: Xah Fly Keys (code update)

Swapped keys for xah-copy-line-or-region , xah-cut-line-or-region. Because, it seems lots users question it, and now looking at stats, my reasoning that cut is more frequently used does not have solid evidence.

Emacs: Convert Straight/Curly Quotes (code update. fixed highlight bug.)

Emacs: Move Cursor to Beginning of Line/Paragraph (revert to previous version. The version that moves to indentation end then beginning of line is too slow (too many steps) to jump over paragraphs.)

Emacs: How to Define Menu Key (minor update)

Emacs Always use kbd to define keys. Other syntax got problems and should be ban'd.

see https://www.reddit.com/r/emacs/comments/6adli0/preferred_syntax_for_defining_keys/dheggib/

Emacs: Move Cursor to Beginning of Line/Paragraph (code upgrade. now support visual-line-mode. Thanks to stasvlasov.)

Emacs Keybinding Syntax Examples (updated)

Emacs: Change Brackets and Quotes

more code update. Now support • `emacs' • `markdown` • ~org~ and others.

emacs 25.2 released

Download Emacs for Windows, Mac, Linux (updated)

See also: How to Build Emacs on Linux

Emacs in Microsoft Windows FAQ (updated.)

Emacs: Change Brackets and Quotes (new code. Now work with markdown style quotes and double square brackets)

Emacs Lisp Sucks Donkey Ass. Please Grow Emacs, Not External Tools

xah-js-mode now properly deal with /regex/ as string for syntax coloring. Emacs: Xah JavaScript Mode

Emacs: Move Cursor to Beginning of Line/Paragraph (code upgrade. now moves to indentation.)

art of git commit messages 2017 04 30
art of git commit messages

Emacs: Change Brackets and Quotes (fixed a bug of xah-change-bracket-pairs when region is active)

Emacs: Proportional Font (on its own page.)

moved from Emacs: Cycle Fonts by Command

Function Key vs Key Chord, Which is Healthier, Which is Faster?

If we rank people who sit in front of comp longest, measured by statistics with a device on the seat, i'd say i rank within top 500.

My Typing/RSI Experience 1992 to 2017 (updated)

Emacs: Open File Fast (code updated. Now ignore bookmarked cursor position.)

emacs. Don't use text-mode, use fundamental-mode

text-mode is annoying because the “U+22: QUOTATION MARK” does not have syntax of string.

that means, when in xah-fly-keys, the qwerty d key does not delete the whole string.

you can solve by:

(add-to-list 'auto-mode-alist '("\\.txt\\'" . fundamental-mode))

Emacs: Delete Parenthesis/Brackets ()[]{} by Pair (code change. fixed https://github.com/xahlee/xah-fly-keys/issues/19#issuecomment-297099907 )

Using Emacs Lisp as Scripting Language

A question on reddit asking about using elisp as scripting language.


my answer:

i wrote a lot elisp scripts, for over 10 years. Converted my perl python scripts to elisp. We had build script in elisp for ErgoEmacs distro back then. But i'd recommend use ruby python perl for those, or Scheme/Racket, golang. I don't write batch scripts in elisp anymore.

Here's elisp problems for scripting.

elisp shines when you need interactivity, and especially if you want to run it inside emacs and output in emacs. Such as grep or find/replace on directory of files. It's still much slower, but much easier to write, more convenient to use, can jump to file by link, colored output, etc, in a buffer.

but if you are comparing to bash+awk, i'd stick with elisp. Bash+awk are less powerful.

rms is on gnusocial, accessible via mastodon


here's emacs packages for them

Emacs: Toggle Letter Case (better code. Now will do whole string connected by low line _ and hyphen -.)

ergoemacs melpa stat 2017 04 19
ergoemacs-mode, 6.6k downloads. https://melpa.org/#/ergoemacs-mode

Elisp: Convert Color Formats: RGB, HSL, HSV (updated)

Emacs: Open File Fast (now the command will open file from emacs bookmarks, instead own list.)

Emacs: Bookmark (complete update)

[• My Journey with Touch Typing and Vim By Chris Wellons. At http://nullprogram.com/blog/2017/04/01/ , Accessed on 2017-04-08 ]

Customize Hippie Expand to Words Only

about 1 or 2 years ago, Hippie Expand started to have annoying behavior of expanding a word into a line or a blob of long text.

Here's how to fix. Put this in your init.

(setq hippie-expand-try-functions-list
        ;; try-expand-dabbrev-from-kill
        ;; try-expand-all-abbrevs
        ;; try-expand-list
        ;; try-expand-line

Note: order matters. This is what am using now.

Printed Citations to Xah Lee Site

nice to find 2016 book still cite Xah Lee.