Browse Source

Lists: Fix renumbering lists where the first item is not a numbered bullet

Carsten Dominik 16 years ago
parent
commit
1a488f9136
2 changed files with 3 additions and 1 deletions
  1. 2 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-list.el

+ 2 - 0
lisp/ChangeLog

@@ -3,6 +3,8 @@
 	* org-list.el (org-toggle-checkbox): Make double prefix set the
 	checkbox to "[-]".
 	(org-fix-bullet-type): Only replace bullet it it is changed.
+	(org-renumber-ordered-list): Handle case when first item does not
+	have a number.
 
 	* org.el (org-add-log-setup): Fix positioning when
 	`org-log-states-order-reversed' is nil.

+ 1 - 1
lisp/org-list.el

@@ -707,7 +707,7 @@ with something like \"1.\" or \"2)\"."
     (org-beginning-of-item-list)
     (setq bobp (bobp))
     (looking-at "[ \t]*[0-9]+\\([.)]\\)")
-    (setq fmt (concat "%d" (match-string 1)))
+    (setq fmt (concat "%d" (or (match-string 1) ".")))
     (beginning-of-line 0)
     ;; walk forward and replace these numbers
     (catch 'exit