Xah Talk Show 2026-06-27 Ep799. Milk, Tits, Caryatids. Emacs lisp command to change title case.

xah talk show ep799 1df06
xah talk show ep799 1df06
xah talk show ep799 2026-06-28 1e490
xah talk show ep799 2026-06-28 1e490

Video Summary (Generated by AI, Edited by Human.)

In this episode (Ep799), Xah Lee hosts a casual talk show while enjoying a Margarita. The session covers a mix of programming, literature, and personal anecdotes.

Key highlights include:

emacs lisp, write a command to change all h2 title to have sentence case, in current buffer

brit way

Video summary (Generated by AI, edited by human.)

The American Way

Video Summary (Generated by AI, Edited by Human.)

examples

  • There is a Movie
  • What About the Movie
  • That's of Something
the logical systematic way, cap every first letter of words

Video Summary (Generated By AI, Edited By Human.)

another logical way, lowercase all.

video summary (generated by AI, edited by human.)

(defun xah-html-sentence-case-all-h2 ()
  "Sentence case all html h2 headers in current buffer.
URL `http://xahlee.info/talk_show/xah_talk_show_ep799.html'
Created: 2026-06-27
Version: 2026-06-28"
  (interactive)
  (let (xbeg xend)
    (goto-char (point-min))
    (while (re-search-forward "<h2[^>]*>" nil t)
      (setq xbeg (match-end 0))
      (search-forward "</h2>")
      (setq xend (match-beginning 0))
      (save-restriction
        (narrow-to-region xbeg xend)
        (downcase-region (point-min) (point-max))
        (goto-char (point-min))
        (upcase-char 1)))))

emacs lisp doc bug downcase-region

we discovered a documentation bug. in the inline documentation of the command downcase-region it has a optional third argument named REGION-NONCONTIGUOUS-P, but is not documentated.

and, it is not documentated in the gnu emacs lisp manual neither.

downcase-region gnu emacs v30 lisp manual ll
downcase-region gnu emacs v30 lisp manual ll

highlights

grok ai Anders Hejlsberg 2026-06-28 1ffed ll
grok ai Anders Hejlsberg 2026-06-28 1ffed ll