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:

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".

youtube-description 2026-02-17 25637
youtube-description 2026-02-17 25637
(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 )