* lisp/org-element.el (org-element--cache-for-removal): Fix corner
case when changes happen in a robust element (e.g., a center block)
within a fragile element (e.g., a plain list). Do not assume that
all parents from a robust element are also robust.
* lisp/org-element.el (org-element--cache-submit-request): Store
parent of first element to delete, if any. This saves a call to
`org-element--cache-find' in a very common use case.
(org-element--cache-sync-requests): Update docstring accordingly.
* lisp/org-element.el (org-element--cache-process-request): Threshold
is based off beginning of the first element to shift instead of the
end of the changes.
* lisp/org-element.el (org-element--cache-submit-request): Do not
trust a stored request after calling `org-element--cache-sync' since
it may as well not exist anymore (i.e., the synchronization was
complete).
* lisp/org-element.el (org-element--cache-submit-request): Fix off by
one error when updating cache. Changes happening at the beginning
to the previous ones, which are always located at the beginning of
an element, imply to delete previous element. Also do not call
`org-element--cache-sync' if there's nothing to synchronize.
* lisp/org-element.el (org-element-inlinetask-parser): Do not infloop
when parsing property drawer in an inlinetask.
* testing/lisp/test-org-element.el (test-org-element/headline-properties):
Add test.
Thanks to Aaron Ecay for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88133
* lisp/org-element.el (org-element--cache-submit-request): Correctly
update cache when changes alter the contents of a greater
element (e.g. a property drawer).
Thanks to Alan Schmitt for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88086
* lisp/org-element.el (org-element-link-parser): Do not prepend "//"
to paths starting with "~".
Since b1dcd0fb0b, link parser doesn't
expand file names anymore. We need to prevent it from "fixing" paths
starting with "~", as it can cause trouble to some
exporters (e.g. latex).
* contrib/lisp/org-bibtex-extras.el: Remove functions to find
citations, moved into ox-bibtex.
* contrib/lisp/ox-bibtex.el: Add functionality to follow cite links.
These options break citation handling for these other backends, so we
should just drop them.
* contrib/lisp/ox-bibtex.el (org-bibtex-merge-contiguous-citations):
Drop citation options for HTML and ASCII export.
* lisp/org.el (org-drag-element-backward): Correcly drag elements in
a drawer or a block.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.
* lisp/ox-html.el (org-html-paragraph): Extend the special case of
inhibiting <p> wrappers to only perform such inhibition when *every*
element of the list is a single paragraph long. Otherwise unsightly
spacing results.
* lisp/ob-shell.el: Remove defcustom `org-babel-sh-command' and
replace with `shell-file-name' throughout.
(org-babel-variable-assignments:sh): Make check for bash work in more
cases.
The original code and the patched version rely on the shell being
available via PATH. Instead the shell name should be mapped to the
appropriate executable via an alist and invoked via an absolute
filename. For security reasons the permissible shells should probably
be taken from /etc/shells or equivalent by default. Instead of
checking for bash, the same or another alist could provide the
information of whether or not the shell supports arrays (which indeed
were introduced by ksh originally).
* lisp/ob-shell.el: Remove unused defcustom
`org-babel-sh-var-quote-fmt'.
(org-babel-variable-assignments:bash_array):
(org-babel-variable-assignments:bash_assoc): Remove superfluous
`mapcar' and double quotes around parameters.
(org-babel-sh-var-to-sh): Single-quote the whole string and escape
all single quotes in the original string.
* lisp/org.el (org-speed-commands-default): Bind "U" and "D" to
`org-metaup' and `org-metadown'.
Org speed keys were not updated to reflect the recent changes to
org-shiftmetaup and org-shiftmetadown. As a result the default
bindings for speedkeys "U" and "D" were destructive, since they moved
only single lines. Binding them to org-metaup and org-metadown fixes
the problem.
Thanks to Marco Wahl for reporting the problem:
http://permalink.gmane.org/gmane.emacs.orgmode/87873
* lisp/org-element.el (org-element-cache-sync-idle-time,
org-element-cache-sync-break): Increase values as synchronizing
cache too makes editing somewhat sluggish without any benefit.
* lisp/org-element.el (org-element--cache-for-removal): New function.
(org-element--cache-submit-request): Do not synchronize cache when
changes can be merged with next request.
This shortcut is particularly useful when many changes happen in the
same area, which is expensive to parse (e.g., a large list).
* lisp/org-element.el (org-element--cache-sync,
org-element--cache-process-request): Change signature.
(org-element--cache-before-change): Do not synchronize cache
preemptively.
(org-element--cache-submit-request): Synchronize cache preemptively.
This change makes possible to skip cache preemptive synchronization
under some circumstances.
* lisp/org-element.el (org-element--cache-sync-requests): Also store
beginning position for buffer modifications.
(org-element--cache-sync, org-element--cache-process-request)
(org-element--cache-submit-request): Adapt to new request template.
This change is required for a future cache optimization.
* lisp/org-element.el (org-element--cache-sync): Do not check return
value from `org-element--cache-process-request'.
(org-element--cache-process-request): Throw `interrupt' when the
request cannot be processed.
(org-element--cache-process-request): Do not catch interruption from
`org-element--parse-to'.
(org-element--parse-to): Throw `interrupt' when the process stops
before finding the result.