* lisp/ox.el (org-export-as): Refresh regexps before executing Babel
code, running last hook and parsing buffer so precomputed regular
expressions are correct at each of these steps.
This is not necessary before macros since those are not expected to
rely on computed expression. Actually, advanced macros, i.e. with
"(eval ...)" syntax, could make use of them, but a Babel snippet is
more likely in this situation.
Reported-by: Robert Klein <RoKlein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98550>
* org-capture.el (org-capture-fill-template): The capture template
buffer will be displayed in another window, keeping original window
visible if appropriate.
* lisp/org-agenda.el (org-agenda-prepare): Use the correct key for
category filter.
`org-agenda-prepare-window' uses 'cat whereas `org-agenda-prepare' used 'car.
* lisp/org-agenda.el (org-agenda-prepare): Fix non-persistent filters when refreshing sticky agenda
When a sticky agenda is buried, then reviving and refreshing, existing
filters are ignored even when org-agenda-persistent-filter is `t'.
Reported and fixed by Daniel Borchmann
* lisp/ox.el (org-export--get-subtree-options): When multiple options
refer to the same keyword, and, as a consequence, to the same export
property, make sure all of them get updated.
* testing/lisp/test-ox.el (test-org-export/get-subtree-options): Add
test.
Reported-by: Myles English <mylesenglish@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98583>
* lisp/ox-latex.el (org-latex-footnote-reference): Remove call to
`org-latex--wrap-latex-math-block' since definitions are already
taken care of at the filter parse tree level, since
47265b31ca.
* lisp/ox.el (org-export-get-environment):
(org-export-collect-tree-properties):
Remove :footnote-definition-alist property.
(org-export-get-footnote-definition): Apply removal of property.
(org-export--merge-external-footnote-definitions): New function.
(org-export-as): Use new function.
* testing/lisp/test-ox.el (test-org-export/footnotes): Update tests.
This change allows to have all footnote definitions within the parse
tree, so they can be reached with, e.g., a parse tree filter.
* lisp/org.el (org-clone-subtree-with-time-shift): Allow argument
specifying number of clones to be 0.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
tests.
This makes it possible to clone a subtree with a repeating timestamp
so that the repeater is removed from the original subtree and a single
shifted, repeating clone is created. If the original subtree does not
have a repeating timestamp, no clones will be made.
* lisp/ox.el (org-export-resolve-fuzzy-link): When a fuzzy link
matches more than one headline, prefer the first one in the parse
tree.
* testing/lisp/test-ox.el (test-org-export/fuzzy-link): Remove a test.
This behaviour is consistent with `org-open-at-point'. Also, it
allows to cache destinations.
* ox-beamer.el (org-beamer--get-label): Wrap labels in braces.
The colon in the label name causes an argument parsing problem, for
more see <http://tex.stackexchange.com/q/250640/4416>.
* lisp/ox-beamer.el (org-beamer-environments-extra): Handle "%R" and
"%O" placeholders.
(org-beamer--format-block): Fill template with appropriate values for
placeholders above.
Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98361>
* lisp/org-element.el (org-element--cache-sync-requests): Remove a now
useless element from requests
(org-element--cache-submit-request): Apply change to sync request.
(org-element--cache-process-request): Apply change to sync requests.
Fix removal of orphaned elements, i.e., elements not affected by
a change, but with an ancestor that was.
* testing/lisp/test-org-element.el (test-org-element/cache): Add test.
Reported-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98260>
* 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/ox-latex.el (org-latex-text-markup-alist): Remove \verb from
default value.
(org-latex--protect-text): New function.
(org-latex--text-markup):
(org-latex-inline-src-block): Use new function.
Suggested-by: Titus von der Malsburg <malsburg@posteo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98000>
* lisp/org.el (org-icompleting-read): Let `completing-read' or
equivalent sort out type of completion.
(org-olpath-completing-read): Revert partially
1a73641770.
* lisp/org.el (org-store-log-note): Ensure insertion point is
available in the narrowed part of the current buffer.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98152>
* lisp/org-timer.el (org-timer-set-timer): Add support for hh:mm:ss
format.
(org-timer-default-timer): Type changed from number to string.
* testing/lisp/test-org-timer.el (test-org-timer/set-timer): Add
hh:mm:ss format in the test.
* lisp/org-colview.el (org-columns): Rely on `org-entry-get' instead
of `org-entry-properties' in order to handle inheritance properly.
Also limit search to properties actually used as columns instead of
all properties.
Reported-by: Nik Clayton <nik@ngo.org.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/98091>
* lisp/org.el (org-store-link): When creating a link from an edit
buffer, re-use label on current line, if any. Give up if call is
non-interactive, as it would otherwise ask for user's input.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97902>
* lisp/org.el (org-not-done-heading-regexp): Fix a typo and make
variable buffer-local, as expected.
Reported-by: Alexander Borkowski <alex-b@opus-b.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97996>
* org.el (org-latex-default-packages-alist): Add grffile for files
with spaces and periods.
Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97846>
* lisp/ox-texinfo.el (org-texinfo-compile): Put Texinfo output into
`compilation-mode'.
Suggested-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97961>
* lisp/ox-texinfo.el (org-texinfo--inline-image): Add an @anchor for
labelled images without a caption.
Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97961>
* lisp/org-src.el (org-edit-src-code): Do not add indentation at every
edit when `org-src-preserve-indentation' is non-nil.
Function taking care of indentation cannot check
`org-src--preserve-indentation' since the variable is buffer-local and
indentation happens in a temporary buffer.
Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97927>
* ob-core (org-babel-result-cond): Add "file" as a param that returns
a scalar result.
When writing the result to file we do not need to first convert the
data to a table since it is just converted back when
org-babel-execute-src-block serializes the result to file.
* lisp/org-src.el (org-src--preserve-indentation): New variable.
(org-src--contents-for-write-back):
(org-src--edit-element):
(org-edit-src-code): Use new change.
Before this change `org-src-preserve-indentation' was both a defcustom
and an internal local variable. Both uses are now separated.
* lisp/org-src.el (org-src-mode): Do not stop auto save feature when
current buffer is no longer an edit buffer.
Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97892>
* lisp/org.el (org-cycle-show-empty-lines): Fix visibility cycling
with `org-cycle-separator-lines' set to -1.
Reported-by: Michael Crouch <creidieki@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97879>
Fix a problem where a source block would return nil oif the result was
cached and it was indented.
* lisp/ob-core.el (org-babel-execute-src-block): Move point to the the
first character of the result instead of the beginning of the line.
* testing/lisp/test-ob.el
(test-org-babel/indented-cached-org-bracket-link): Added test to
to see if the indented cached result returns what it should return.
* lisp/ox-texinfo.el (org-texinfo-inline-image-rules): New variable.
(org-texinfo--inline-image): New function.
(org-texinfo-link): Use new function.
* doc/org.texi (Texinfo specific attributes):
* etc/ORG-NEWS: Document new feature.
* lisp/ox-texinfo.el (texinfo): Offer to open produced file from
dispatcher.
File is opened through `org-open-file' since texinfo back-end can
output multiple formats.
* lisp/org-src.el (org-src--contents-area): Include contents to be
inserted in the edit buffer in return value.
(org-src--edit-element): Apply change above.
Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97784>
* org.el (org-return): RET breaks headline text.
* test-org.el (test-org/return): Test org-return on headline text.
* ORG-NEWS: Add entry on new org-return behavior.
* 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/ob-R.el (org-babel-header-args:R): Allow "drawer" and "none",
since they are supported in `org-babel-common-header-args-w-values'.
Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97683>
* lisp/org-inlinetask.el (org-inlinetask-toggle-visibility): Fix
visibility toggling when starting with a link.
Reported-by: Anders Johansson <mejlaandersj@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97603>
* lisp/org-attach.el (org-attach-commit): Check for .git/annex dir in
addition to annex dir in root git dir to ensure that git annex is used
TINYCHANGE
* lisp/ox.el (org-export-expand-include-keyword):
(org-export--prepare-file-contents):
(org-export-with-backend): Wrap line of code within 80 columns.
(org-export--inclusion-absolute-lines): Remove unecessary `format'
call for error message.
* org-element.el (org-element-latex-fragment-parser):
* org.el (org-latex-regexps): Fix the detection of latex
fragments. Uses syntax tables to detect whitespaces and punctuation
marks following the final $ sign.
In order to qualify as a math delimiter, the final $ sign of a LaTeX
fragment has to be followed by a whitespace or punctuation mark but the
regexp used in the previous code matched only a small number of
punctuation marks and therefore missed some latex fragments.
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults
to `org-default-notes-file'.
* lisp/org.el (org-default-notes-file): Do not fallback on
`remember-data-file' since "org-capture.el" is not based off
"remember.el" anymore.
Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97448>
* lisp/org-table.el (org-table-TBLFM-begin-regexp): Take into
consideration that table lines are not required to end with "|".
(org-table-calc-current-TBLFM): Properly clean markers at the end of
the process.
(org-table-TBLFM-begin): Small refactoring.
* lisp/org.el (org-at-TBLFM-p): Prevent false positives.
Suggested-by: Oleg Sivokon <olegsivokon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97461>
* lisp/ox-publish.el (org-publish-resolve-external-link): Warn instead
of throwing an error when a reference to a non-published external
file is encountered.
* lisp/ox-publish.el (org-publish-resolve-external-link): Throw an
error when trying to resolve an external reference while not in
a publishing process.
Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97420>
* lisp/ox-publish.el (org-publish--collect-references):
(org-publish-resolve-external-link): Treat consecutive blank
characters as a single space, not 0.
* lisp/org-footnote.el (org-footnote-create-definition): Remove
`interactive' status. Allow to insert definitions outside of
narrowed part of buffer. Preserve position. Return beginning
position of created definition.
(org-footnote-new):
(org-footnote-action): Apply changes above.
* lisp/org-footnote.el (org-footnote--goto-local-insertion-point):
Renamed from `org-footnote-goto-local-insertion-point'.
(org-footnote-normalize): Use function above. Small refactoring.
* testing/lisp/test-org-footnote.el (test-org-footnote/normalize-in-org):
Small refactoring.
* lisp/org-footnote.el (org-footnote-goto-definition): Add an optional
argument in order to avoid duplicating calls to
`org-footnote-get-definition'. Return non-nil when move was
successful.
* lisp/org-footnote.el (org-footnote-get-definition): Footnotes
definitions are global, so ignore narrowing right from the start.
Also skip false positives.
* lisp/org-src.el (org-src--edit-element): Do not rely on :value to
extract contents. Small refactoring.
(org-src--contents-area): Renamed from
`org-src--element-contents-area'. Throw an error on unknown
elements.
(org-src--on-datum-p): Rename from `org-src--on-element-p'. Handle
objects.
(org-edit-export-block, org-edit-src-code,
org-edit-fixed-width-region, org-edit-table.el): Apply renaming.
(org-edit-src-save, org-edit-src-exit): Handle inline text.
(org-edit-src-exit): Allow empty or blank code. Handle inline text.
(org-src--edit-element): Rename an argument
(org-edit-footnote-reference): Allow to edit inline definitions.
* etc/ORG-NEWS: Document new feature.
* lisp/org.el (org-open-at-point): Make sure org shell output buffer
is a string of buffer name before appending to
`clean-buffer-list-kill-buffer-names' for cleaning later.
TINYCHANGE
* lisp/org-src.el (org-src--auto-save-timer): Renamed from
`org-src--code-timer'.
(org-src--edit-element):
(org-src-mode): Enable auto-save features in minor mode. Apply
variable renaming.
* lisp/org.el (org-refresh-category-properties): Prevent the `put-text-property'
to change the point in order to take into account the CATEGORY
property in subtrees also.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.
* lisp/org-src.el (org-src--element-contents-area):
(org-edit-footnote-reference): Take into consideration
that :contents-begin and :contents-end may be nil.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/97262>
* lisp/org-element.el (org-element--set-regexps): Refine
`org-element-paragraph-separate'.
(org-element-paragraph-parser): Fix paragraph parsing when followed by
a dual keyword or an ill-formed latex environment.
* testing/lisp/test-org-element.el (test-org-element/paragraph-parser):
Add tests.
Reported-by: Jacob Gerlach <jacobgerlach@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97256>
* lisp/org-src.el (org-src--element-contents-area): Make a special
case for footnote definitions.
(org-edit-footnote-reference): New function.
* lisp/org.el (org-edit-special): Use new function.
* lisp/org.el: (org-cycle): Ignore invisible newlines and cycle
visibility when point is visibly on a headline.
Requested by: Nikolaus Rath <Nikolaus@rath.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/97125>
* lisp/org-footnote.el (org-footnote-goto-definition): Throw an error
when definition is outside narrowed part of buffer. Do not move
point either.
* testing/lisp/test-org-footnote.el (test-org-footnote/goto-definition):
New test.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/97158>
* lisp/ob-processing.el: New file.
* doc/org.texi (Languages): Signal new language.
This library implements necessary functions for implementing editing
of Processing code blocks, viewing the resulting sketches in an
external viewer, and HTML export of the sketches.
Editing Processing blocks requires processing2-emacs mode. Viewing
Processing blocks embedded in Org buffer in an external viewer also
requires processing2-emacs. This viewing is bound to C-c C-v C-k and
produces no results in Org buffer. HTML export of the results of a
Processing block is also supported, assuming that the processing.js
module is available: the sketch is then drawn by the browser when the
HTML page is viewed. This drawing is implemented by embedding the
Processing code in a script using the processing.js module. The user
is responsible for making sure that processing.js is available in the
correct location.
Console output from a Processing block produced e.g. by println() is
shown in the Processing compilation window when the code is executed
in Org buffer, and in text area (console) of the browser when the code
is embedded in HTML.
* lisp/ox.el (org-export-registered-backends): Renamed from
`org-export--registered-backends'.
(org-export-get-backend):
(org-export-register-backend):
(org-export-insert-default-template):
(org-export--dispatch-ui):
* lisp/org.el (org-export-registered-backends):
(org-export-backends):
(org-get-export-keywords):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):
* testing/lisp/test-ox.el (test-org-export/define-backend):
(test-org-export/define-derived-backend):
(test-org-export/derived-backend-p):
(test-org-export/get-all-transcoders):
(test-org-export/get-all-options):
(test-org-export/get-all-filters):
(test-org-export/with-backend): Apply renaming.
Since the variable is copiously used outside of "ox.el", there's no
reason to mark it as internal.
* lisp/ob-shell.el (org-babel-sh-evaluate):
* lisp/org-clock.el (org-x11idle-exists-p): Do not use last
`call-process-shell-command' arg.
* lisp/org-mouse.el (org-mouse-show-context-menu): Ignore
`redisplay-dont-pause'.
* lisp/org.el (org-icompleting-read): Fix typo. Small refactoring.
* lisp/ox-latex.el (org-latex-prefer-user-labels): Fix docstring.
(org-latex--label): Fix docstring. Do not add a spurious newline
character when generating "\\label" macro for a target.
(org-latex-link):
(org-latex-radio-target): Radio targets always use internal labelling
scheme.
Radio targets are visible in the document so they can contain
forbidden characters, and user cannot adapt them to naming
restrictions from a given back-end.
* lisp/ox-html.el (org-html-headline): Prefer raw CUSTOM_ID over
internal reference.
This is required for custom CSS and to link generated page from
outside Org. However, the user is responsible for not using forbidden
characters in its value.
* ox.el (org-export-get-reference): Change labeling scheme.
160820bc94 and later changed the label naming scheme to follow types.
This commit maps to types to more standard names, e.g. 'headline' to
'sec'.
* lisp/ox-publish.el (org-publish-collect-numbering):
(org-publish-resolve-external-fuzzy-link): Remove functions.
(org-publish--collect-references, org-publish-resolve-external-link):
New functions.
(org-publish-org-to): Use new functions.
* lisp/ox-html.el (org-html-link): Reflect changes above.
This patch extends `org-publish-resolve-external-fuzzy-link', now
known as `org-publish-resolve-external-link' to custom-id links and
dedicated targets.
* lisp/ox-latex.el (org-latex-prefer-user-labels): New variable.
(org-latex-custom-id-as-label): Remove variable.
(org-latex--label): New function.
(org-latex--caption/label-string):
(org-latex-headline):
(org-latex-inlinetask):
(org-latex-latex-environment):
(org-latex-link): Use new function.
* etc/ORG-NEWS: Document new variable.
This variable replaces, and generalizes,
`org-latex-custom-id-as-label'.
* lisp/org-footnote.el (org-footnote--allow-reference-p): Allow new
footnotes in headlines.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.
Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96843>
* lisp/org-mobile.org (org-mobile-copy-agenda-files): Escape org-mobile-checksum-binary.
Fix a bug where if the checksum binary is in a non shell-safe path, then
the shell invocation silently fails. This can happen on any platform but
is probably worst on Windows where it's common to put programs in
"C:/Program Files".
TINYCHANGE
* lisp/ox.el (org-export-dictionary): Fix Spanish translations,
including :ascii and :html properties. Also add :default Spanish
property for "References".
TINYCHANGE
* lisp/ox.el (org-export--get-inbuffer-options): Allow multi-line objects.
* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add
tests. Update some others.
It is possible to write, e.g.,
#+TITLE: *bold
#+TITLE: sentence*