Xah Emacs Blog Archive 2017-07
Do you use digit arguments a lot?
Never. Because:
- the digits args sit on a whopping ~21 easy keys spots, with Control and Meta, 0 to 9 plus negative sign. Even if you use
digit-argumentfrequently, it's not good use of key spots, because lots other commands are more frequently used. - am against commands that require one to think about βhow manyβ (vi's style do this a lot.). I think it's a brain cycle drain. Often you overshoot or undershoot. Better is to hold a key and repeat, which relies on visual only.
- when a digit argument is required, i use the universal
universal-argumentwith C-u. - Relative very few command take a digit argument. And even when they do take a universal-argument, the behavior is idiosyncratic to each command. This makes them much less useful.
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.
https://www.patreon.com/xahlee
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 π¦
http://xahlee.info/emacs/misc/ergoemacs_vi_mode.html#comment-3435173190
Emacs: Paste or Paste Previous π (the command now can paste n times)
emacs 26 new line number mode
Currently building emacs. I want the shiny new line numbers.
Common Lisp sucks
cl-case
See also:
Famous Programers on How Common Lisp Sucks (2012)
Controversy of Common Lisp Package in Emacs Lisp
Emacs Flaw: Thoughts on Common Lisp Scheme Lisp Based Emacs (2008) 2008
emacs init: Organize Init File (major update)
Emacs: Reformat Lines for Source Code π (fixed a bug where region remain active)
Elisp: Get Text at Cursor (thing-at-point) (minor update)
Elisp: Get Buffer String (more edit, expanded a bit.)
Sigil is Back
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.
For the reasons why sigil, see:
Elisp: Mark, 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.
- Emacs: ido mode (new page)
- Emacs: icomplete mode (name completion in minibuffer) (new page)
- Emacs: Switch Buffer (complete rewrite)
- Emacs: icomplete vs ido mode π
- Emacs 22: iswitchb vs ido mode π
- emacs init: Intro
Elisp: Get User Input (correction on tutorial code )
Emacs: Name Completion (rewritten)
Emacs: icomplete vs ido mode π (major update)
Emacs: Copy Current Line π (more bug fix, on xah-copy-line-or-region)
Emacs Flaw: The Mode Line (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)
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 -
Emacs: Delete Brackets by Pair π (code update. almost a rewrite)
emacs init: Highlight Brackets (updated)
Emacs: Copy Current Line π (fixed a bug of duplicated copy when cursor is at end of buffer)
Emacs: Org Mode Customization (some useful settings)
emacs init: Intro (major update. Added lots config and explanation.)