* lisp/org-list.el (org-list-to-latex): the enumerate environment in
latex increments the counter before using it. Therefore, org-mode
should set the enumeration counter to the desired value minus one.
Patch from Darlan Cavalcante Moreira
TINYCHANGE
* lisp/org.el (org-auto-align-tags): change docstring.
(org-update-parent-todo-statistics): keep tags aligned even when
statistics cookies are shifting them.
* lisp/org-list.el (org-update-checkbox-count): keep tags aligned even
when statistics cookies are shifting them.
* lisp/org-list.el (org-list-to-subtree): if the list is before first
heading and `org-odd-levels-only' is non-nil, the first item gets
two stars instead of one.
* lisp/org.el (org-reduced-level): a level of 0 was reduced to 1 with
`org-odd-levels-only' non-nil.
* lisp/org-exp.el (org-export-mark-list-properties): even if context
is invalid, mark list item with `list-context' property.
* lisp/org-list.el (org-list-forbidden-blocks): add exporters specific
blocks to the list of forbidden blocks.
Thanks to Jai Bharat Patel for reporting this.
* lisp/org-list.el (org-list-separating-blank-lines-number): fix
confusion between point and item beginning. Now, if no information
is avalaible, truly follow user preference when it inserts blank
lines manually.
(org-list-insert-item): send correct argument to the preceding
function.
* lisp/org-list.el (org-list-struct): when walking down the list, the
function would not pay attention to drawers or blocks indentation.
Thus, such constructs couldn't consistently end an item or a list.
This patch ensures line indentation is stored (if applicable) before
skipping them. Also fixed doc-string and comments.
* lisp/org-list.el (org-list-in-valid-context-p): renamed from
org-list-in-valid-block-p.
(org-at-item-p,org-list-search-generic): use renamed function.
* lisp/org.el (org-fill-item-nobreak-p): new function.
(org-set-autofill-regexps): modify `fill-nobreak-predicate' to
prevent auto-fill from breaking line just before an item regexp.
* lisp/org-list.el (org-toggle-checkbox): build value of
org-keyword-time-regexp instead of using it directly, as it's
buffer-local, and function might be called outside Org.
* lisp/org-list.el (org-list-struct,org-in-item-p): don't assume end
of blocks or drawers necessarily start somewhere. It it isn't the
case, treat them as normal text.
* lisp/org-list.el (org-list-checkbox): when called from an headline,
function would normally skip drawers, but not if a SCHEDULED or
DEADLINE keyword is standing before the drawer. Also avoid problems
if function is called in buffers not is Org mode.
* lisp/org-list.el (org-list-to-generic): set a default term for
ill-formed description lists. Do not insert newline characters
unless told to.
(org-list-to-texinfo,org-list-to-html): apply changes to
`org-list-parse-liste'.
* lisp/org-list.el (org-update-checkbox-count): Ensure cookies on an
heading are correctly updated when checkboxes are hidden. It allows,
for example, to use C-c C-x C-b on a collapsed tree and still get
the update.
* lisp/org-list.el (org-list-insert-item): when computing size of item
being inserted, function has to take into account that indentation
may not only be made of spaces.
* lisp/org-list (org-cycle-item-indentation): do not break an
indentation cycle because visibility cycling is requested. This
happens when an item becomes a parent, due to indentation change.
Not considered empty anymore, the function cannot change its
indentation again.
* lisp/org-html.el (org-html-export-list-line): insert a newline
character before ending an item, as anchor could be on a line
going to be deleted, like a drawer ending string.
* lisp/org-list.el (org-list-to-html): same.
* lisp/org.el (org-set-autofill-regexps): use `org-item-re' in
`paragraph-start' to recognize alphabetical lists.
(org-fill-paragraph): enforce a pre-computed fill-prefix before
calling fill-paragraph when point in in an item. Also prevent
paragraphs getting merged into an adjacent list upon filling.
(org-adaptive-fill-function): make sure to determine real fill-prefix
for auto-fill.
(org-auto-fill-function): use a pre-computed fill-prefix before
calling do-auto-fill.
* lisp/org-list.el (org-list-item-body-column): new function
* lisp/org-inlinetask.el (org-inlinetask-at-task-p,
org-inlinetask-toggle-visibility): new functions.
* lisp/org-list.el (org-list-set-item-visibility): new function.
* lisp/org.el (org-cycle, org-cycle-internal-local): separate lists
and inline tasks from headlines.
(org-outline-level): do not consider lists as headlines.
Cycling visibility is using different tools.
* lisp/org-list.el (org-list-struct): mark items less indented than
top item of the list, so that they will be modified.
(org-list-struct-apply-struct): compare struct's indentation with
line's indentation instead of old-struct's. This is needed because
`org-list-struct' automatically fixes indentation so changes might not
be seen otherwise.
* lisp/org.el (org-ctrl-c-ctrl-c): small refactoring.
* lisp/org-list.el (org-update-checkbox-count): when a part of the
buffer is processed to count checkboxes, lists are read from top to
bottom, but inside lists (in drawers, blocks, or inline tasks) are
skipped. Thus, cookies cannot be updated. This patch enforces
reading of such lists if counter is itself in a special context.
* lisp/org-list.el (org-list-struct-apply-struct): inline tasks along
with their content must stay at column 0 even if the item is gaining
indentation. Moreover, fix indentation of text in an inline task,
now it can be in such a task within a list.
* lisp/org-list.el (org-at-item-p): also verify context is valid.
Otherwise it would recognize valid items where org-in-item-p
wouldn't.
(org-in-item-p, org-list-struct-apply-struct): use shorter version of
org-at-item-p.
(org-cycle-list-bullet): fix typo.
(org-list-parse-list): avoid calling org-at-item-p two times by using
an appropriate regexp
* lisp/org.el (org-indent-line-function): use an appropriate regexp
instead of calling org-at-item-p two times.
* lisp/org-list.el (org-in-item-p): When point was just after
org-list-end-re, check wouldn't be done for starting line. So, if
the first line was an item, it wouln't be noticed and function would
return nil. Simplify and comment code.