* org.el (org-babel-do-in-edit-buffer): Declare.
(org-babel-load-file, org-insert-comment)
(org-comment-or-uncomment-region): Don't require 'ob-core.
(org-mode-map): Remap `comment-dwim' to `org-comment-dwim'.
(org-comment-dwim): New command.
* ob-core.el (org-babel-do-in-edit-buffer): Make an autoload.
See http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00154.html
for a discussion about this bug.
* lisp/org.el (org-ctrl-c-ctrl-c): When point is on an unsupported
object, look for something to do at a higher level instead of
bailing out.
For example, C-c C-c should toggle checkbox in the following example
even though X point is technically on a subscript.
- [ ] a_Xb
* lisp/ox-publish.el (org-publish-after-publishing-hook): New variable.
(org-publish-file): Call hook with file name and output file name as
arguments. Small refactoring.
(org-publish-attachment): Return output file.
* lisp/ox-html.el (org-html-format-latex): Add an argument. Ensure
latex header is the same as specified in the original buffer when
exporting a LaTeX fragment or environment.
(org-html-latex-environment, org-html-latex-fragment): Apply signature
change.
* lisp/org-element.el (org-element-secondary-p): New function.
* lisp/ox.el (org-export-get-previous-element,
org-export-get-next-element): Use new function.
* testing/lisp/test-org-element.el (test-org-element/secondary-p): New
test.
* doc/org.texi (Export settings): documentation describing how text
above the first heading is ignored when an :export: tag is in a file.
Commit 7cf4406088 introduced a feature of
the exporter that ignores text above the first headline when an :export:
tag is used anywhere in a file. This commit documents that behaviour
introduced in 7cf44060, in doc/org.texi.
TINYCHANGE
* lisp/org.el (org-mode-restart): Check for derived-mode-p instead of
"org-mode" exactly. This covers a situation normal-mode already
instantiates a derived mode (e.g. via file local variables).
* lisp/org.el (org-mode-restart): Call normal-mode,
instead of org-mode. This will set the mode but it
will also set file local variables properly.
Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.
The original fix (commit 5ea0228) was incorrect: if the
local variable was a mode setting, then we ended up in an
"infinite" recursion. Problem found, reported and a reproducer
provided by York Zhao.
* lisp/org-element.el (org-element-at-point): Rewrite function. Remove
optional argument.
Include an opportunistic search at the beginning of the function. It
drastically improves speed on large sections for a small overhead on
small ones.
* lisp/org-capture.el (org-capture-place-entry): Set :exact-position
before doing other stuff, to allow function with other target settings
TINYCHANGE
Assuming file "test.org" has a single headline "* Level 1" (ended with
newline character), when trying to use function type capture target in
an org-capture template, as shown in the example:
(setq org-capture-templates
`(("t"
"Test function type target"
entry
(function
(lambda ()
(set-buffer (org-capture-target-buffer "test.org"))
(goto-char (point-max))))
"* Level 2")))
When this template gets filled, file "test.org" becomes:
* Level 1
* Level 2
Instead of:
* Level 1
** Level 2
This is because when using function type target, `:exact-position' is
used to store buffer position returned by user's function (the lambda
function here), and function `org-capture-place-entry' will never
insert template as a child of current entry when `:exact-position' is
used.
The problem is addressed by not special casing for `:exact-position'
in function `org-capture-place-entry'.
York
* lisp/ox-publish.el (org-publish-cache-ctime-of-src): Return an error
when publishing a non-existent file.
Suggested-by: Arne Babenhauserheide <arne_bab@web.de>
* lisp/org.el (org-mode-flyspell-verify): Rewrite function using
Org parser. As a consequence, Org is more cautious about areas
where checks are allowed.
(org-fontify-meta-lines-and-blocks-1, org-activate-footnote-links): Be
subtler when removing flyspell overlays.
(org-unfontify-region): Remove reference to unused `org-no-flyspell'
property.
(org-fontify-drawers): New function.
(org-set-font-lock-defaults): Use new function to fontify drawers.
* contrib/lisp/org-wikinodes.el (org-wikinodes-activate-links): Remove
reference to unused `org-no-flyspell' property.
* lisp/ob-C.el (org-remove-indentation): Declare function to appease
compiler.
* lisp/ob-core.el (org-remove-indentation): Declare function to
appease compiler.
* lisp/ob-fortran.el (org-remove-indentation): Declare function to
appease compiler.
* lisp/ob-C.el (org-babel-C-execute): Remove common indentation when
trimming.
* lisp/ob-core.el (org-babel-read-result): Remove common indentation
when trimming.
(org-babel-update-block-body): Remove common indentation when
trimming.
* lisp/ob-fortran.el (org-babel-execute:fortran): Remove common
indentation when trimming.
* lisp/ob-tangle.el (org-babel-process-comment-text): Better default
to process tangled comments.