From f926d9019b1d28c6a459b869db8876b21e47e488 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sun, 19 Aug 2012 08:48:53 +0200 Subject: [PATCH] org.el: Allow lowercase "#+category" and "#+begin:" dynamic blocks * org.el (org-refresh-category-properties) (org-find-dblock, org-dblock-start-re, org-dblock-end-re): Allow lowercase "#+category" and "#+begin:" dynamic blocks. --- lisp/org.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 0c71a2287..e0366f5b3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8698,7 +8698,8 @@ call CMD." (defun org-refresh-category-properties () "Refresh category text properties in the buffer." - (let ((inhibit-read-only t) + (let ((case-fold-search t) + (inhibit-read-only t) (def-cat (cond ((null org-category) (if buffer-file-name @@ -11158,20 +11159,20 @@ this is used for the GOTO interface." (defun org-find-dblock (name) "Find the first dynamic block with name NAME in the buffer. If not found, stay at current position and return nil." - (let (pos) + (let ((case-fold-search t) pos) (save-excursion (goto-char (point-min)) - (setq pos (and (re-search-forward (concat "^[ \t]*#\\+BEGIN:[ \t]+" name "\\>") - nil t) + (setq pos (and (re-search-forward + (concat "^[ \t]*#\\+\\(?:BEGIN\\|begin\\):[ \t]+" name "\\>") nil t) (match-beginning 0)))) (if pos (goto-char pos)) pos)) (defconst org-dblock-start-re - "^[ \t]*#\\+BEGIN:[ \t]+\\(\\S-+\\)\\([ \t]+\\(.*\\)\\)?" + "^[ \t]*#\\+\\(?:BEGIN\\|begin\\):[ \t]+\\(\\S-+\\)\\([ \t]+\\(.*\\)\\)?" "Matches the start line of a dynamic block, with parameters.") -(defconst org-dblock-end-re "^[ \t]*#\\+END\\([: \t\r\n]\\|$\\)" +(defconst org-dblock-end-re "^[ \t]*#\\+\\(?:END\\|end\\)\\([: \t\r\n]\\|$\\)" "Matches the end of a dynamic block.") (defun org-create-dblock (plist) -- 2.11.4.GIT