Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.
Also define two aliases.
* lisp/org-list.el (org-list-write-struct): Add an optional argument
for structure changes happening outside the function.
* lisp/org.el (org-ctrl-c-ctrl-c): Now, C-u C-c C-c on the first item
of a sub-list should toggle check-box presence of every item in the
same sub-list. Also fix check-box insertion on a single item.
* lisp/org-list.el (org-list-parents-alist): When no parent is found
for an item, set it as the closest less indented item above. If
none is found, make it a top level item.
(org-list-write-struct): Externalize code.
(org-list-struct-fix-item-end): New function.
(org-list-struct): Remove a now useless fix.
* lisp/org.el (org-ctrl-c-ctrl-c): Use new function.
* lisp/org-list.el (org-list-separating-blank-lines-number): the
behaviour of `org-back-over-empty-lines' depends on the associated
value of `headline' in `org-blank-before-new-entry', which is out of
context in a list.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* lisp/org-list.el: search blank lines down to the end of the item
instead of stopping at the item, in order to possibly match such
lines within the item.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): don't remove the ending regexp
when it consists in blank lines.
* lisp/org-list.el (org-list-parse-list): ditto, but remove it
completely when it isn't made of blank lines (i.e. during export process).
* lisp/org-list.el (org-list-insert-item): actualize code comments.
(org-insert-item): for consistency, point cannot be moved at
a surprising place when the user is being asked to choose a new
description term to insert in the list. Point should stay where the
user called the command.
* lisp/org-list.el (org-list-send-item, org-list-struct-apply-struct,
org-apply-on-list, org-toggle-checkbox): make markers point nowhere
when they have become useless.
* lisp/org-list.el (org-list-insert-item): when insertion point is in
some white line after the end of the list, remove all unnecessary
white lines there before proceeding. Also refactor a snippet of
code.
* lisp/org-latex.el (org-export-latex-list-parameters): complete
default value with cbtrans option.
* lisp/org-list.el (org-list-to-latex): set a more consistent default
value.
* lisp/org-list.el (org-list-swap-items): move it to a meaningful
position in source code (i.e. before any function using it), and
rename it to an easier name.
* lisp/org-list.el (org-list-use-circular-move): new variable.
(org-previous-item, org-next-item): make use of the new variable.
(org-move-item-down, org-move-item-up): make use of the new
variable. Simplify code.
* lisp/org-list.el (org-list-full-item-re): allow counter and
check-box to be separated by white spaces.
(org-list-struct-apply-struct): reflect changes made to
`org-list-full-item-re'.
* lisp/org-html.el (org-html-export-list-line): recognize spaces
between counter and check-boxes as valid.
* lisp/org-docbook.el (org-export-docbook-list-line): ditto.
* lisp/org-list.el (org-cycle-item-indentation): cycling back to
original position deleted any additional information in the item,
like a counter or a tag.
* lisp/org-list.el (org-reset-checkbox-state-subtree): make the
command more robust, and correctly update check-boxes in the whole
sub-tree.
(org-update-checkbox-count): fix bug accumulating count of checkboxes
when walking a subtree.
(org-update-checkbox-count-maybe): add an optional argument passed to
org-update-checkbox-count.
Thanks to Paul Mead for the report.
* lisp/org-list.el (org-list-parse-list): replace transitional
check-boxes with "[CBTRANS]" string during parsing.
(org-list-to-generic): use the new property `:cbtrans' to configure
export string for transitional check-boxes.
* 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.