Nick Dokos wrote: >Nathaniel Flath <[email protected]> wrote: >> Hello all, >> >> One thing that had been bugging me was the inability to have an >> ordered list of the form: >> >> a. Item 1 >> b. Item 2 >> c. Item 3 >> >> The following patch enables this, with lists going from a-z and A-Z. >> Let me know if there are any issues with it. >>
>I think patches with MIME type application/octet-stream will not make it >into the patchwork server. Please resend the patch with MIME type set to >one of the following: Right, application/octet-stream isn't catched (for good reasons). So here's the patch properly attachet as text/plain. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... [email protected] Email..... [email protected]
diff --git a/lisp/org-list.el b/lisp/org-list.el
old mode 100644
new mode 100755
index cdfd2c5..61e1e88
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -227,11 +227,11 @@ If GENERAL is non-nil, return the general regexp
independent of the value
of `org-plain-list-ordered-item-terminator'."
(cond
((or general (eq org-plain-list-ordered-item-terminator t))
- "\\([ \t]*\\([-+]\\|\\([0-9]+[.)]\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
+ "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+[.)]\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
((= org-plain-list-ordered-item-terminator ?.)
- "\\([ \t]*\\([-+]\\|\\([0-9]+\\.\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
+ "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+\\.\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
((= org-plain-list-ordered-item-terminator ?\))
- "\\([ \t]*\\([-+]\\|\\([0-9]+)\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
+ "\\([ \t]*\\([-+]\\|\\([0-9A-Za-z]+)\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)")
(t (error "Invalid value of `org-plain-list-ordered-item-terminator'"))))
(defun org-at-item-p ()
@@ -298,7 +298,7 @@ Return t when things worked, nil when we are not in an
item."
(cond
((and (org-at-item-p) (<= (point) eow))
;; before the bullet
- (beginning-of-line 1)
+ (beginning-of-line )
(open-line (if blank 2 1)))
((<= (point) eow)
(beginning-of-line 1))
@@ -864,14 +864,13 @@ with something like \"1.\" or \"2)\"."
;; find where this list begins
(org-beginning-of-item-list)
(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
+ (looking-at "[ \t]*\\([0-9A-Za-z]+\\)\\([.)]\\)")
+ (let* ((n (if (string-equal (match-string 1) "1") 0 (1- ?a)))
+ (fmt (if (= n 0)
+ (concat "%d" (or (match-string 2) "."))
+ (concat "%c" (or (match-string 2) ".")))))
+ (beginning-of-line 0)
+ ;; walk forward and replace these numbers
(catch 'exit
(while t
(catch 'next
@@ -890,7 +889,8 @@ with something like \"1.\" or \"2)\"."
(org-shift-item-indentation delta)
(if (= (org-current-line) line) (setq col (+ col delta))))))
(org-goto-line line)
- (org-move-to-column col)))
+ (org-move-to-column col))))
+
(defvar org-suppress-item-indentation) ; dynamically scoped parameter
(defun org-fix-bullet-type (&optional force-bullet)
pgpKI13lvvUwT.pgp
Description: PGP signature
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. [email protected] http://lists.gnu.org/mailman/listinfo/emacs-orgmode
