Xah Talk Show 2026-02-17 Ep762. emacs lisp coding, command to fix youtube description, crimes of recursive acronym
Video Summary (Generated by AI, Edited by Human.)
The video, "Xah Ep762. emacs lisp coding," features Xah Lee (0:08) discussing and demonstrating Emacs Lisp coding, primarily for programmers and computer scientists. He begins by introducing his hardware setup (0:32), including the Ultimate Hacking Keyboard and Nulea trackball, and mentions his reviews for them.
Key topics and demonstrations in the video include:
- Xah Fly Keys and Dvorak Keyboard Layout (2:41): Xah Lee explains his use of Xah Fly Keys, an efficient keybinding system for Emacs, and the Dvorak keyboard layout, an ergonomic alternative to QWERTY. He highlights how these tools improve efficiency.
- YouTube Description Fix Command (4:47): Xah Lee details a problem he faces when copying YouTube video information (title, uploader, date) due to YouTube frequently changing its formatting (6:30). He demonstrates his custom Emacs Lisp command, xah YouTube fix YouTube description (9:26), which formats the copied text into a clean, consistent output for his blog. He explains the challenges of maintaining this command due to YouTube's constant changes (10:05).
- Removing Dependencies in Emacs Lisp Code (14:41): A significant portion of the video is dedicated to refactoring his YouTube description fixing command to remove an external dependency (replace-pairs.el). He discusses the pros and cons of having dependencies and aims to make his code self-contained for easier sharing and use (17:49).
- Critique of Unix and Hacker Culture (35:23): Responding to a viewer's question, Xah Lee passionately rants about his strong dislike for Unix, Linux, C, Vim, and the broader hacker culture, labeling them as a "disease" or "code phenomenon" (39:44). He references numerous past videos where he has discussed these topics in detail, emphasizing their outdated practices and negative societal impact (41:21). He specifically criticizes the GNU project's recursive acronym "GNU's Not Unix" (48:14) and general marketing practices in tech (1:04:41).
- Hash Table Tips in Emacs Lisp (1:26:31): He provides a technical tip regarding hash tables in Emacs Lisp, advising against using nil as a value (1:29:57) because there's no built-in way to distinguish if a key doesn't exist or if its value is actually nil (1:30:00). He also briefly discusses a personal function for testing hash table equality (1:36:23).
- The video concludes with Xah Lee wrapping up the Emacs Lisp coding session and engaging with viewer comments.
- change
xah-html-fix-youtube-descriptionto not depend on xah-find package. - Elisp: Find Replace Text in Buffer
- Xah Talk Show. Best Of. Index
- Elisp: Symbol
- Elisp: Keyword Symbol (Colon Prefix)
- Emergency vim Tutorial
- Elisp: Exit Loop or Function (throw, catch)
- Elisp: Sequence. some, every (conditional exit)
- Elisp: Hash Table
- Elisp: Test Hash Tables Equality 📜
- recursive acronym, GNU, Gnu is Not Unix.
A recursive acronym is an acronym that refers to itself, and appears most frequently in computer programming. The term was first used in print in 1979 in Douglas Hofstadter's book Gödel, Escher, Bach: An Eternal Golden Braid, in which Hofstadter invents the acronym GOD, meaning "GOD Over Djinn", to help explain infinite series, and describes it as a recursive acronym.[1] Other references followed,[2] however the concept was used as early as 1968 in John Brunner's science fiction novel Stand on Zanzibar. In the story, the acronym EPT (Education for a Particular Task) later morphed into "Eptification for Particular Task".
- PHP lie on Wikipedia for 10 years. no mention of “Personal Home Page”, but “the recursive backronym PHP: Hypertext Preprocessor”
(defun xah-html-fix-youtube-description () "Delete unwanted youtube description under cursor. If region is active, use that, else act on text between >…< For example, > Breathing Elon's Musk Skyebrows 43.5K subscribers 1,173,398 views Oct 28, 2025< becomes >Breathing Elon's Musk Skyebrows Oct 28, 2025< The tag figcaption can be any. Created: 2020-09-05 Version: 2026-02-16" (interactive) (let ((xpt (point)) xbeg xend (case-fold-search t)) (if (region-active-p) (setq xbeg (region-beginning) xend (region-end)) (save-excursion (setq xbeg (if (search-backward ">" nil 1) (match-end 0) (point))) (setq xend (if (search-forward "<" nil 1) (match-beginning 0) (point))))) (save-restriction (narrow-to-region xbeg xend) (xah-replace-regexp-pairs-region (point-min) (point-max) [ [" " " "] ["\t" " "] ["&" " and "] ["^Sign in$" ""] ["^Subscribe$" ""] ["^Share$" ""] ["^Subscribed$" ""] ["^DISLIKE$" ""] ["^SAVE$" ""] ["[,0-9]+ views" ""] ["^[.0-9]+[KM]? subscribers$" ""] ["^[.0-9]+[KM]? views" ""] ["^[.0-9]+[KM]" ""] ["^ +" ""] ["\\`\n+" ""] [" +" " "] [" +$" ""] ["\n\n+" "\n"] ] t) (goto-char (point-min)) (insert "\n") (goto-char (point-max)) (insert "\n"))) (message "done %s" this-command))
;; -*- coding: utf-8; lexical-binding: t; -*- (defun xah-html-fix-youtube-description () "Delete unwanted youtube description under cursor. If region is active, use that, else act on text between >…< For example, > Breathing Elon's Musk Skyebrows 43.5K subscribers 1,173,398 views Oct 28, 2025< becomes >Breathing Elon's Musk Skyebrows Oct 28, 2025< Created: 2020-09-05 Version: 2026-02-17" (interactive) (let ((xpt (point)) xbeg xend (case-fold-search t)) (if (region-active-p) (setq xbeg (region-beginning) xend (region-end)) (save-excursion (setq xbeg (if (search-backward ">" nil 1) (match-end 0) (point))) (goto-char xpt) (setq xend (if (search-forward "<" nil 1) (match-beginning 0) (point))))) (save-restriction (narrow-to-region xbeg xend) (goto-char (point-min)) (while (re-search-forward " " nil t) (replace-match " ")) (goto-char (point-min)) (while (re-search-forward "\t" nil t) (replace-match " ")) (goto-char (point-min)) (while (re-search-forward "&" nil t) (replace-match " and ")) (goto-char (point-min)) (while (re-search-forward "^Sign in$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^Subscribe$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^Share$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^Subscribed$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^DISLIKE$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^SAVE$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward ",0-9+ views" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^.0-9+KM? subscribers$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^.0-9+KM? views" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^.0-9+KM" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "^ +" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "\\`\n+" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward " +" nil t) (replace-match " ")) (goto-char (point-min)) (while (re-search-forward " +$" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "\n\n+" nil t) (replace-match "\n")) ;; more find replace here (goto-char (point-min)) (insert "\n") (goto-char (point-max)) (insert "\n"))) (message "done %s" this-command))
;; 2026-02-17 one trick to check if a key exist in hashtable. by @alurma (defun xah-hashtable-equal (ztable-a ztable-b) "" (interactive) (let ((xuniq (lambda ()))) (catch 1111 (when (not (eq (hash-table-count ztable-a) (hash-table-count ztable-b))) (throw 1111 nil)) (maphash (lambda (kk vv) (when (eq xuniq (gethash kk ztable-b xuniq)) (throw 1111 nil)) (when (not (equal vv (gethash kk ztable-b))) (throw 1111 nil))) ztable-a) t))) (setq x-a #s(hash-table size 30 test equal data ( "aa" (lambda ()) "bb" 9 "cc" 5 ))) (setq x-b #s(hash-table size 30 test equal data ( "bb" 9 "aa" (lambda () ) "cc" 5 ))) (xah-hashtable-equal-2 x-a x-b )