* lisp/org.el (org-heading-delete-metadata): Move to...
* lisp/org-list.el (org-list--delete-metadata): ... here. Refactor
code.
(org-toggle-item): Use new function.
* testing/lisp/test-org-list.el (test-org-list/toggle-item): Add test.
At the moment, this function is only used internally in "org-list.el",
so it belongs there.
Also refrain from removing log or clock drawers, because they may not
contain all clocks or notes anyway. Besides, the information they
contain may still make sense in a plain list.
* lisp/org-list.el (org-list-to-generic): :istart, :icount, :iend
and :isep are now called with an additional argument, the type of the
list. Also add a new property :ifmt.
(org-list--to-generic-item): Use new property.
(org-list-to-subtree): Adapt to new requirements for :istart and :iend.
* testing/lisp/test-org-list.el (test-org-list/to-generic): Update
tests.
* lisp/org-list.el (org-list-empty-line-terminates-plain-lists): Remove
variable.
(org-list-end-re):
(org-list-separating-blank-lines-number):
* lisp/org.el (org-blank-before-new-entry): Adapt to change above.
* testing/lisp/test-org-element.el (test-org-element/at-point):
* testing/lisp/test-org-list.el (test-org-list/move-item-down):
(test-org-list/move-item-up):
(test-org-list/insert-item): Update tests.
This variable is not useful: plain lists can always be terminated with
two blank lines.
* lisp/org-list.el (org-update-checkbox-count): Change algorithm. Use
Element parser.
* testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
New test.
Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/97594>
* lisp/org-list.el (org-list-insert-item): On a description tag,
insert item before current one. However, past the colons, insert it
after.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add
tests.
Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96330>
* lisp/org-list.el (org-list-struct-apply-struct): Preserve disparate
indentation in contuated contents, i.e., contents after a plain list
still within an item.
* testing/lisp/test-org-list.el (test-org-list/repair): Add test.
This fixes the following case:
- item
- child
item contents
with different indentation
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94977>
* lisp/org-list.el (org-list-struct-apply-struct): Do not move item's
contents within a child above when repairing indentation.
* testing/lisp/test-org-list.el: Add tests.
* lisp/org-list.el (org-list-send-list): Do not rely on
`org-list-parse-list'.
(org-list-to-latex, org-list-to-html, org-list-to-texinfo): Use
appropriate export back-end instead of using `org-list-to-generic'.
* testing/lisp/test-org-list.el: Add tests.
* lisp/org-list.el (org-list-separating-blank-lines-number): When
computing number of blank lines separating items, also count those
in unparsed blocks, like example blocks.
* testing/lisp/test-org-list.el: Add tests.
In the following situation, with `org-blank-before-new-entry' set to
`auto' for `plain-list-item, a blank line should be inserted when
inserting the following item:
- item1
#+BEGIN_EXAMPLE
contents
#+END_EXAMPLE
* lisp/org-list.el (org-list-automatic-rules): Remove `bullet' rule,
which is now hard-coded.
(org-cycle-list-bullet): Hard code `bullet' rule.
(org-list-get-list-type): Make sure a list with numbered bullets
cannot have `descriptive' type.
* testing/lisp/test-org-list.el: Add tests.
* lisp/org-list.el (org-list-struct-indent): Follow
`org-list-demote-modify-bullet' specifications for ordered bullets.
(org-list-indent-item-generic, org-indent-item-tree,
org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* lisp/org.el (org-shiftmetaleft, org-shiftmetaright): Allow to
operate on a region.
* testing/lisp/test-org-list.el: Add tests.