From 7572190709a6dfad9a641ad35b7e98bbdbb5bc03 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Thu, 3 Nov 2022 13:58:43 -0400 Subject: Add titles, test subtitles --- emacsconf.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'emacsconf.el') diff --git a/emacsconf.el b/emacsconf.el index 4a115a2..6b6b4b1 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -1074,10 +1074,15 @@ Filter by TRACK if given. Use INFO as the list of talks." (defun emacsconf-reflow () "Help reflow text files." (interactive) - (let (input) + (let (input last-input) (while (not (string= "" (setq input (read-string "Word: ")))) + (when (string= input "!") + (delete-backward-char 1) + (insert " ") + (end-of-line) + (re-search-forward (regexp-quote last-input) nil t) + (setq input last-input)) (if (string= input "'") - (progn (end-of-line) (unless (looking-back " ") @@ -1094,9 +1099,10 @@ Filter by TRACK if given. Use INFO as the list of talks." (t (re-search-forward (concat "\\<" (regexp-quote input)) nil t) (goto-char (match-beginning 0)))) - (insert "\n")) - (recenter) - (undo-boundary)))) + (insert "\n") + (setq last-input input) + (recenter) + (undo-boundary))))) (defun emacsconf-add-org-after-todo-state-change-hook () "Add FUNC to `org-after-todo-stage-change-hook'." -- cgit v1.2.3