Org: Use better keyword regex in case conversion

This commit is contained in:
TEC 2021-03-01 14:39:56 +08:00
parent 43c19377ad
commit 6868792ea4
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 2 additions and 2 deletions

View File

@ -5130,7 +5130,7 @@ man's bold, and supported for historical reasons. --- [[https://orgmode.org/list
To avoid sometimes having to choose between the hassle out of updating old
documents and using mixed syntax, I'll whip up a basic transcode-y function.
It likely misses some edged cases, but should mostly work.
It likely misses some edge cases, but should mostly work.
#+begin_src emacs-lisp
(defun org-syntax-convert-case-to-lower ()
@ -5140,7 +5140,7 @@ It likely misses some edged cases, but should mostly work.
(goto-char (point-min))
(let ((count 0)
(case-fold-search nil))
(while (re-search-forward "#\\+[A-Z_]+" nil t)
(while (re-search-forward "^[ ]*#\\+[A-Z_]+" nil t)
(replace-match (downcase (match-string 0)) t)
(setq count (1+ count)))
(message "Replaced %d occurances" count))))