* lisp/org-footnote.el (org-footnote-at-reference-p):
(org-footnote-at-definition-p): Rewrite using Elements library.
(org-footnote-get-next-reference): Use `org-footnote-at-reference-p'.
(org-footnote-next-reference-or-definition): Use old definition for
`org-footnote-at-definition-p' and `org-footnote-at-definition-p'.
This patch aims at reducing the calls to the inaccurate
`org-footnote-in-valid-context-p' function. However,
`org-footnote-next-reference-or-definition' still uses it because the
function is for fontification only, so 1. accuracy matters less
2. Elements has a slower worse case scenario.
* lisp/org-footnote.el (org-footnote-goto-previous-reference): Only
add to mark ring on a successful match. Improve error message when
reference is outside visible part of buffer.
(org-footnote-get-next-reference): Avoid using
`org-footnote-at-reference-p', which is inaccurate, due to
`org-footnote-in-valid-context-p'.
* testing/lisp/test-org-footnote.el (test-org-footnote/goto-previous-reference):
New test.
* lisp/org-agenda.el (org-agenda-mode): Factored out a function for a
loop occuring two times.
* testing/lisp/test-org-agenda.el: test the text scale after
agenda-undo.
* lisp/ob-core.el (org-babel-sha1-hash): Add optional argument to
specify context.
(org-babel-execute-src-block): Use new argument.
* lisp/ob-exp.el (org-babel-exp-src-block): Use new argument.
(org-babel-exp-results): Fix context.
Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00117.html>
* ob-scheme.el (org-babel-execute:scheme): Process the :result header
argument to conditionally and appropriately format output.
Currently, `org-babel-execute:scheme' ignores the user specified :result header
argument found in the :result-param parameter and process all output as a table.
The fix is to pass the `result' and :result-param to the `org-babel-result-cond'
function to invoke the corresponding formatting.
For example, the following block incorrectly formats its output as a table:
(list 1 2 3)
| 1 | 2 | 3 |
This patch results in the correct behavior:
(list 1 2 3)
: (1 2 3)
Bringing it inline with the result using Emacs lisp:
(list 1 2 3)
: (1 2 3)
* lisp/org-agenda.el (org-agenda-show-and-scroll-up): Properly display
drawers when SPC is pressed. Hide them again with a universal
prefix argument.
Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00254.html>
* lisp/org-capture.el (org-capture-finalize): Possibly update formula
when inserting the captured rows in the table.
* testing/lisp/test-org-capture.el (test-org-capture/table-line): Add
tests.
Reported-by: "Holst Thomas (PS-EC/ESE4)" <Thomas.Holst@de.bosch.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00276.html>
* lisp/org-agenda.el (org-agenda-mode): Save and restore local
variables text-scale-mode-amount, text-scale-mode,
text-scale-mode-lighter, face-remapping-alist. In effect
this keeps the text-scale at agenda rebuild and redo.
This commit is predicated on the newsgroup post of Samuel Wales "point
moves and zoom level reverts when refreshing agenda" at Sun, 27 May
2018.
* lisp/org.el (org--align-tags-here):
(org-set-tags): Modify buffer only when necessary.
* testing/lisp/test-org.el (test-org/set-tags): Add tests.
Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00242.html>
* doc/org-manual.org (Export Setup): Shorten author field, which was
larger than the width of the page, and not fair to all the people
involved in the manual.
* doc/org-manual.org (Subscripts and Superscripts):
(Initial visibility):
(Durations and time values):
(TODO dependencies):
(Tracking your habits):
(Deadlines and Scheduling):
(Literal Examples):
(The Export Dispatcher):
(Export Settings):
(Include Files): Fix typos.
* lisp/org.el (org-read-property-value):
* lisp/org-capture.el (org-capture-fill-template): Sidestep
`org-set-property'. Use previous function and `org-entry-put'
instead.
Reported-by: Eric Danan <eric.danan@u-cergy.fr>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00061.html>
* lisp/org.el (org-metaup): Do not leave a character behind when
transposing regions.
(org-metadown): Fix "Transposed regions overlap" error.
Reported-by: Adam Porter <adam@alphapapa.net>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00184.html>