From 07158efa53d9e5113cc433b583f41ccd06eb70d7 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 12 Mar 2014 19:54:05 +0100 Subject: [PATCH] Ignore indentation for all keywords * lisp/org-archive.el (org-get-local-archive-location): Ignore identation for ARCHIVE keywords. * lisp/org-colview.el (org-columns-store-format): Ignore indentation for COLUMNS keywords. * lisp/org.el (org-mode): Keywords can start at any column. (org-reftex-citation): Ignore indentation for BIBLIOGRAPHY keywords. (org-make-options-regexp): Ignore indentation for all keywords. --- lisp/org-archive.el | 2 +- lisp/org-colview.el | 2 +- lisp/org.el | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 6deac47ba..2473d7dac 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -121,7 +121,7 @@ information." (defun org-get-local-archive-location () "Get the archive location applicable at point." - (let ((re "^#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$") + (let ((re "^[ \t]*#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$") prop) (save-excursion (save-restriction diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 705a29cd6..07d140f8e 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -900,7 +900,7 @@ display, or in the #+COLUMNS line of the current buffer." (org-entry-put nil "COLUMNS" fmt) (goto-char (point-min)) ;; Overwrite all #+COLUMNS lines.... - (while (re-search-forward "^#\\+COLUMNS:.*" nil t) + (while (re-search-forward "^[ \t]*#\\+COLUMNS:.*" nil t) (setq cnt (1+ cnt)) (replace-match (concat "#+COLUMNS: " fmt) t t)) (unless (> cnt 0) diff --git a/lisp/org.el b/lisp/org.el index 8d1140b5d..1ad5e69f7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5464,7 +5464,7 @@ The following commands are available: (org-set-local 'align-mode-rules-list '((org-in-buffer-settings - (regexp . "^#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") + (regexp . "^[ \t]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+") (modes . '(org-mode))))) ;; Imenu @@ -22980,7 +22980,7 @@ package ox-bibtex by Taru Karttunen." (save-restriction (widen) (let ((case-fold-search t) - (re "^#\\+bibliography:[ \t]+\\([^ \t\n]+\\)")) + (re "^[ \t]*#\\+BIBLIOGRAPHY:[ \t]+\\([^ \t\n]+\\)")) (if (not (save-excursion (or (re-search-forward re nil t) (re-search-backward re nil t)))) @@ -23981,7 +23981,7 @@ Show the heading too, if it is currently invisible." (defun org-make-options-regexp (kwds &optional extra) "Make a regular expression for keyword lines." (concat - "^#\\+\\(" + "^[ \t]*#\\+\\(" (mapconcat 'regexp-quote kwds "\\|") (if extra (concat "\\|" extra)) "\\):[ \t]*\\(.*\\)"))