Xah Talk Show 2024-07-19 Ep563, Emacs Lisp Coding move-html-text-block and random chat

- Timestamp
- 38:44 are you gonna have children
- 18:38 why is emacs self-documenting
ask questions, meanwhile i work on my website.
(defun xah-move-html-text-block () "Move a HTML text block or selection in current buffer to next buffer, with all relative link fixed. Created: 2024-07-19 Version: 2025-03-25" (interactive) (let (xp1 xp2 xtext) (seq-setq (xp1 xp2) (if (region-active-p) (list (region-beginning) (region-end)) (list (save-excursion (if (re-search-backward "\n[ \t]*\n" nil 1) (match-end 0) (point))) (save-excursion (if (re-search-forward "\n[ \t]*\n" nil 1) (match-beginning 0) (point)))))) (setq xtext (save-restriction (narrow-to-region xp1 xp2) (xah-html-local-links-to-fullpath default-directory (point-min) (point-max)) (delete-and-extract-region (point-min) (point-max)))) (other-window 1) (save-restriction (narrow-to-region (point) (point)) (insert xtext) (xah-html-local-links-to-relative-path default-directory (point-min) (point-max)))))