Xah Emacs Blog Archive 2014-05
Emacs: Cycle Fonts by Command 🚀 (major update)
Keyboard Layout, Is Inverted Number Row Better? (updated with chart)
Emacs: Show Image Thumbnails (on its own page)
Emacs Init: Install Package Manually (minor update)
Emacs Init: Setup Font (updated)
Emacs: Install Package with ELPA/MELPA (minor update)
Emacs: Visual Line Mode (old article, on its own page)
see also: Emacs 23 (Released 2009-07)
Computer Languages Character Distribution (with JavaScript + svg charts)
Emacs: Xah Math Input Mode 📦 (new version)
thanks to Rusi and Alan Schmitt.
Linux: xmodmap Tutorial (updated)
Elisp: Docstring Markup (updated)
added a whole section on how to deal with region and kill-ring. Elisp: Define a Command
Elisp: Mark, Region, Active Region (updated)
there are 2 persons who bought my emacs tutorial, but reply to their email addressed got error. So, if you haven't yet received it, please let me know. (xahlee@gmail.com or Xah@XahLee.org)
Xah's Truly Ergonomic Keyboard Layouts (updated)
You can download the layout now. Thanks to [ LuminousMonkey ] https://x.com/LuminousMonkey
Sacha Chua just posted the transcript. 〔Emacs Chat: Xah Lee (ErgoEmacs) By Sacha Chua. At http://emacslife.com/emacs-chats/chat-xah-lee.html , accessed on 2014-05-12〕
Elisp: List (updated)
Emacs: Search Text in Directory (minor update)
Sacha Chua's Emacs Chat with Phil Hagelberg (aka Technomancy)
Elisp: Write grep (repost)
wee. The power of emacs lisp.
(xah-find-replace-text-regex "; keyboard\">amazon</a>" "\" data-category=\"keyboard\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; ⌨\">amazon</a>" "\" data-category=\"keyboard\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; comp\">amazon</a>" "\" data-category=\"computer\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; comp\">Amazon</a>" "\" data-category=\"computer\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; book\">amazon</a>" "\" data-category=\"book\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; movie\">amazon</a>" "\" data-category=\"movie\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; music\">amazon</a>" "\" data-category=\"music\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; 🎶\">amazon</a>" "\" data-category=\"music\">amazon</a>" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; ⌨\">" "\" data-category=\"keyboard\">" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; keyboard\">" "\" data-category=\"keyboard\">" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; 🎶\">" "\" data-category=\"music\">" "~/web/" "\\.html$" t t t) (xah-find-replace-text-regex "; comp\">" "\" data-category=\"computer\">" "~/web/" "\\.html$" t t t)
I routinely update my site's html systematically sidewide, on about 7k files. About every 3 months for the past 7 years.
I do these changes to it keep up with HTML evolution, and also improve the markup to be more semantically meaningful, and or improve SEO.
if your site is dynamically generated by some content management system, then you (usually) just modify one template. But for me, my site is static HTML, raw. So, i rely on regex find replace.
The xah-find-replace-text-regex
is a interactive command. It prompts you for find regex, replacement text, and dir path regex, whether to actually write to the file, whether case sensitive search, whether case sensitive replacement. Once i called it, i can call repeat-complex-command
to get the lisp code. Then, i can easily modify the elisp in a buffer and eval it to do other find replace without going thru the interactive prompt, and sometimes this is more convenient.
Why didn't you just use emacs's dired-do-query-replace-regexp
?
one reason is that dired-do-query-replace-regexp
prompt you for each find replace. Sure you can press a key to do them in batch, but then you don't get to see what's been replaced.
xah-find-replace-text-regex
does batch, and does a report of what's replaced, with option of whether to write to file.
You can find the code at: Emacs: Xah Find Replace (xah-find.el) 📦
Why Emacs Keys are Painful (slightly revised)
Also note, lisp pioneer Daniel Weinreb's blog [danweinreb.org] has changed hands. Now it seems like a SEO site. If you have link to it, be sure to change it to Wayback Machine such as http://web.archive.org/web/20121014112316/http://danweinreb.org/blog/
Emacs: Interactive Abbrev 🚀 (goodie from 2013)
Emacs: Insert A to Z Vertically 🚀 (updated)
minor update: Emacs: Insert Random UUID 🚀. (thanks to Hideki Saito)
on that page, is a piece of code contributed by Christopher Wellons, and Christopher is going to be interviewed by Sacha, on at https://www.youtube.com/watch?v=Hr06UDD4mCs. Mark your calendar.
Emacs: Interactive Abbrev 🚀 (repost)
Sacha Chua's Emacs Chat (minor update. Refresh page.)
Who Do You Like to See in Sacha Chua's Emacs Chat?
Sacha Chua asks who do we like to see in her emacs chat?
Here's a short list i like to see:
- [ BoÐil Stokke ] https://x.com/bodil
- [ Steve Purcell ] https://x.com/sanityinc (MELPA, etc.)
- Vivek Haldar/ https://x.com/vivekhaldar
- Tassilo Horn https://x.com/tsdh80 (emacs dev.
doc-view-mode
, etc.) - Alex Schroeder (
https://x.com/kensanata) (emacswiki) - Stefan Monnier [http://www.iro.umontreal.ca/~monnier/] (one of current emacs leader)
- Drew Adams (long time emacs dev. For example: dired+, bookmark+, Icicles, etc.)
- Eli Zaretskii (long time emacs dev. For example: woman.el, emacs port for Microsoft Windows, etc.)
- YAMAMOTO Mitsuharu (core emacs dev. UTF-8 support, etc.)
- Michael Albinus (core emacs dev. Support for D-Bus, X11 stuff, etc.)
- Stephen J Turnbull (xemacs leader …)
- David Kastrup (long time emacs dev.)
- Steve Yegge (well-known Googler)
- Lars Ingebrigtsen (long time emacs dev. Gnus, Gmane, ewws, etc.)
just a few people i know off hand. Didn't have time to compile a full list. Some i didn't have time to include link to website or how i knew them. Sorry. Also, i only included those that might have general interest. Also exclude some she already planned.
and of course, Matthew L Fidler https://github.com/mattfidler and David Capello [https://davidcapello.com/] , who can give a much better intro to ergoemacs-mode than i can.
on vi Keybinding vs Emacs Keybinding (updated)
Cursor Movement Keys: vim's {h j k l} vs Inverted T {i j k l}
I had a great time chatting with Sacha. See: Sacha Chua's Emacs Chat
Elisp: Get universal-argument (minor update)
emacs chat with Sacha Chua
Live chat with Sacha Chua on Google Hangout. TODAY at 5pm. ( Friday PDT 5pm (California time)) Join us at https://plus.google.com/events/c5e0anjpg4v7n1jtjuor4mromos
- Sacha on twitter: https://x.com/sachac
- Sacha's blog http://sachachua.com/blog/