org-list: new way to get structure of a list and new accessors

* lisp/org-list.el (org-list-blocks): new variable
(org-list-context): new function
(org-list-full-item-re): new variable
(org-list-struct-assoc-at-point): use new varible
(org-list-struct): rewrite of function. Now, list data is collected by
looking at the list line after line. It reads the whole list each time
because reading only a subtree was not enough for some operations,
like fixing checkboxes. It also removes the need to get
`org-list-top-point' and `org-list-bottom-point' first. An added data
is the position of item ending. This aims to be able to have list
followed by text inside an item.
(org-list-struct-assoc-end): new function
(org-list-struct-parent-alist): new function
(org-list-get-parent): new function
(org-list-get-child): new function
(org-list-get-next-item): new function
(org-list-get-prev-item): new function
(org-list-get-subtree): use helper function `org-list-struct-prev-alist'.
(org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-top-point): new function
(org-list-get-bottom-point): new function
(org-list-get-counter): new function
(org-list-get-item-end): new function
(org-list-struct-fix-bul): rewrite for cleaner code. Make use of new
accessors.
(org-list-struct-fix-ind): make use of new accessors.
(org-list-struct-fix-box): new function
(org-list-struct-fix-checkboxes): removed function
(org-list-struct-outdent): use new accessors. Use the fact that there
is no longer a virtual item at beginning of structure.
(org-list-struct-indent): use helper functions
`org-list-struct-prev-alist' and `org-list-struct-parent-alist'. Also
use new accessors.
(org-list-struct-fix-struct): comment function. Call directly
`org-list-struct-apply-struct', without removing unchanged items
first.
(org-list-struct-apply-struct): comment function. Rewrite using new
accessors. Use new variable `org-list-full-item-re'.
(org-list-shift-item-indentation): removed function, now included in
`org-list-struct-apply-struct' because it is too specific.

Conflicts:

	lisp/org-list.el
org-list: new way to get structure of a list and new accessors

* lisp/org-list.el (org-list-blocks): new variable
(org-list-context): new function
(org-list-full-item-re): new variable
(org-list-struct-assoc-at-point): use new varible
(org-list-struct): rewrite of function. Now, list data is collected by
looking at the list line after line. It reads the whole list each time
because reading only a subtree was not enough for some operations,
like fixing checkboxes. It also removes the need to get
`org-list-top-point' and `org-list-bottom-point' first. An added data
is the position of item ending. This aims to be able to have list
followed by text inside an item.
(org-list-struct-assoc-end): new function
(org-list-struct-parent-alist): new function
(org-list-get-parent): new function
(org-list-get-child): new function
(org-list-get-next-item): new function
(org-list-get-prev-item): new function
(org-list-get-subtree): use helper function `org-list-struct-prev-alist'.
(org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-counter): new function
(org-list-get-item-end): new function
(org-list-struct-fix-bul): rewrite for cleaner code. Make use of new
accessors.
(org-list-struct-fix-ind): make use of new accessors.
(org-list-struct-fix-box): new function
(org-list-struct-fix-checkboxes): removed function
(org-list-struct-outdent): use new accessors. Use the fact that there
is no longer a virtual item at beginning of structure.
(org-list-struct-indent): use helper functions
`org-list-struct-prev-alist' and `org-list-struct-parent-alist'. Also
use new accessors.
(org-list-struct-fix-struct): comment function. Call directly
`org-list-struct-apply-struct', without removing unchanged items
first.
(org-list-struct-apply-struct): comment function. Rewrite using new
accessors. Use new variable `org-list-full-item-re'.
(org-list-shift-item-indentation): removed function, now included in
`org-list-struct-apply-struct' because it is too specific.

Conflicts:

	lisp/org-list.el
This commit is contained in:
Nicolas Goaziou 2010-12-23 18:54:24 +01:00
parent 1829aa79b5
commit d48a6cf50d
1 changed files with 670 additions and 321 deletions

File diff suppressed because it is too large Load Diff