Xah Emacs Blog Archive 2020-01
damn i need to create a comprehensive emacs abbrev for unicode emojis. That's gonna be hours of work. Need $$$
subscribe, goodies Xah Keyboard Blog
updated.
design of keybinding. Is 【Space k j】 easier to hit or 【space u】? (on qwerty)
twitter poll https://x.com/xah_lee/status/1253865660699959296
and join xahlee discord. fantastic people, variegated opinions.
Emacs: Xah Fly Keys 📦
now has colemak layout diagram.
spent 6 hours working on my site.
- Elisp: Exit Loop or Function (throw, catch)
- Elisp: Sequence Functions
- Elisp: Sequence Type
- Elisp: List vs Vector
the following, the svg has changed. Changed from inkscape file to pure svg. typically, reducing file size to 1/3, and remove the inkscape junk tags.
- Xah Emacs Blog Archive 2013-02
- Xah Emacs Blog Archive 2013-04
- Elisp: Lisp Basics
- Elisp: List vs Vector
- Practical Emacs Tutorial
- Emacs: Key Macro
- How to Avoid Emacs Pinky
- GNU Emacs Logo
- LISP Logo
- Emacs: Xah Fly Keys 📦
- QWERTY Dvorak Layout Conversion Table
- Xah Fly Keys Layout for Kinesis/Ergodox Keyboard
Elisp: How to Write a Toggle Command
added to elisp example panel.
Elisp: Symbol Property List
updated
Elisp: Property List major update.
Xah Fly Keys, Major Rewrite of Key Engine
Major key engine rewrite, by Dan Langlois and Will Dey (wi11dey).
Much thanks to them, the mode is now more efficient and powerful. Now it works with magit. The minor mode can be turned on and off. More efficient when you switch between command/insert modes.
The code is updated on github. And probably on MELPA already or later today. For user, it should not have any visible changes.
The older version is still available, named xah-fly-keys_old_2020-04-18.el on github.
I'm still going thru the code. Still need to update my page about customization and how it works. I'll be working on them in the next few days.
Following i start to write notes about changes. Mostly just for myself, as i update my docs.
new customizable variables:
- xah-fly-use-isearch-arrows
- xah-fly-use-esc-c-g
internal change:
- now uses byte-compile-dynamic
xah-fly--define-keys
is now a macro. This means, now you can bind your fav M-x replacement, such assmex
,helm-M-x
,counsel-M-x
,execute-extended-command
.- fix isearch exit becomes insert mode but cursor shape does not change. this fixed it
(add-hook 'isearch-mode-end-hook 'xah-fly-command-mode-activate)
, but need to see why is it necessary. - xah-fly-key--current-layout is declared obsolete and becomes xah-fly-key-current-layout. xah-fly-key--current-layout is only used once. Probably want to remove it.
- Fixed recursive loading error when setting a layout. this is done by remove
(load "xah-fly-keys")
. need to check consequences and if it's proper fix. - The layout options are now symbol instead of string. consider change back to string only.
- use of
widget-prompt-value
. consider not using it.
Saw your notes in your blog and think I figured out why the recursive-load was happening: because of the way the Customize interface works, it tries to use the setter (same as the custom-set property) to set the default value. However, the setter is xah-fly-keys-set-layout, which reloads the file to update the keybindings to the new layout. Loading the file again calls the setter again which reloads the file, etc which causes the recursive load.
I've fixed this by not making the Customize interface dependent on xah-fly-keys-set-layout and only have it reload the file if it was already loaded and the new value is different than the old one. Otherwise, the bindings will not be updated to use the new layout when people set the layout through Customize. (Also removed the extra quote I added for the Customize choices)
xah-fly-keys-set-layout just calls the same function that Customize would have, for people who don't like the Customize interface or just want to do it lisp-only. The widget-prompt-value just asks the human-friendly names for the keyboard layouts during completion, but it will never be called for users who don't call xah-fly-keys-set-layout interactively.
Note: doing (setq xah-fly-key-current-layout 'qwerty) before it is loaded is the same as calling xah-fly-keys-set-layout after it is loaded, and will speed up your init slightly since the file will only be loaded once.
As for the isearch: I think your solution with the isearch hooks is a good one, since isearch only tries to be careful if a transient map is started during isearch, but it replaces any maps that were there before it. This is bad behavior on the part of isearch (and I might try to make a change to upstream Emacs to convert it to set-transient-keymap too 😄), but for now it is ok to use the hooks since isearch is an exception to how modes should interact.
random articles of the day
updated.
New command,
xah-toggle-margin-right
at
Emacs: Novel Reading Mode 🚀
random tips of the day.
Xah Fly Keys Layout for Kinesis/Ergodox Keyboard
redone the SVG keyboard layout diagram
Emacs Init: Tab, Indent
minor update.
Emacs: Xah Fly Keys 📦
redone the SVG key layout diagram
Emacs: Insert Brackets by Pair 🚀
renamed some functions
by remove non-ascii
, e.g.
xah-insert-double-curly-quote“”
is now
xah-insert-double-curly-quote
Emacs: Upcase Sentences 🚀
code update. Fix a bug that cap like this: xyz.com becomes xyz.Com
Elisp: Wikipedia URL Linkify
modified code. Now click on link opens a new window.
new version of xah emacs tutorial
generating a new version of my emacs tutorial. Thanks for those buying.
and, this time, gonna send the update to previous buyers.
if not already, Buy Xah Emacs Tutorial
new layout for kinesis for Xah Fly Keys.
Xah Fly Keys Layout for Kinesis/Ergodox Keyboard
updated.
- Set Font in Init File
- Best Unicode Fonts for Programer
- GNU Emacs Removes Color Emoji Support on the Mac (2016)
and Proportional Font is actually more readable, even for code (except python) and window width can fit more words. see Emacs: Toggle Monospace / Proportional Font
ergoemacs keybinding on macOS
from Marlon Richert @MarlonRichert
To improve my keyboard ergonomics, I created a system-wide @ErgoEmacs mode for macOS: https://ke-complex-modifications.pqrs.org/?q=ergoemacs#ergoemacs_mode It uses spacebar as the trigger key (instead of Alt or ⌘), so it doesn't override existing shortcuts.
(Requires @tekezo 's Karabiner-Elements.) @xah_lee @davidcapello
Emacs Keys: Define Key
lots update.
xah-select-text-in-quote
now supports backtick used in markdown.
thanks to divansantana.
fixed code xah-open-in-terminal and xah-run-current-file
Emacs: Open File in External App 🚀
updated code for
xah-open-in-terminal
for macOS Catalina.
Emacs: Run Current File 🚀
fixed
xah-run-current-file
to compile and run java source code.
also updated
Emacs: Xah Fly Keys 📦
Emacs Init: Ido Mode new page by itself.
Emacs: Upcase Sentences 🚀 updated code. Now works also for question mark and exclamation.
Testimonial on Xah Emacs Tutorial
thanks yzcj
lots update on emacs site. Edited, improved tens of articles, and navigation panel.
major site User interface update
Check out
Practical Emacs Tutorial
emacs meetup San Francisco. next Saturday
Saturday, February 29, 2020. 11:00 AM to 1:00 PM https://www.meetup.com/Emacs-SF/events/268277146/
- Emacs Lisp Mode Syntax Coloring Problem
- Emacs: Xah Elisp Mode 📦
- Syntax Coloring Compared: Emacs, Vim, Atom, Sublime, Visual Studio, WebStorm
random old article
- Emacs: Command Frequency Statistics
- Emacs: Master Tips
- Emacs 23 (Released 2009-07)
- Emacs Commandments: the SEVEN Commands You Must Know
- Emacs: Single Key to Delete Whole Line
- Emacs: 1 Key for M-x
- Emacs: Key Macro Example: Add Title of URL
- Emacs Keys: Overview
- The Roadmap to Completely Replace Emacs Key System, Part 2
- Emacs: Basic Key Shortcuts
- Emacs Keys: Menu Key
- Emacs: Edit Tables
- Elisp: Interactive Form
- Emacs: List All Functions
code rewrite
xah-fly-keys xah-delete-current-file
now do nothing when in dired. (used to delete current dir. very dangerous.)
Emacs: Open File in External App 🚀
changes:
- xah-show-in-desktop → fixed problem on opening path that has space.
- xah-open-in-vscode → now can open dir.
emacs Xah Fly Keys update https://github.com/xahlee/xah-fly-keys/commit/a7b2a5e1407b767cc910a23e908574e50cb6023f
Table of Contents and navbox reorg
minor changes to nav box or content.
- Emacs Init: Avoid Lambda in Hook
- Emacs: Copy Current Line If No Selection 🚀
- Emacs Init: Mouse Wheel Config
- Emacs Init: Tab, Indent
- Emacs Init: Highlight Brackets
- Emacs Init: Auto Insert Closing Bracket (electric-pair-mode)
- Emacs: Insert Brackets by Pair 🚀
- Emacs: Change Brackets 🚀
am working on reorganization of the site's table of contents. So it's more coherent and consistent. Look around, most has been changed.
Buy my tutorial, and you'll get the latest when it is done. Buy Xah Emacs Tutorial
Elisp: Create Major Mode
the nav box for
how to write a major mode and syntax table has been combined into 1 coherent box.
Emacs: View Info Page
minor update
Emacs Keybinding, Keyboard, Articles Index
major rework. Now, there is table of contents nav box at bottom of each of the keyboard shortcut related page. so you can read them one by one.
Emacs: Replace HTML Entities 🚀
many name changes.
- xah-html-replace-html-named-entities → xah-html-named-entity-to-char
- xah-html-replace-ampersand-to-unicode → xah-html-escape-char-to-unicode
- xah-html-replace-html-chars-to-unicode → xah-html-escape-char-to-unicode
- xah-html-replace-html-chars-to-entities → xah-html-escape-char-to-entity
- xah-html-replace-ampersand → xah-html-escape-char-to-entity
also happened in Emacs: Xah HTML Mode 📦
Name change. xah-html-make-html-table → xah-html-lines-to-table done
used to have 2 table of contents pages, one on elisp command examples, one on elisp script examples. Now, merged into one. see
xah-html-extract-url
now do full path too when buffer is not file
the idiocy of emacs magit, supporting punch cards of 1950s https://youtu.be/cGQi_7CYDQk?t=3905
old. the birth of xah-fly-keys
Elisp: HTML Amazon URL Linkify
updated
xah-fly-keys, colemak layout, on ergodox. By vandr0iy, 2020-01-05. See Xah Fly Keys Layout for Kinesis/Ergodox Keyboard
Xah Lee, Typing Experience and Repetitive Strain Injury
updated.
Xah Fly Keys Layout for Ultimate Hacking Keyboard (UHK)
more update