* org.el (org-refile-get-location): Check for a refile
position when the position is not nil, otherwise allow to
create the parent node if the user requests it.
Thanks to Li Zhuo for reporting this bug and for providing
a preliminary patch.
* lisp/ox-icalendar.el (org-icalendar--combine-files): Make sure
anniversaries do not end up in *Message* buffer instead of the ICS
file.
Patch-by: Thomas Baumann <tbaumann@tum.de>
* org.el (org-shiftcontrolup, org-shiftcontroldown): When
`org-support-shift-select' is not `nil', let-bind it to nil
if point is on a clock log. Otherwise throw an error.
* org-agenda.el (org-cmp-ts): Fix bug: interpret `late' as
`later than any date' instead of `later than today'.
Thank to Michael Crouch for reporting this and to Michael Hoffman for
providing the fix.
* org.el (org-do-emphasis-faces): Handle false positives by
restarting the re-search one char after the beginning of the
match, not one char before its ending.
Before this fix, consider this buffer
** Headline
- *Bold* non-bold
- *Bold* non-bold
The first false positive is "** Headline\n - *Bold*"
Starting the search again from the last "*" will skip
the "*Bold*" string. Starting again at "* Headline" will
find it.
* lisp/ox.el (org-export-dictionary): Add new Japanese translation
strings.
A few strings in `org-export-dictionary' didn't have Japanese
translations. So, I just added.
* lisp/ox.el (org-export-dictionary): Convert all Japanese translation
from utf-8 to default.
There shouldn't be much need for exporters and users to worry about
the coding system of the final output. If one wants to export a
"Japanese" document, he should already have the document with Japanese
capable coding system. In that case, Emacs should be able to handle
the coding system conversion form the translation table to the
designated file coding system.
There are two cases which I can think don't work:
- all words in the document are written in romaji, and one wants
romaji translations
- the documents are writ en in a language which does not support
Japanese character set, ie English or French, and one wants to use
Japanese for non-content strings, ie TOC.
These cases are too rare that we can ignore for now.
* lisp/ob-J.el (org-babel-J-interleave-echos): Change '' to ','.
(org-babel-J-interleave-echos-except-functions): Improve regexp
and change '' to ','.
(org-babel-J-strip-whitespace): Change '' to ','.
(obj-get-string-alignment): New function.
(org-babel-J-print-block): Accomodate left- and right-aligned tables.
(obj-match-second-space): Rename.
(obj-match-second-space-left): Renamed from `obj-match-second-space'.
(obj-match-second-space-right): New function.
* lisp/org-element.el (org-element--cache-sync): Fix cache update when
a only contents of an element are modified.
(org-element--cache-shift-positions): Add optional argument allowing
partial shifting.
* ox-html.el (org-html-style-default): New classes
caption.t-above and caption.t-bottom.
(org-html-table): Use new classes.
TINYCHANGE
Signed-off-by: Vladimir Lomov <lomov.vl@gmail.com>
* ox-html.el (org-html-style-default): New classes
caption.t-above and caption.t-bottom.
(org-html-table): Use new classes.
Signed-off-by: Vladimir Lomov <lomov.vl@gmail.com>
* lisp/ox.el (org-export-remove-uninterpreted-data): Renamed from
`org-export--remove-uninterpreted'.
(org-export--remove-uninterpreted-data-1): New function.
(org-export-as): Use new function.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Change
signature.
(org-latex-math-block-tree-filter,
org-latex-math-block-options-filter): New functions.
This patch fixes 68fda96c06, where
changes to inline math export were not propagated to document
properties.
* lisp/ox-latex.el (org-latex-pseudo-objects): New variable.
(org-latex--wrap-latex-math-block): New function.
(org-latex-table, org-latex--math-table): declare pseudo objects.
This patch provides support for constructs like:
\alpha_b
which should be translated as
$\alpha_{\text{b}}$
instead of
$\alpha$$_{\text{b}}$
* lisp/ox.el (org-export-data): Do not check for uninterpreted
elements or objects. These are removed from parse tree anyway.
(org-export--remove-uninterpreted): New function.
(org-export--interpret-p): Removed function.
(org-export-as): Handle uninterpreted elements and objects.
* lisp/org.el (org-set-font-lock-defaults): use a shy regex for
identifying macros to fontify
Before this change, the xxx in the following text would be erroneously
fontified with the macro face:
{{{macro1()}}} xxx {{{macro2()}}}
* lisp/ob-sh.el (org-babel-sh-command): Now set from
`shell-file-name'.
(org-babel-shell-names): List of specific shells known to Org mode
shell code blocks.
(org-babel-execute:shell): New generic shell execution function.
* lisp/org-element.el (org-element-at-point): Simplify opportunistic
shortcut by looking only for blank lines and headlines or
inlinetasks. Since regexp is simpler, we can afford to make more
searches.
* lisp/org-element.el (org-element--cache-stable-types): New variable.
(org-element--cache-sync): Do not store elements with missing parents
in cache.
The bug was introduced in 71c8474ae9.
Parsing doesn't always start from beginning of section, which means
that missing parents aren't always repaired while moving to the
current element. Therefore, we need to remove any element from cache
with an invalid parent property.
The bulk of the new code in org-babel-sha1-hash is borrowed from
org-babel-expand-src-block.
* lisp/ob-core.el (org-babel-sha1-hash): Expanded noweb references
when calculating hashes.
* org.el (org-self-insert-command)
(orgtbl-self-insert-command): Change the value of the
`delete-selection' property to allow other commands like
`electric-pair-will-use-region' to be run before deletion.
Thanks to Harald Hanche-Olsen for reporting this.
* 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.
* 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.
* lisp/ob-core.el (org-babel-execute-src-block): Set location info
parameter for inline src blocks.
(org-babel-get-src-block-info): Set location info parameter for
inline src blocks.
* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
properties, as `org-entry-properties' and
`org-entry-get-with-inheritance' already do.
* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
a property, as both `org-entry-properties' and
`org-entry-get-with-inheritance' already do.