* lisp/org-src.el (org-src-mode-configure-edit-buffer): Fix "Wrong
type argument: overlayp".
Changing major mode in a source edit buffer resets local variables
used to link it to source buffer. As a consequence, overlay in source
buffer can no longer be found nor deleted.
* lisp/org-src.el (org-edit-src-region-extra): Remove variable.
(org-edit-src-find-region-and-lang, org-edit-src-get-lang,
org-edit-src-get-label-format, org-edit-src-get-indentation,
org-src-fontify-block, org-src-fontify-buffer): Remove functions.
(org-src-font-lock-fontify-block): Remove reference to removed
function in docstring.
Remove all functions and variables related to parsing, which is now
delegated to org-element.el. Also reorder a defcustom and
a declaration in the library.
* lisp/org-src.el (org-edit-src-code): Fix regexp.
(org-edit-src-exit): Do not remove auto-save timer. This is
handled by the timer itself.
`org-edit-src-save' calls `org-edit-src-exit', which then clears the
auto-save timer, thus preventing any further auto-saves before the
next `org-edit-src-code' call.
Thanks to Adriaan Sticker for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90650
* org-src.el (org-src-font-lock-fontify-block): Use
`font-lock-fontify-buffer' instead of `font-lock-ensure',
otherwise fonts are not displayed for src blocks.
Thanks to Mathäus Meyer for reporting this.
* org.el: Send a warning when org-loaddefs.el could not be
found in the directory where this org.el file is loaded from.
* ox-org.el (org-org-publish-to-org):
* ox-odt.el (org-odt-do-format-code):
* ox-html.el (org-html-fontify-code):
* org.el (org-fontify-like-in-org-mode):
* org-src.el (org-src-font-lock-fontify-block):
* org-clock.el (org-clock-get-clocktable): Use
`font-lock-ensure' instead of `font-lock-fontify-buffer'.
* org.el (org-outline-level, org-copy-subtree)
(org-sort-entries, orgstruct-setup, org-show-context)
(org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick)
(org-goto-sibling, org-goto-first-child, org-show-entry): Use
`ignore-errors' instead of (condition-case nil ... (error nil)).
People trying to load org.el when org-loaddefs.el is not available
has been a major cause of trouble when installing Org. The warning
tells them what they need to do.
* lisp/org.el (org--get-expected-indentation,
org--align-node-property): New functions.
(org-indent-line): Use new function. Also merge functionalities with
`org-src-native-tab-command-maybe'.
* lisp/org-src.el (org-src-native-tab-command-maybe): Remove function.
* testing/lisp/test-org.el (test-org/indent-line): New test.
* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.
The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer. The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
* org-src.el (org-edit-src-code): Throw a warning instead of
an error when loading the mode fails, otherwise the user is
left with unusable buffers.
Thanks to Florian Beck for suggesting this.
* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.
The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer. The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
* ob-C.el: Added =C++= to =`org-babel-load-languages'=
automatically after loading =C=.
* org-src.el (org-src-lang-modes): Added association between
language =C++= and =`c++-mode'=.
=C++= is added to org-babel-load-languages to make
`org-babel-demarcate-block' recognize =C++= as a proper language.
* org-src.el (org-edit-src-turn-on-auto-save): New option.
(org-edit-src-code): Use it.
(org-edit-src-auto-save-idle-delay): Enhance docstring.
* doc/org.texi (Editing source code): Document
`org-edit-src-auto-save-idle-delay' and
`org-edit-src-turn-on-auto-save'.
Thanks to Charles C. Berry for bringing this up again.
* org-src.el (org-edit-src-code): Don't set
`buffer-auto-save-file-name' unless `auto-save-default' is
non-nil.
Thanks to Charles Berry for reporting this.
* org-src.el (org-src-native-tab-command-maybe): Check that we
are in a source code block.
Consider this content:
#+HEADERS: :var data1=1
#+BEGIN_SRC emacs-lisp :var data2=2
(message "data1:%S, data2:%S" data1 data2)
#+END_SRC
Before the fix, hitting TAB on #+HEADERS would throw an error.
* lisp/ob-tangle.el (org-babel-tangle): Do not change signature, a nil
arg is even documented in the manual.
* lisp/org-src.el: Change declaration of `org-babel-tangle´ to "arg"
for first argument.