Xah Emacs Blog Archive 2017-01

Emacs: Interactive Abbrev ๐Ÿš€ (moved url)

get a practical understanding. Public-Key Cryptography Concepts for Programers

The X-Windows Disaster This rant that every unix user knows in 1990s. Not so much in 2000s. Forgotten today.

learn how to use GNU GPG in 10 minutes. GPG Tutorial

Emacs: Setup Hundreds of Abbrevs

The above is rewritten, reverting to my old method of using abbrev by using a elisp abbrev file. It is the most simple and efficient way of using emacs abbrev.

Here's the traditional way of using emacs command, see:

Emacs: Abbrev Mode

It's much more complex. After using the traditional way for half a year, i reverted to the elisp file way.

Emacs: magit-mode for git (updated)

Customize Emacs

following are reviewed and updated (all minor).

  1. Emacs: Init File Tutorial
  2. Emacs: Install Package with ELPA/MELPA
  3. Emacs Init: Install Package Manually
  4. Emacs Keys: Define Key
  5. Emacs Init: M-x customize
  6. Emacs Init: Set Default Major Mode
  7. Emacs Init: Organize Init File
  8. Emacs: Byte Compile Elisp Files
  9. Emacs: Hook
  10. Emacs: Environment Variables
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 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 JS Mode (JavaScript) ๐Ÿ“ฆ

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 Object Reference

ใ€”see JS: ECMAScript 2015 Featuresใ€•

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

Buy Xah Emacs Tutorial

and

Buy Xah JavaScript Tutorial

much appreciated. Thanks.

Xah Emacs Commands New index.

Emacs: Delete Brackets by Pair ๐Ÿš€ (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 Blog

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

also, follow my programing blog. Xah Programing Blog

Emacs: xah-get-thing.el ๐Ÿ“ฆ (major rewrite)

Emacs: HTML, Lines to Table ๐Ÿš€ (complete rewrite)

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

Emacs: Change Brackets ๐Ÿš€ (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 Alt+x repeat-complex-command, without needing to answer the prompts.

ใ€”see Emacs: Repeat Last 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."
  (interactive
   (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 Web (xah-lookup.el) ๐Ÿ“ฆ

Emacs Yak Shaving

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: Show Whitespaces (major rewrite)

Elisp: Syntax Table (new)

Emacs: Delete Brackets by Pair ๐Ÿš€ (updated code. Now works on ยซยปโ€นโ€บโ€œโ€ too.)

Elisp: Find Syntax of a Char

Elisp: 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 Web (xah-lookup.el) ๐Ÿ“ฆ

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 Layout for Truly Ergonomic Keyboard. Major update. New layout design.

for Kinesis users, see Xah Fly Keys Layout for Kinesis/Ergodox Keyboard

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

Emacs: List Colors, Name, Hexadecimal (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: Alt+x fundamental-mode.

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

Emacs: Xah Find Replace (xah-find.el) ๐Ÿ“ฆ (now you can customize face. Alt+x customize-group, then type xah-find.)

Emacs Lisp Naming Convention

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: Copy to Register 1 ๐Ÿš€

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โฏ accessed: 2017-01-18ใ€•

Emacs: Move Cursor to Beginning of Line or Paragraph ๐Ÿš€ code complete rewrite. Now does not depend on another function.

Emacs: Upcase Sentences ๐Ÿš€ (new command)

Emacs: Delete Brackets by Pair ๐Ÿš€ (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โฏ accessed: 2017-01-16ใ€•

all syntax coloring on the site are redone, based on the latest version of Emacs: Xah Elisp 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

poll: 'NOERROR vs "NOERROR"

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

Elisp: Symbol vs String for non-nil Values

Elisp: 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
there are 15305 symbols in obarray, when emacs is run as --batch. Normally, it's 45k to 80k symbols or more, depending number of packages loaded.

Programing Language: Syntactic and Semantic Difference of Map Function

new tooltips

the tooltips are regenerated, from emacs 25.1

now ALL functions mentioned in elisp manual have tooltips. try Point (ELISP Manual) and Elisp: Types of Functions. (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.

Elisp: Types of Functions (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: Delete Brackets by Pair ๐Ÿš€ (new command.)

Emacs: Paste or Paste Previous ๐Ÿš€ (new command)

Emacs: Xah Elisp 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, year 2013

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)