* lisp/org.el (org-ctrl-c-ctrl-c): call `org-list-send-list' only when
cursor it at very first item of the list, as specified in the
manual. Also refactored the list part of the function a bit.
* org-agenda.el (org-agenda): Set the 'last-args property to
nil when calling `org-agenda'. Don't kill the local variable
`org-agenda-current-span'.
(org-run-agenda-series): Use the new property 'last-args.
(org-agenda-change-time-span): Use the dynamically set
`org-agenda-overriding-arguments' variable when non-nil.
Thanks to Matt Lundin and Michael Brand for reporting this.
* lisp/org.el (org-toggle-item, org-toggle-heading): make sure every
sub-item in a list is changed into a sub-heading and sub-headings
are translated into sub-items. Also ignore inline tasks in the
process.
org-toggle-item on headlines preserves hierarchy
* lisp/org-exp.el (org-export-select-backend-specific-text): add
`original-indentation' property when replacing #+begin_backend and
#+backend blocks with their content. This is needed for lists, as
they must know if the block belonged to them.
* 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.
* lisp/org.el (org-toggle-item): when used on normal text, ensure
every line in region is included in the new item, regardless of its
original indentation.
* lisp/org-list.el (org-list-struct-apply-struct): if end of list was
at eol, for example, with list inside a block, the last list
wouldn't be shifted. Thus, the patch ensures no blank lines is
skipped.
* lisp/org.el (org-toggle-item): Now accepts a prefix argument. When
used without argument on normal text, it will make the whole region
one item. With an argument, it defaults to old behavior: change each
line in region into an item.
* lisp/org.el (org-return): when called from inside an item with the
indent flag, function should keep text moved inside the item. This
allows to use C-j to separate lines in an item: cursor won't go back
to column 0.
* lisp/org-list.el (org-list-struct): when a line has org-example
property, skip the entire block. This is needed during export, for
example when src blocks in org markup contain lists, and are
returned verbatim because org isn't in the list of interpreted
languages.
* lisp/org-list.el (org-list-insert-item-generic): change arguments.
The function now accepts structure and previous items alist. This
allow to insert an item programmatically more easily.
(org-insert-item): Apply changes to org-list-insert-item-generic. The
function now takes care about repairing structure and updating
checkboxes.
* lisp/org-timer.el (org-timer-item): Apply changes to
org-list-insert-item-generic. The function now takes care about
repairing structure.
* lisp/org-list.el (org-list-make-subtree): function now uses
org-list-parse-list mechanism.
(org-list-make-subtrees): removed function.
(org-list-to-generic): added a parameter and every parameter can be a
sexp returning a string, for finer control.
(org-list-to-html, org-list-to-latex, org-list-to-texinfo): slight
modifications to apply changes to org-list-to-generic.
(org-list-to-subtree): new function.
* lisp/org-docbook.el (org-export-docbook-list-line): even with
alphabetical lists, Org shouldn't enforce a particular list type to
exporters. This is a job for style files.
* lisp/org-html.el (org-html-export-list-line): ib idem.
* lisp/org-list.el (org-at-item-counter-p): new function.
(org-list-parse-list): handle counters and list depth.
(org-list-to-generic): a special string is used when an item has a
counter.
(org-list-to-latex): use new special string for counters. This fixes
the counter bug in LaTeX export, as the enumi counter was the only one
modified.
* lisp/org-latex.el (org-export-latex-lists): use new
`org-list-parse-list' output.
* lisp/org-list.el (org-list-get-list-type): new function.
(org-list-parse-list): use new function.
* lisp/org-html.el (org-html-export-list-line): use new function.
* lisp/org-docbook.el (org-export-docbook-list-line): use new function.
* lisp/org-list.el (org-alphabetical-lists): new variable
(org-item-re, org-list-full-item, org-cycle-list-bullet,
org-list-struct-fix-bul, org-list-inc-bullet-maybe): reflect
introduction of the new variable.
(org-item-beginning-re): changed into a function, so any modification
of `org-alphabetical-lists' will not require reloading Org.
(org-at-item-p, org-toggle-checkbox, org-update-checkbox-count,
org-list-parse-list, org-list-send-list): reflect changes to
`org-item-beginning-re'.
(org-list-use-alpha-bul-p): new function.
* lisp/org.el (org-check-for-hidden): reflect changes to
`org-item-beginning-re'.
* lisp/org-capture.el (org-capture-place-item): reflect changes to
`org-item-beginning-re'.
* lisp/org-docbook.el (org-export-docbook-list-line): handle new type
of items.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): reflect changes to
`org-item-beginning-re'.
* lisp/org-html.el (org-html-export-list-line): handle new type of
items.
* lisp/org-latex.el (org-export-latex-lists): handle new type of items
and reflect changes to `org-item-beginning-re'.
* lisp/org-ascii.el (org-export-ascii-preprocess): handle new counters.
Modified from a patch by Nathaniel Flath.
* lisp/org-list.el (org-list-end-re): removed function and made it a
variable. There's no need for the overhead of calling the function
every at every line in a list. User will have to reload Org if he
change value of either `org-list-end-regexp' or
`org-empty-line-terminates-plain-lists'.
(org-in-item-p,org-list-struct,org-list-parse-list): apply change.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): apply change
* lisp/org-latex.el (org-export-latex-lists): apply change. Also
prevent items with org-example property to be considered as real
items.