* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.
* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.
* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".
* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.
* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks. Remove
back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.
* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
forbidden blocks. Remove back-ends blocks, which are now special
blocks.
* contrib/lisp/ox-extra.el: Update comments.
* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.
Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks. The new syntax is
#+BEGIN_EXPORT backend
...
#+END_EXPORT
instead of
#+BEGIN_backend
...
#+END_backend
As a consequence, =INCLUDE= keywords syntax is modified, e.g.,
#+INCLUDE: "file.org" HTML
becomes
#+INCLUDE: "file.org" export html
* lisp/org-list.el (org-list-parse-list): Use `letrec'.
(org-list-to-generic): Do not allow random sexp, but authorize functions.
(org-list-to-subtree): Apply change to previous function.
Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102651>
Protect apostrophes not covered by the last backport. Convert
expressions like '(...) to \\='(...) and symbols written as 'name to
`name'. (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)
If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
* 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-{macs,list}.el: Fix lexical warnings
* lisp/org-list.el (org-list-struct): Remove unused var `ind'.
(org-list-get-next-item, org-list-get-prev-item)
(org-list-get-children): Mark unused arg `struct'.
(org-list-use-alpha-bul-p): Remove unused var `bul'.
(org-toggle-checkbox): Mark unused var.
(org-update-checkbox-count): Remove unused var `box-num'.
(org-adapt-indentation): Declare.
(org-list-parse-list): Declare var instead of adding a dummy duplicate.
(org-list-send-list): Remove unused var `txt'.
(org-list-to-latex, org-list-to-texinfo): Mark unused arg `params'.
(org-list-to-subtree): Add prefix to dyn-bind var, and declare them.
* lisp/org-macs.el: Use `declare'.
(org-with-limited-levels): Declare dyn-bound vars.
* 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-element.el (org-element-swap-A-B):
* lisp/org-list.el (org-list-swap-items):
(org-list-send-item): In order to preserve visibility of moved items
or elements, only consider inner overlays.
Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94320>
* lisp/org-element.el (org-element-paragraph-separate,
org-element--object-regexp): Turn defconst into defvar.
(org-element--set-regexps): Properly set previous variables.
(org-element-update-syntax): New function.
* lisp/org-list.el (org-plain-list-ordered-item-terminator,
org-list-allow-alphabetical): Call new function whenever these
variables are modified and Org is already loaded.
* lisp/org.el (org-add-link-type): Call new function since a new link
type triggers a rebuild of syntax regexps, possibly invalidating
cache in all Org buffers.
Reported-by: Christopher Dannheim <ch.dannheim@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/92487>
* lisp/org-list.el (org-list-item-body-column): Take into
consideration empty items and bullets followed by two spaces.
* lisp/org.el (org--get-expected-indentation): Fix return value for
items in lists.
(org-indent-region): Fix infloop when indenting some types of plain
lists. Also fix error when region starts with blank lines at the
beginning of the buffer.
* testing/lisp/test-org.el (test-org/indent-region): Add tests.
* org.el (org-refresh-category-properties)
(org-complete-expand-structure-template)
(org-buffer-property-keys, org-context):
* org-mouse.el (org-mouse-context-menu):
* org-list.el (org-list-send-list):
* org-element.el (org-element--list-struct):
* org-archive.el (org-all-archive-files): Allow spaces before
any option keyword.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix
fontification of all option keywords.
Thanks to Alan Schmitt for raising the problem with fontification.
* 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.