Bugfix: correctly convert list items before the first headline.

This commit is contained in:
Bastien Guerry 2009-07-27 11:53:53 +08:00
parent ed0a91e76f
commit f2d92fa89a
2 changed files with 13 additions and 9 deletions

View File

@ -1,5 +1,8 @@
2009-07-27 Bastien Guerry <bzg@altern.org>
* 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.

View File

@ -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 "**")