* lisp/org-table.el (org-table-duration-custom-format): Add new
HH:MM format.
(org-table-duration-hour-zero-padding): New option.
(org-table-eval-formula): Select second-less format if
requested.
(org-table-time-seconds-to-string): Implement formats without
seconds and without zero-padding for hours.
* testing/lisp/test-org-table.el (test-org-table/duration):
New test for second-less durations.
* doc/org.texi (Formula syntax for Calc)
(Durations and time values): Document the U mode switch.
* lisp/org.el (org--file-cache): New variable.
(org-reset-file-cache):
(org-file-url-p): New function.
(org-mode-restart): Use new function.
* lisp/org.el (org-file-contents): Allow the FILE argument to be a
URL. If the URL contents are already cached, return the cache
contents, else download the file and return contents of that. The
file is automatically cached each time it is downloaded. Add a new
optional argument NOCACHE. If this is non-nil, the URL is always
downloaded afresh. Use `org--file-cache' and `org-file-url-p'.
* lisp/org.el (org-edit-special): Do not allow editing the "file" if a
URL is specified for the "#+SETUPFILE".
* lisp/ox.el (org-export--list-bound-variables)
(org-export--prepare-file-contents):
* lisp/org-macro.el (org-macro--collect-macros) : Adapt to the
possibility that the input to `org-file-contents' can be a URL too.
* doc/org.texi (Export settings, In-buffer settings)
(The very busy C-c C-c key): Mention that #+SETUPFILE keyword can now
take a URL as a value, and that C-c C-c on the #+SETUPFILE line will
clear the org file cache.
* testing/lisp/test-org.el (test-org/org-file-contents-url)
(test-org/org-file-contents-file): Add tests for org-file-contents.
* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add
test for reading setupfile specified via a URL.
* lisp/ob-shell.el (org-babel--variable-assignments:bash): Do not
error when value is a list.
* testing/lisp/test-ob-shell.el (ob-shell/simple-list): New test.
Reported-by: Keith Amidon <camalot@picnicpark.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/113920>
* lisp/org-src.el (org-edit-footnote-reference): Do not collapse
footnote definitions after editing remotely one of them.
* testing/lisp/test-org-src.el (test-org-src/footnote-references): New
test.
* lisp/org-macro.el (org-macro-replace-all): Expand macros only within
narrowed part of buffer.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Update
test.
Expanding macros outside in the whole buffer could make sense, e.g.,
if a macro expands to some Babel code, which, in turn, is evaluated
prior to export. However, by principle of least surprise, it is
better to limit expansion to current accessible part of the buffer.
* lisp/org-clock.el (org-clocktable-write-default): Limit number of
time columns to the deepest headline level.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/maxlevel):
Update tests.
* lisp/org-macro.el (org-macro--counter-table): New variable.
(org-macro--counter-initialize):
(org-macro--counter-increment): New functions.
(org-macro-initialize-templates): Use new functions.
* doc/org.texi (Macro replacement): Document new macro.
* testing/lisp/test-org-macro.el (test-org-macro/n):
(test-org-macro/property): New tests.
* lisp/org-capture.el (org-capture-finalize): Remove blank lines
number fix, which only applies to narrowed capture buffers.
(org-capture-insert-template-here):
(org-capture-place-plain-text):
(org-capture-place-item):
(org-capture-place-entry): Do not hard-code number of blank lines
after entry.
Reported-by: Igor Perepelytsya <igorquail@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113093>
Reported-by: Jay Dresser <jay@jaydresser.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/113449>
* lisp/org.el (org-fill-element): New function.
(org-fill-paragraph): Use new function. Also handle region, when
called interactively.
* testing/lisp/test-org.el (test-org/fill-element): Renamed from
test-org/fill-paragraph. Update tests.
Reported-by: Oskar Kvist <oskar.kvist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113542>
* lisp/org.el (org-store-link): When a double C-u prefix argument is
given, do not reverse the meaning of the org-context-in-file-links
option.
* testing/lisp/test-org.el (test-org/store-link): Add tests.
This allows the user to fall back to the core link storing functions
without also reversing their org-context-in-file-links preference,
because wanting to do the former does not mean a user also wants to do
the latter.
Reported-by: York Zhao <gtdplatform@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-05/msg00254.html>
* lisp/org-colview.el (org-columns--displayed-value): When value is
a number and a format string is specified, apply it.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
Add tests.
Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113547>
* lisp/org-element.el (org-element-context): Do not parse timestamps
within planning line.
* testing/lisp/test-org-element.el (test-org-element/context): Remove test.
Strictly speaking, timestamps within planning lines are parameters
values that use timestamp syntax, not real timestamps belonging to the
document contents.
* lisp/org-element.el (org-element-latex-fragment-parser):
* lisp/org.el (org-latex-regexps): Allow an apostrophe right after
a fragment.
* testing/lisp/test-org-element.el (test-org-element/latex-fragment-parser):
Add test.
In Text mode, and, as a consequence, in Org mode, "'" is not treated
as punctuation, but as word constituent. The apostrophe isn't caught
by "\s." regexp.
Reported-by: Joe Corneli <holtzermann17@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113464>
* lisp/org.el (org-N-empty-lines-before-current): Insert empty lines
before point, not after.
* testing/lisp/test-org.el (test-org/insert-heading): Add test.