From f2d92fa89a8b20af2d1d4ebeb399707178fd340b Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 27 Jul 2009 11:53:53 +0800 Subject: [PATCH] Bugfix: correctly convert list items before the first headline. --- lisp/ChangeLog | 3 +++ lisp/org.el | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e80c4237..5cedac3e6 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-07-27 Bastien Guerry + * org.el (org-toggle-heading): Bugfix: correctly convert list + items before the first headline. + * org-html.el (org-export-html-footnote-format): New option for formatting the footnote reference. (org-export-as-html): Use the new option. diff --git a/lisp/org.el b/lisp/org.el index c829c71d0..b53e1dee3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14789,15 +14789,16 @@ If there is no active region, only the current line is considered. If the first line is a heading, remove the stars from all headlines in the region. -If the first line is a plain list item, turn all plain list items into -headings. +If the first line is a plain list item, turn all plain list items +into headings. -If the first line is a normal line, turn each and every line in the region -into a heading. +If the first line is a normal line, turn each and every line in the +region into a heading. -When converting a line into a heading, the number of stars is chosen -such that the lines become children of the current entry. However, when -a prefix argument is given, its value determines the number of stars to add." +When converting a line into a heading, the number of stars is chosen +such that the lines become children of the current entry. However, +when a prefix argument is given, its value determines the number of +stars to add." (interactive "P") (let (l2 l itemp beg end) (if (org-region-active-p) @@ -14822,8 +14823,8 @@ a prefix argument is given, its value determines the number of stars to add." (make-string (prefix-numeric-value current-prefix-arg) ?*) (save-excursion - (re-search-backward org-complex-heading-regexp nil t) - (or (match-string 1) "")))) + (if (re-search-backward org-complex-heading-regexp nil t) + (match-string 1) "")))) (add-stars (cond (nstars "") ((equal stars "") "*") (org-odd-levels-only "**") -- 2.11.4.GIT