diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-26 16:35:23 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-04-26 16:35:23 +0200 |
commit | 3fb4f28860f3210c8228eb320c240783fefc53fb (patch) | |
tree | 35b4dc7c5537028d98b6d222685f3fe9b3a8e392 | |
parent | b82652d90c08d31e9e765cd8fd5323ef665d2dc3 (diff) | |
download | org-mode-3fb4f28860f3210c8228eb320c240783fefc53fb.tar.gz |
Implement list starter cookies also in Org-mode, and for ASCII export
-rwxr-xr-x | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/org-ascii.el | 7 | ||||
-rw-r--r-- | lisp/org-list.el | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1535958..2b57e66 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2010-04-26 Carsten Dominik <carsten.dominik@gmail.com> + * org-ascii.el (org-export-ascii-preprocess): Remove list + startcounter cookies. + + * org-list.el (org-renumber-ordered-list): Respect counter + start values. + * org-latex.el (org-export-latex-lists): Accept ordered list item offset cookie. diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index 02578cc..7ed1f0e 100644 --- a/lisp/org-ascii.el +++ b/lisp/org-ascii.el @@ -565,7 +565,12 @@ publishing directory." (goto-char (point-min)) (while (re-search-forward "<<<?\\([^<>]*\\)>>>?\\([ \t]*\\)" nil t) (org-if-unprotected-at (match-beginning 1) - (replace-match "\\1\\2")))) + (replace-match "\\1\\2"))) + ;; Remove list start counters + (goto-char (point-min)) + (while (re-search-forward "\\[@start:[0-9]+\\] ?" nil t) + (org-if-unprotected + (replace-match "")))) (defun org-html-expand-for-ascii (line) "Handle quoted HTML for ASCII export." diff --git a/lisp/org-list.el b/lisp/org-list.el index c0b6125..34deff5 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -841,6 +841,10 @@ with something like \"1.\" or \"2)\"." (setq bobp (bobp)) (looking-at "[ \t]*[0-9]+\\([.)]\\)") (setq fmt (concat "%d" (or (match-string 1) "."))) + (save-excursion + (goto-char (match-end 0)) + (if (looking-at "[ \t]*\\[@start:\\([0-9]+\\)") + (setq n (1- (string-to-number (match-string 1)))))) (beginning-of-line 0) ;; walk forward and replace these numbers (catch 'exit |