diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2010-08-20 13:05:38 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2010-09-01 19:05:54 +0200 |
commit | 6b2468477e52d9993160b8e7c0f709b75aa33c53 (patch) | |
tree | fa813776fd8eca766fc26396d4bb8aa137daa6c9 | |
parent | 56542f799c0b86e094277909d7b66d01bb919ac7 (diff) | |
download | org-mode-6b2468477e52d9993160b8e7c0f709b75aa33c53.tar.gz |
[@num] is valid to enforce a numbering (same as [@start:num])
-rw-r--r-- | lisp/org-ascii.el | 3 | ||||
-rw-r--r-- | lisp/org-docbook.el | 2 | ||||
-rw-r--r-- | lisp/org-html.el | 2 | ||||
-rw-r--r-- | lisp/org-latex.el | 2 | ||||
-rw-r--r-- | lisp/org-list.el | 10 | ||||
-rw-r--r-- | lisp/org.el | 2 |
6 files changed, 11 insertions, 10 deletions
diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index f3b403a..c05d4fb 100644 --- a/lisp/org-ascii.el +++ b/lisp/org-ascii.el @@ -571,7 +571,8 @@ publishing directory." (replace-match "\\1\\2"))) ;; Remove list start counters (goto-char (point-min)) - (while (org-search-forward-unenclosed "\\[@start:[0-9]+\\][ \t]*" nil t) + (while (org-search-forward-unenclosed + "\\[@\\(?:start:\\)?[0-9]+\\][ \t]*" nil t) (replace-match "")) (remove-text-properties (point-min) (point-max) diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index bca412e..741465e 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -1024,7 +1024,7 @@ publishing directory." line (substring line (match-beginning 5)) item-tag nil item-number nil) - (if (string-match "\\`\\[@start:\\([0-9]+\\)\\][ \t]?" line) + (if (string-match "\\[@\\(?:start:\\)?\\([0-9]+\\)\\][ \t]?" line) (setq item-number (match-string 1 line) line (replace-match "" t t line))) (if (and starter (string-match "\\(.*?\\) ::[ \t]*" line)) diff --git a/lisp/org-html.el b/lisp/org-html.el index ac0a488..e9fcc4f 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1548,7 +1548,7 @@ lang=\"%s\" xml:lang=\"%s\"> line (substring line (match-beginning 5)) item-number nil item-tag nil) - (if (string-match "\\`\\[@start:\\([0-9]+\\)\\][ \t]?" line) + (if (string-match "\\[@\\(?:start:\\)?\\([0-9]+\\)\\][ \t]?" line) (setq item-number (match-string 1 line) line (replace-match "" t t line))) (if (and starter (string-match "\\(.*?\\) ::[ \t]*" line)) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index bdabcdc..852a83a 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -2242,7 +2242,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." (beginning-of-line) (setq res (org-list-to-latex (org-list-parse-list t) org-export-latex-list-parameters)) - (while (string-match "^\\(\\\\item[ \t]+\\)\\[@start:\\([0-9]+\\)\\]" + (while (string-match "^\\(\\\\item[ \t]+\\)\\[@\\(?:start:\\)?\\([0-9]+\\)\\]" res) (setq res (replace-match (concat (format "\\setcounter{enumi}{%d}" diff --git a/lisp/org-list.el b/lisp/org-list.el index 5bfd793..4130350 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -486,7 +486,7 @@ List ending is determined by the indentation of text. See (save-excursion (goto-char (match-end 0)) ;; Ignore counter if any - (when (looking-at "\\(?:\\[@start:[0-9]+\\][ \t]*\\)?") + (when (looking-at "\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?") (goto-char (match-end 0))) (looking-at regexp)))) @@ -686,7 +686,7 @@ A checkbox is blocked if all of the following conditions are fulfilled: (error (throw 'exit nil))) (unless (org-entry-get nil "ORDERED") (throw 'exit nil)) (when (org-search-forward-unenclosed - "^[ \t]*[-+*0-9.)]+[ \t]+\\(\\[@start:[0-9]+\\][ \t]*\\)?\\[[- ]\\]" end t) + "^[ \t]*[-+*0-9.)]+[ \t]+\\(\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[[- ]\\]" end t) (org-current-line))))))) ;;; Navigate @@ -912,7 +912,7 @@ bullet string and bullet counter, if any." (match-string 1)) (progn (goto-char (match-end 0)) - (and (looking-at "\\[@start:\\([0-9]+\\)\\]") + (and (looking-at "\\[@\\(?:start:\\)?\\([0-9]+\\)\\]") (match-string 1)))))) (defun org-list-struct (begin end &optional outdent) @@ -1506,7 +1506,7 @@ in subtree." (org-at-item-p)) (goto-char (match-end 0)) ;; Ignore counter, if any - (when (looking-at "\\(?:\\[@start:[0-9]+\\][ \t]*\\)?") + (when (looking-at "\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?") (goto-char (match-end 0))) (let ((desc-p (and (org-at-item-description-p) (cdr (assq 'checkbox org-list-automatic-rules))))) @@ -1820,7 +1820,7 @@ sublevels as a list of strings." (org-end-of-item-or-at-child)))) (nextindent (if (= (point) end) 0 (org-get-indentation))) (item (if (string-match - "^\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\[\\([xX ]\\)\\]" + "^\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\([xX ]\\)\\]" item) (replace-match (if (equal (match-string 1 item) " ") "CBOFF" diff --git a/lisp/org.el b/lisp/org.el index 5c745b6..ead7234 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5457,7 +5457,7 @@ needs to be inserted at a specific position in the font-lock sequence.") '(org-do-emphasis-faces (0 nil append)) '(org-do-emphasis-faces))) ;; Checkboxes - '("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@start:[0-9]+\\][ \t]*\\)?\\(\\[[- X]\\]\\)" + '("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- X]\\]\\)" 1 'org-checkbox prepend) (if (cdr (assq 'checkbox org-list-automatic-rules)) '("\\[\\([0-9]*%\\)\\]\\|\\[\\([0-9]*\\)/\\([0-9]*\\)\\]" |