Xah Emacs Blog Archive 2017-07

Elisp for text processing in buffers

reddit discussions https://www.reddit.com/r/emacs/comments/6qpbka/elisp_for_text_processing_in_buffers/

my take:

for me, the basic problems are, from more critical to less:

The emacs buffer type is far more powerful than string type. The addition of “point” datatype and others, narrow to region, move/search forward backward, insert/replace text anywhere, makes it far more powerful than any regex. I thought i'd write all text processing in elisp. But these days, i avoid it, unless i want to use it interactively while in emacs.

Do you use digit arguments a lot?

Never. Because:

reddit discussion https://www.reddit.com/r/emacs/comments/6qhhad/do_you_use_digit_arguments_a_lot/

emacs lisp: how to write indentation for major mode

Thanks to Johanne, alpha, alexander, for my first 3 patrons.

my next plan, see https://www.patreon.com/posts/13497775

god mode, the worst keybinding package in emacs

Dear chris done, thanks for chatting a couple years ago, but am sorry, your god mode is the most worthless keybinding package in emacs, yet with the most shameless hacker pride name.

to anyone using god mode. Turn on sticky key in your OS, and you'll be more efficient in no time, sans any hassle of memorizing key transformation contortion.

to anyone more interested in efficiency: for any complex keybinding you find yourself using, just define a key sequence starting with a lead key such as f8. You can do this, without installing any package, and within 1 minute, just 1 line of config.

(global-set-key (kbd "<f8> <f8>") 'save-buffer)

Then, next day, when another control meta gets you, just define another sequence. Soon, you'll have all key sequences, part of your muscle memory, yet, all default control meta combo still works.

but i don't like reaching for function keys!

Yes, each to his own. But also note that f8 can be any key. For example, set capslock to f24, and let f24 be the lead key. So, C-x C-s could be just capslock capslock, or capslock k, etc. The capslock could also be alt, so it's under thumb.

if you are using Microsoft's ergo keyboard, it has a big menu key on right side. Can just use that as leader key.

reddit discussion https://www.reddit.com/r/emacs/comments/6q2pow/my_current_solution_to_emacs_pinky_hope_it_helps/dku8t1y/

Be My First Patreon

dear Xah readers,

now i have a patreon account.

if you find my writing helpful, throw in some money.


I haven't wrote anything on patreon yet. May have to get on with the program, and start some marketing stuff, like, say nice things, put up a photo, etc.

but you probably knew me already. Be my first patreon.

I'll probably channel my emacs writing into more user-based tutorials. That is, i write what you want to read, instead of what i think is good.

$5 to $10 monthly, would be great.

Vote with your money. Thanks.

Emacs: Xah Fly Keys now supports workman layout. thanks to “alphago”.

thanks a lot to Arseniy for using xah-fly-keys and support! ♥ Emacs: Xah Fly Keys#comment-3435173190

Emacs: Paste or Paste Previous (the command now can paste n times)

emacs 26 new line number mode

Emacs: Show Line Numbers

Currently building emacs. I want the shiny new line numbers.

Emacs: How to Build Emacs from git Repository

Common Lisp sucks

emacs cl case 27173
emacs cl-case

See also:

Famous Programers on How Common Lisp Sucks

Controversy of Common Lisp Package in Emacs Lisp

Thoughts on Common Lisp Scheme Lisp Based Emacs 2008

Emacs: Organize Init File (major update)

Emacs: Reformat Lines for Source Code (fixed a bug where region remain active)

Elisp: Using thing-at-point (minor update)

Elisp: Get Buffer String (more edit, expanded a bit.)

Sigil is Back

elisp sigil 2017 07 13
elisp sigil, 2017-07-13

Now am using $sigil again.

It was like this ξx for a number of years, then finally gave up due to complaints, i used -x in past year, but now am using sigil again, this time it's $x.

Sigil has great syntactic advantages. I don't want to do without. The problem with a dash is that it's too similar to all other builtin lisp symbols, defeating the purpose of sigil in the first place.

I've updated all my elisp packages to use the new sigil.

[see Xah Emacs Packages]

And also changed all code on the website.

emacs sigil change 2017 07 13 80393
emacs lisp sigil change 2017-07-13

For the reasons why sigil, see

Elisp: Region, Active Region (major update)

Elisp: Get Buffer String (on its own page)

ido mode and icomplete mode

The following are all changed in major ways.

Elisp: Get User Input (correction on tutorial code )

Emacs: Name Completion (rewritten)

Emacs: icomplete vs ido mode (major update)

Emacs: Copy/Cut Current Line If No Selection (more bug fix, on xah-copy-line-or-region)

elisp love binary if logic 2017 07 08
a love of the binary if logic.

Emacs Mode Line Problem (minor update)

this article, 2008, was one of those that people called me a troll for. And today, you can enjoy the 6 or so mode line enhancement packages.

mode line modification, is one of those things, like color themes, that people love to use.

Emacs: Xah Math Input Mode (added screenshot)

Elisp: Get User Input (updated. added a example from picking from a list)

Emacs: Delete Text Block (more code update. now delete selection if there's one)

Robert J Chassell Died. Author of An Introduction to Programming in Emacs Lisp

[Goodbye to Bob Chassell By Bradley M Kuhn. At http://www.fsf.org/blogs/community/goodbye-to-bob-chassell , accessed on 2017-07-06 ]

See also Wikipedia Robert J. Chassell

emacs lisp whim justification yak shaving 2017 07 06
emacs lisp whim justification yak shaving 2017 07 06

Emacs: Reformat Lines for Source Code (code major rewrite)

Emacs: Find Replace Text in Directory (updated. showing how to use the xref buffer)

vim fun: construct byte sequence and show in vim

echo -n "e0 81 b3 e0 81 a8 e0 81 af e0 81 b4 e0 81 b3 e0 80 a0 e0 81 a6 e0 81 a9 e0 81 b2 e0 81 a5 e0 81 a4" | xxd -r -p | vim -
vim unicode shots fired 2017 07 04
vim unicode shots fired

from https://twitter.com/FakeUnicode

Emacs: Delete Brackets ()[]{} by Pair (code update. almost a rewrite)

Emacs: Highlight Brackets ()[]{} (updated)

Emacs: Copy/Cut Current Line If No Selection (fixed a bug of duplicated copy when cursor is at end of buffer)

Emacs: Org Mode Customization (some useful settings)

Emacs: Init File Tutorial (major update. Added lots config and explanation.)

Patreon me $5 patreon

Or Buy Xah Emacs Tutorial

Or buy a nice keyboard: Best Keyboard for Emacs

Patreon me $5. Ask me question on patreon