Xah Emacs Blog

emacs rsi pinky 2017 03 23

i get a lot flames for this over the years.

see Emacs: Why You Should Not Swap CapsLock and Control

Emacs Chinese Input (minor update)

Emacs: Copy/Cut Current Line If No Selection

code update. now xah-copy-line-or-region won't move cursor to next line if region is active.

Thanks to baron42bba, from https://github.com/baron42bba/.emacs.d/commit/d96ce7e671628bb0f7b5307734a7e6f25295e602

JavaScript is the Number 1 Programing Language

Emacs: Xah JavaScript Mode

worked much on this in past year. Still 2 things need to be done. Indentation, and coloring of js regex string. But otherwise, it's got best completion, best function template, and best syntax coloring.

by the way, js is the most popular language for a number of years now. See http://redmonk.com/sogrady/2017/03/17/language-rankings-1-17/ and reddit discussion

also, learn from my tutorial.

〔►see JavaScript in Depth

Been working on that in past 6 months, adding ES2015 features, and transforming it into a complete reference. That is, detailed page of ALL JavaScript objects and methods.

〔►see JavaScript Objects Reference Panel Index

〔►see JavaScript: ECMAScript 2015 Features

i'm surviving on $500 a month for past few years.

Buy Xah Emacs Tutorial


Buy Xah JavaScript Tutorial

much appreciated. Thanks.

Xah Emacs Extra Panel Index. New panel index.

Emacs: Delete Backward Char or Bracket Text (code update. Now if C-u is pressed first, don't delete inner text. See docstring for detail..)

Kinesis Edge keyboard

If you like traditional shaped keyboard, a top-notch one is coming out. Kinesis Edge keyboard. I consider it better than all traditional shaped existing keyboards. If you buy now, you save about $80.

see https://www.kickstarter.com/projects/294674098/freestyle-edge-the-ultimate-split-gaming-keyboard

Also, subscribe my keyboard blog at Xah keyboard Bloghttp://xahlee.info/kbd/keyboard_blog.xml

If you are on linux, check out Xah's Linux Setup. lots tips and tutorials.

also, you might follow my programing blog. Xah Programing Bloghttp://xahlee.info/comp/blog.xml

Emacs: xah-get-thing.el (major rewrite)

Emacs: Lines to HTML Table (complete rewrite)

Emacs: Change Brackets () {} [] in Region code update, and emacs repeat-complex-command problem

Emacs: Change Brackets () {} [] in Region (code update.)

fixed the pesky problem of emacs repeat-complex-command problem of not getting the correct region begin/end.

here's quick explanation.

In emacs, after you've done an interactive command call involving prompting, you can call the command again by calling repeat-complex-command, without needing to answer the prompts.

〔►see Emacs: Repeat Last Prompted Command

The problem is, if your write your elisp code using interactive with region begin/end as arguments, like this

(defun my-do-line-or-region (begin end)
  "do x, on current line or active region."
   (if (use-region-p)
       (list (region-beginning) (region-end))
     (list (line-beginning-position) (line-end-position))))
  (message "%s %s" begin end))

then, when your call repeat-complex-command, the region positions are hard-coded from last call.

there are solutions but i haven't found them to be robust. don't have time to write a detailed account now.

basically, more reliable is simply remove the begin/end as parameters. The problem with this is that now the command is less convenient to use in elisp code. Before, you can call the function with begin/end positions. This is clear code. Now, you have to mark a region first and make it active. This is less clear code.

Emacs: Novel Reading Mode (updated)

Emacs new version xah-lookup.el, added xah-lookup-etymology Emacs: xah-lookup.el, Lookup the Web

Best Tool for Yak Shaving: Emacs

Xah Emacs Tutorial, new version out

Buy Xah Emacs Tutorial

huge amount of update in the past 3 months. Lots new super efficient commands, tutorial on syntax table, new JavaScript engine of doc popup in browser, and xah-fly-keys now supports qwerty, a major milestone.

Recommend to a friend. Link to articles. Buy it. Thanks.

sending out update to previous buyers this week.

Emacs: Make Whitespaces Visible (major rewrite)

Emacs Lisp: Syntax Table Tutorial (new)

Emacs: Delete Backward Char or Bracket Text (updated code. Now works on «»‹›“” too.)

Emacs Lisp: How to Find Syntax of a Character?

Emacs Lisp: How to Modify Syntax Table Temporarily (rewritten)

xah-fly-keys, announced on reddit. https://www.reddit.com/r/emacs/comments/5t884r/xah_fly_keys_now_supports_qwerty_layout/

If you support the project, please give it a upvote, and tell friends. Thanks.

also, star it on github. https://github.com/xahlee/xah-fly-keys Thanks.

home page at Emacs: Xah Fly Keys

Emacs: Run Current File (updated. Now supports TypeScript)

Emacs: xah-lookup.el, Lookup the Web

Major new version. Now you can customize each lookup command's URL and which browser to use. Can also write your own command to lookup php, clojure, etc. New version should be in MELPA the next day.

xah-fly-keys with Truly Ergonomic Keyboard. Major update. New layout design.

for Kinesis users, see Kinesis/Ergodox layout for xah-fly-keys

How to Make the CapsLock Key do Home Key (updated, for Linux, Mac, Microsoft Windows)

Emacs: Working with CSS Color Values (updated code. calls font-lock-flush instead of font-lock-fontify-buffer)

big thanks to Avi for donation $$$ for Emacs: Xah Fly Keys

open this file in emacs. https://tc39.github.io/ecma262/2016/#. 13th line is 1.2M chars. emacs death.

solution: M-x fundamental-mode.

Emacs: Xah Fly Keys (now it overrides other minor modes, as it should.)

Emacs: xah-find.el, Find Replace in Pure Elisp (now you can customize face. Call customize-group, then type xah-find.)

reddit discussion, on emacs naming convention


it's the convention of the mothership.

many of these conventions, are kinda vague, some are out-dated, some are ill-designed.

many packages outside GNU emacs do not adhere to them, but are tolerated. For example, the most popular packages on MELPA, dash, s, break these conventions.

it's a gray area, between conservative and progressive.

if you chose progressive, the problem is that huge amounts of existing lisp code are not gonna change (lots work, risking bug to fix but little benefit, or packages not maintained but still used, etc.), you end up with inconsistency.

if you chose conservative, then you reduce progress and adoptation.

For example, let's say the naming convention. Besides the prefix:

• predicate could end in ? (as in Scheme/Racket Lisp, ruby, clojure) instead of p. Since question mark is more intuitive, is easier to identify, and can be syntactically verified by machine. (p can't because not all functions ending in p is a predicate.)

• the double dash for internal methods (aka auxiliary functions) is kinda unsaid convention, and code out there may or may not conform. (if we go strict about this, i think one'll find huge amount of functions need to be renamed.)

• variable beginning with low line _ as form-filler unused var is another unsaid convention. It kinda came from modern (say after 2010) practices in other langs (i think python ruby).

• in function doc string, it's GNU emacs convention to use ALLCAPS for parameters. This is also not a perfect convention, since elisp is case sensitive. This make it hard to actually have parameters that's ALLCAP or camelCase or single capital letter such as Z. Also, using ALLCAPS is a weak, ambiguous markup, since it prevents the normal English convention of using ALLCAPS for emphasis.

but as most coding convention goes, they are not systematically designed. They came by-and-by via practice and evolution. It'd be nice if the language enforce syntactic conventions. For example, var of ALLCAPS has semantics of global var. (sigils in perl, ruby, golang, and other lang feature these) An extreme case would be syntax algebra, where the syntax alone is the semantics and can be processed/manipulated (like highschool algebra). Formal Languages are such case.

Emacs: Xah Fly Keys now supports QWERTY layout! Try it.

Emacs lots work on Xah Fly Keys in past month. Added 5 efficient commands. Emacs: Xah Fly Keys

Emacs: 1 Key to Copy/Paste from Register

new command xah-append-to-register-1 and xah-clear-register-1

emacs poll: do you ever use point-to-register and jump-to-register?

vote at https://twitter.com/ErgoEmacs/status/821882792183099393

Emacs: Move Cursor to Beginning of Line/Paragraph code complete rewrite. Now does not depend on another function.

Emacs: Upcase Sentences (new command)

Emacs: Delete Backward Char or Bracket Text (now supports ascii quotes.)

emacs logo poll 2016 12 27
Poll result: do you like emacs logo in the splash screen? https://twitter.com/ErgoEmacs/status/813938274766966784

all syntax coloring on the site are redone, based on the latest version of Emacs: Xah Emacs Lisp Mode (that is, if you use xah-elisp-mode, the coloring in emacs buffer would be the same as on the website.)

notable is that the coloring are based on the “types” of symbol, as detailed here: Meaning of Lisp List, Function Type, and Syntax Coloring

still to do, is the tooltips for variables.

Emacs: Paste or Paste Previous (bug fix)

Meaning of Lisp List, Function Type, and Syntax Coloring


new poll, 'NOERROR vs "NOERROR". vote at

Emacs Lisp: Symbol vs String for non-nil Values

Emacs Lisp: Find Matching Bracket Character (new article)

Emacs: Quote Lines (code update. Now delimiters are added by skipping whitespaces)

emacs symbols obarray list 2017 01 06
emacs run as --batch, not loading anything, there are 15305 symbols in obarray. normally, it's 45k to 80k symbols or more, depending number of packages loaded.

Programing Language: Syntactic and Semantic Difference of Map Function

How Many Keyboard Shortcuts Are There

new tooltips

the tooltips are regenerated, from emacs 25.1

now ALL functions mentioned in elisp manual have tooltips. try (info "(elisp) Point") and Emacs Lisp: What's Function. (goto the page, hover mouse over a function name, or touch it in phone/tablet.)

though, it turns out, quite a lot commonly used functions are not in elisp manual. For example, eval-last-sexp, ielm, describe-function.

Am working on that. Also, variable will also have tooltip soon.

Emacs Lisp: What's Function (major rewrite.)

i think sometime between 2013 to 2016, defun is moved from implemented in C to implemented in elisp.

;; test if defun is implemented in C
(subrp (symbol-function 'defun))

#emacs ido-completing-read can handle 81k items no problem

Emacs: Delete Backward Char or Bracket Text (new command.)

Emacs: Paste or Paste Previous (new command)

Emacs: Xah Emacs Lisp Mode (Major update. Now, ALL elisp symbols in elisp manual are colored, and are colored by their technical type: function, special form, macro, command, user option, variable. )

Emacs: Change to Title Case (minor code update. fixed “can'T” to “can't”)

List of Emacs Starter Kits

new one is scimax, for scientist/engineer for reproducible research and publishing. Focus on LaTeX and org-mode.

Emacs: View Info Page (minor update; new screenshot)

emacs sign 2016 12 31
〔image source 2016-12-31 https://twitter.com/murphy_karasu/status/815133850489626624

vim fitness vs M-x Donuts

Emacs Lisp: What's Symbol. understand lisp symbols. (complete rewrite)

the emacs manual mirrored on my site, is also updated to version 25.1. see (info "(emacs) index")

though, i rarely link to it. Because, if you want to learn emacs, there are quite a lot approaches that's more efficient than reading emacs manual.

i recommend:

  1. Just use emacs. Use and use, profusely. When you have a issue, seek answer, on the web, on xah tutorial, or ask stackoverflow, reddit.
  2. When you have leisure time, start learning emacs lisp.
  3. To learn emacs lisp, my advice is just to read my elisp tutorial. Practical Emacs Lisp. There's not much material elsewhere.
  4. While you are learning elisp, write helpful commands you need. And in the process, you'll have questions, then, seek answer.
  5. You will start to read parts of elisp manual now and then. This is real progress, making you understand emacs.
  6. Soon, you'll want to write a non-trivial package. This is when, you start want to read the elisp manual thoroughly.

the how to write a emacs major mode series, all pages have been updated. see Emacs, How to Write Major Mode, Panel Index

Emacs Lisp: How to Define Face (new)

Emacs: Color Nested Brackets

Emacs: Quote Lines (new command)

how often do you change your emacs init?

vote at

reddit: evil mode vs emacs keys


i've researched this issue a lot.

about your specific list, like /r/angelic_sedition, i think some items can be made more precise, while some items may not be relevant without a precise goal. For example, your 3rd item about “harder to create specific keybinding…”. Is your goal/question about emacs, or about generic context with a programable keyboard such as ergodox? They have different answers. For example, if it's about in emacs, best is to avoid defining a key in keyboard firmware to send a chord that emacs uses. Better is just to directly define a keybinding in emacs. (unless there's some other issue, doing this as a workaround)

given a very flexible programable keyboard such as ergodox, and you want to program the keys, there's the choice of optimizing it for emacs, or optimizing for general use outside of emacs too. Or, somewhere in the middle ground. It depends on how much your time is spend in emacs. (for me, i optimize for emacs some 90%, because I almost type everything in emacs than paste it somewhere.) (if you optimize for emacs, there's of course also the question what key system you use, e.g. evil, or emacs default, or other.)

For general question about programing keyboard firmware for utmost efficiency, Gergely Nagy wrote a great article. See

Multi-purpose keys, and a case for small keyboards By Gergely Nagy. @ https://asylum.madhouse-project.org/blog/2016/10/15/multi-purpose-keys/

in general, modal mode will save you key strokes, all thing considered (including the need to press a key to switch mode), i estimate that modal mode saves you about 10% count of key press.

also, note that vim modal mode is not efficiently designed. The key choices are mostly historical, not based on command frequency.

emacs default keys are also historical.

Lastly, i'd say, if you want the most efficient modal mode based on command frequency statistics and ergonomics, might try Emacs: Xah Fly Keys you want the same but based on chords, then ergoemacs-mode http://ergoemacs.github.io/. Evil mode is great in that it is fairly efficient, and have the advantage of also muscle memory of using vim, make it a good choice on wide range of computers one may need to type on without config.

new. on melpa by request. xah-reformat-code (20161216.1859) --- commands to reformat source code. https://melpa.org/#/xah-reformat-code

explanation at Emacs: Reformat Lines for Source Code

Emacs: Rename File from Space to Hyphen/Underscore (bug fix. Now will also rename the buffer if open.)

elisp manual updated

the gnu emacs lisp manual mirror on my site is updated to emacs version 25.1. See (info "(elisp) index")

the gnu emacs manual html version CSS has improved in recent years. In 2013, it's still 1999 era html. Now it's modern looking.

Emacs: Using Eww Web Browser (new screenshot)

why a file variable “lexical-binding: t” is better than a special function “lexical-let”?

emacs skeeto (chris wellons, author of elfeed, skewer, etc) explains advantages and workings of lexical binding really well.

The advantages of lexical-binding:

  1. It has a measurable performance advantage. For example, variable accesses are simple array loads (stack-ref opcodes) rather than global variable lookups (varref opcodes), and the compiler can optimize away lexical variables.
  2. It's less buggy, since local variables aren't exposed to callees.
  3. The compiler can perform additional checks and will provide additional warnings.
  4. Closures.
  5. It applies not just to let, but to all forms that create local bindings, such as function parameters, condition-case, and any macros that expand to let.

[from https://www.reddit.com/r/emacs/comments/5j9qgz/lexicalbinding_t_vs_lexicallet/dbevk2j/]

He then proceed to explain in terms of bytecode. Be sure to read it in the link above.

One of the reason, that lexical binding applies to not just let but also function parameters, condition-case etc, convienced me why file level declaration is the right choice, with respect to language design.

“lexical-binding: t” vs “lexical-let”?

What's the reason of introducing file variable “lexical-binding: t” instead of a macro/special-function such as “lexical-let”?

emacs lisp doc tack symbol
emacs lisp doc use tack symbol

nice to see math symbol used in emacs.

the symbol used is (U+22A3: LEFT TACK)

See also: Unicode Math Symbols ∑ ∞ ∫ π ∈ ℝ²

emacs lisp toothpicktitus 2016
emacs lisp toothpicktitus

emacs lisp lexical scope, and the problem of bandwagon

updated all my packages to use lexical scope.

you can see all my packages at Xah Emacs Packages Panel Index

Here's functions updated that has a tutorial page:

to declare lexical binding, add this to the first line of your elisp file:

;;; xyz.el --- xyz does xyz. -*- coding: utf-8; lexical-binding: t; -*-

if your elisp package uses lexical binding, you also need to declare this:

;; Package-Requires: ((emacs "24.1"))

That's the convention of emacs version requirement declaration used by melpa package repository.

lexical binding is introduced in emacs 24.1 (24.4. is released in 2014-10)

lexical binding makes elisp code run slightly faster, and elisp compiler will find more errors, such as unused local variable. And pave the way for the future of elisp. (e.g. concurrency)

〔►see Emacs: Byte Compile Elisp Files

one interesting finding is that this form of function call:

((lambda (x) (+ x 1)) 3)

is deprecated. You should do:

(funcall (lambda (x) (+ x 1)) 3)

but actually, the funcall form is inferior. It introduces a new function. Most other langs don't need it. For example, scheme lisp, clojure, JavaScript, Wolfram Language and most other modern languages can directly call function in the form of normal function call, simply replace the function name by a function expression.

For example,

the problem with elisp is that a function doesn't just return a function. Instead, elisp has symbols, and a symbol has function cell and value cell. The value cell could potentially contain another symbol whose value is another function (i.e. symbol with function cell). In other words, a function isn't just a function, but could also be a variable, and the value of the variable could also be a function. So when you have (f arg), that f could be a function itself, or could be a variable that holds a function. This is the same problem with Common Lisp. In the case of ((lambda …) arg), it works, but i suppose is deprecated because in general won't work with arbitrary expression for the head.

another thing i never understood, is why emacs dev introduced a directive for lexical binding. I rather prefer a new function/macro, such as “lexical-let”.

by the way, if you write code properly, for example, always use function without side-effect, and always use local variable, then you don't really need lexical binding. It has no effect.

my stance was, am never going to add that lexical binding directive. It really should be part of the language. If it is “lexical-let”, then i'd be happy to use it. But the thing is, usually you can't fight a trend in large society. When something becomes popular, that everyone is doing it, even if it is a stupid one, you can't simply stand aloof and to keep yourself of some superior way, because, when everyone is doing it, it has an effect on many other things and future change. Your “incompatible” superior way gradually gets in the way as things evolve with the inferior system. Example of such as QWERTY keyboard layout, unix, programing conventions, writing convention. For elisp lexical binding, it is the way things are and elisp is moving forward. If your code does not use such directive, your code will not be able to reap whatever advantages coming to it, will be left behind, and most coder don't understand will simply think your code is stupid.

js2-mode error highlight problem

emacs js2 mode syntax error highlight problem 2016 12 15
emacs js2 mode syntax error highlight problem 2016-12-15

js2-mode got this annoying syntax error highlight problem.

it sticks with the old school style of requiring semicolon. But thousands packages on npm follows new school style of no semicolon.

〔►see JavaScript: Semicolon Rules

if you want js2-mode features, a solution is the derivative js3-mode.

ido-separator obsolete

in emacs 25.1, the variable ido-separator is now obsolete. Replaced by a element in ido-decorations

for new elisp code to config, see updated:

Emacs: Switch Buffer

emacs lisp completion problem

start emacs with -Q, open a new buffer, M-x emacs-lisp-mode, type defu, press C-M-i, do you get “defun” or “defun-”?

vote here:

poll results:

emacs lisp completion 2016 12 01 poll gplus emacs lisp completion 2016 12 01 poll twitter

this is quite odd. I remember it was working.

but apparently, about half of people, they don't get proper completion. (nor me. I'm on emacs 25.1.1)

it's interesting because:

if you did get the correct behavior, did you actually start emacs with -Q? What emacs version are you using? (post comment on twitter or Google Plus.)

emacs, real auto save, and auto save when you call M-x

there's a package called real-auto-save, on melpa. It does “real” save periodically.

i was temped to write my own, but my current solution is that in Emacs: Xah Fly Keys , a modal key mode, everytime i switch to command mode, it also does a save.

you could do the same. For example, everytimes you call M-x, it does a save then M-x. Just write a short elisp command wrapper like “save-buffer-then-execute-extended-command”. If you want and don't know how, ask, many or i can show you how.

reddit comment at https://www.reddit.com/r/emacs/comments/5h7k1r/undo_lost_hours_of_work/dazcpjq/

reading emacs manual vs elisp manual?

if you want to read emacs manual and want to be efficient in learning, read the elisp manual instead.

because emacs really is just lisp interpreter with a user interface. ie the GUI or TUI in terminal

this emacs lisp interpreter environment, is beyond repl. You can eval any buffer, or code, anytime, as in a interactive notebook.

emacs has a repl on top of emacs lisp environment, M-x ielm

〔►see How to Evaluate Emacs Lisp Code

elisp manual is hard to read. You have to go thru hundred pages just to cover elisp basics. GNU Emacs Lisp Reference Manual (info "(elisp) index")

the hundred pages of elisp manual is summarized just by 10 pages here Emacs Lisp Basics

Emacs: Xah Math Input Mode now can be buffer local or global. Emacs: Xah Math Input Mode

Emacs: Xah Emacs Lisp Mode Much update in past months. If you had problem with company mode, now it's fixed.

just tried Emacs: Xah Fly Keys on emacs 24.5.1 started with -Q. runs smoothly

Emacs 25.1.1 Change: emacs-lisp-mode extracted from lisp-mode to elisp-mode.el

the emacs dumper dispute

another controversy in emacs. https://www.reddit.com/r/emacs/comments/5frpp4/the_emacs_dumper_dispute/

Emacs Redisplay Internals, and JS Mode War

Emacs: Move Cursor to Bracket/Quote

updated code. Now xah-goto-matching-bracket will jump to matching quote too. And fixed a bug in xah-forward-quote-smart.

gnu emacs disabled a feature for Mac OS X so that it isn't better than linux version of emacs

gnu emacs removed code for color emoji feature in Mac OS X. see

Bye Bye Emojis: Emacs Hates MacOS By Sebastian Wiesner. @ http://www.lunaryorn.com/posts/bye-bye-emojis-emacs-hates-macos.html

On the OS X Cocoa (“Nextstep”) port, multicolor font (such as color emoji) display is disabled. … This will be enabled again once it is also implemented in Emacs on free operating systems.

reddit discussion https://www.reddit.com/r/emacs/comments/5e3xpu/emojis_in_emacs_intentionally_disabled_for_osx/

see what the current leader jwiegley has to say, in comment above.

jwiegley wrote:

This decision wasn't something “I approved of”, in the sense you're thinking. I do use a Mac, and I do miss my color emojis.

GNU Emacs is a project of the Free Software Foundation, and when they deem an issue as relating to their political agenda, it trumps the technical purview of the project maintainer. I keep Emacs going from a software point of view; they keep the FSF going as a movement.

If RMS says that such a change relates to freedom, I can either acquiesce or walk away. I didn't think color emojis were important enough to walk away. The gcc/clang dispute was part of the reason the last maintainer walked away.

It's a free project. If a group of people is willing to put in the effort, you could fork Emacs and make it into something better, freed from the FSF's policies. Until that happens, expecting them to change by writing blog posts, or commenting on Reddit, is not going to have any effect whatsoever.

by the way, it has always been like that. Every few years, major things like this happen got into news.

See also: GNU Emacs and XEmacs Schism

Emacs: Move Cursor to Bracket/Quote. new command xah-forward-quote-smart.

Emacs: 1 Key to Copy/Paste from Register

after a decade of back and forth about using this command vs copy-to-register, i think this is far better.

Emacs: Spell Checking

Emacs: Cycle Replace Space Hyphen Underscore (more code update. Now works inside parenthesis or bracket if is.)

keyboard efficiency tip: never mouse aim to close tab

keyboard efficiency tip: never mouse aim to close tab. too much effort. Middle click tab also takes aim. Set Pause key to close tab. Or, F13.

also, set F11 F12 to switch prev/next tab. Make use of all your Function Keys F1 F2…

see how to here: What's the Use of Function Keys F1 F2…?

in emacs, do the same. close buffer, next/prev user buffer, all single, one, key.

when kill buffer, stop emacs from confirming. also, a key to reopen last closed. see how to here: Emacs: Open Last Closed File

command to switch to Next/Previous User Buffer. Skipping scratch, info, shell out, etc buffers. Emacs: Next/Previous User Buffer

if you have a numpad, best is to set keys / * - to prev buffer, next buffer, close buffer. here's how: Emacs: Bind Number Pad Keys

Emacs Lisp: Some and Every

Emacs: Change Brackets () {} [] in Region (rewrite code. Now better code, also highlight changed places.)

emacs abbrev setup: using emacs commands vs using elisp code

after trying to use emacs abbrev commands to build list of abbrevs for a year, don't like it. Am reverting back to using elisp code for abbrev in my emacs init.

The advantage of just following emacs abbrev commands to create edit save abbrev is that, you have a tally of how many times you used each abbre. Sounds useful, but after 3 months, i find that the info isn't useful at all. I find that just a handful of abbrev i use daily, but i still want the rest abbrevs. The idea that i'll modify my abbrev based on the statistics of usage, didn't work out.

But mostly, the problem with following emacs abbrev command to create edit save abbrev is that, you have less control.

with abbrev as elisp code in my init file, i can control the regex used, the expansion function, the hook after expansion, for each abbrev. And, i can just edit it as easily.

Compare, using emacs abbrev commands: Emacs: Abbrev Mode Tutorial vs using elisp code Emacs Lisp: Create Abbrev and Templates for Major Mode

algorithm problem, matching cups and spoon

elisp problem lines and seats 2016-11-02
algorithm problem, matching cups and spoon 2016-11-02
Like it? Buy Xah Emacs Tutorial. Thanks.

or, buy something from Best Keyboard for Emacs

Xah Emacs Blog Archive Index