Browse Source

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.
Nicolas Goaziou 11 years ago
parent
commit
07158efa53
3 changed files with 5 additions and 5 deletions
  1. 1 1
      lisp/org-archive.el
  2. 1 1
      lisp/org-colview.el
  3. 3 3
      lisp/org.el

+ 1 - 1
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

+ 1 - 1
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)

+ 3 - 3
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]*\\(.*\\)"))