diff options
author | Bastien Guerry <bzg@altern.org> | 2013-02-26 22:02:13 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-02-26 22:02:13 +0100 |
commit | 2b13d090d124fe6a7a389def71696c3b477bf8f6 (patch) | |
tree | 4d25e78b83baec69b0fe0e2801489cea89bd2852 | |
parent | 2efbd0f138180fe14773d5485ad3c59332d6ddb3 (diff) | |
download | org-mode-2b13d090d124fe6a7a389def71696c3b477bf8f6.tar.gz |
org.el (org-imenu-get-tree): Fix bug when matching against empty headlines
* org.el (org-imenu-get-tree): Fix bug when matching against empty
headlines.
Thanks to Jambunathan for reporting this.
-rw-r--r-- | lisp/org.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el index 1e3ae57..d61295b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -22213,7 +22213,7 @@ Show the heading too, if it is currently invisible." (re (concat "^" (org-get-limited-outline-regexp))) (subs (make-vector (1+ n) nil)) (last-level 0) - m level head) + m level head0 head) (save-excursion (save-restriction (widen) @@ -22221,9 +22221,9 @@ Show the heading too, if it is currently invisible." (while (re-search-backward re nil t) (setq level (org-reduced-level (funcall outline-level))) (when (and (<= level n) - (looking-at org-complex-heading-regexp)) - (setq head (org-link-display-format - (org-match-string-no-properties 4)) + (looking-at org-complex-heading-regexp) + (setq head0 (org-match-string-no-properties 4))) + (setq head (org-link-display-format head0) m (org-imenu-new-marker)) (org-add-props head nil 'org-imenu-marker m 'org-imenu t) (if (>= level last-level) |