* lisp/org.el (org--get-expected-indentation): Correctly indent line
when last element in an item is not a greater element.
* testing/lisp/test-org.el (test-org/indent-line): Add test.
* lisp/ob-python.el (org-babel-execute:python):
`org-babel-python-command` should be set before calling
`org-babel-python-initiate-session`.
TINYCHANGE
* lisp/ox.el (org-export-get-loc):
(org-export-unravel-code):
(org-export-format-code):
(org-export-format-code-default): Do not trim leading and trailing
blank lines from code during export.
* testing/lisp/test-ox.el (test-org-export/unravel-code): Update tests.
(test-org-export/format-code-default): Add tests.
Reported-by: Li DebugFan <debugfanli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113205>
* lisp/org-src.el (org-src--source-type):
(org-src--tab-width): New variables.
(org-src--edit-element): Set variables above.
(org-src--contents-for-write-back): Re-indent properly non-blank lines
before inserting contents back into the source buffer.
(org-edit-src-code): Delegate block indentation to
`org-src--contents-for-write-back'.
* testing/lisp/test-org-src.el (test-org-src/indented-blocks): New
test.
Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113207>
* lisp/org-clock.el (org-clock-get-table-data): Use `org-get-heading'.
Also, avoid calling `org-entry-properties' since getting "TIMESTAMP"
or "TIMESTAMP_IA" properties can be very slow.
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Store the redo
command in a text property so it is found correctly.
`org-agenda-redo' checks the `org-redo-cmd' text property, not
`org-agenda-redo-command'.
TINYCHANGE
* lisp/ob-C.el (org-babel-C-execute): Make sure name of compiled
program is converted to local representation before sending it to the
shell on remote host.
The problem was when one would try to evaluate C source code block in
the file on remote host. Compilation would go normally, then
evaluation would fail with error like "/bin/sh: unable to find file".
TINYCHANGE
* lisp/org-agenda.el (org-agenda):
(org-agenda-run-series): Do not restrict `tags-todo' searches to
non-DONE TODO keywords.
Reported-by: Kevin Foley <kfoley15@gmail.com>
* lisp/org-protocol.el: (org-protocol-do-capture) Don't push link to
kill-ring when invoking `org-protocol-capture'. Otherwise,
`org-protocol-do-capture' interferes with capture templates that
insert the contents of the clipboard or the kill ring.
* lisp/org-capture.el (org-capture--clipboards): New variable.
(org-capture-fill-template): Use new variable.
Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/113020>
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Do
not catch every error so as to ease old style support. Re-format
code to fit within 80 columns.
Reported-by: Adam Porter <adam@alphapapa.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/113102>
* lisp/org.el (org-todo): Fix explanation, if state change is blocked
by contained checkboxes.
Consider a node, which contains unchecked checkboxes; if you have set
org-enforce-todo-checkbox-dependencies and try to change the node to
DONE, you will be denied with a message explaining why. However in this
special case the explanation would be wrong in talking of an unrelated
node instead of the checkboxes.
The fix uses the already existing variable org-blocked-by-checkboxes
(which is handled in org-block-todo-from-checkboxes). Similar code is
already present in org-agenda-dim-blocked-tasks within org-agenda.el.
* lisp/org-clock.el (org-clock-get-table-data): Fix link creation with
headlines containing COMMENT or TODO keywords. Fix docstring.
Small refactoring.
Reported-by: "Stacey Marshall" <stacey.marshall@oracle.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113094>
* contrib/lisp/org-toc.el (org-toc-quit):
* lisp/org-mhe.el (org-mhe-follow-link): Use kill-buffer rather than
menu-bar.el's kill-this-buffer.
See Emacs bug#26466 and discussion on emacs.devel:
https://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00346.html.
This is in favor of backporting Emacs's 2e4f4c9d48 (Don't call
'kill-this-buffer' outside of menus, 2017-04-12), which introduces a
new function kill-current-buffer that provides special handling of
minibuffers.
(org-babel-sql-convert-standard-filename): If it is not in Cygwin
environment, and `system-nt' is "windows-nt", Emacs must be in minGW
or MSYS environment, and can handle Windows filename correctly.
TINYCHANGE
* doc/org.texi : Change reference to "cdn.mathjax.org" to "cdnjs.com",
removing comment about no longer relevant terms of service.
* lisp/ox-html.el (org-html-mathjax-options) : Change link to
appropriate cdnjs.com link to load MathJax.
Updating MathJax CDN links to reflect cdnjs.com as cdn.mathjax.org
will be disconitnued as of 30 April 2017.
TINYCHANGE
* lisp/org-element.el (org-element--object-lex): Fix parsing of radio
links within emphasis.
* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
test.
Reported-by: R C <recifx@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113063>
* lisp/org.el (org-forward-heading-same-level): Do not fail when
heading is at the beginning of the buffer.
* testing/lisp/test-org.el (test-org/forward-heading-same-level): New
test.
Reported-by: Rafael Laboissière <rafael@laboissiere.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/113084>
* lisp/org-agenda.el (org-agenda-write): Use default-directory of
export file. This is necessary for htmlize.el to write the correct
path to agenda icons.
* lisp/org-clock.el (org-dblock-write:clocktable): Preserve current
narrowing, if any, when building the table.
Reported-by: Christof Musik <ml-orgmode@litephone.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112872>
* lisp/ox-latex.el (org-latex--environment-type): New function
determining type of a latex-environment.
(org-latex-latex-environment): Add support for caption.
(org-latex--caption/label-string): Use correct type for non-floating
latex-environments.
* etc/ORG-NEWS: Add entry.
* lisp/ox-html.el (html, org-html-template)
(org-html-src-block): Allow to display source code block using
the klipse javascript plugin.
Thanks to Nicolas Goaziou for reviewing the patch.
* lisp/ox.el (org-export-as): Remove uninterpreted data from back-end
specific parsed keywords.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
This fixes 6cd42b08f9.
* lisp/org-agenda.el (org-agenda-list): Reset `org-agenda-buffer-name'
to the original name.
* testing/lisp/test-org-agenda.el: Pertaining unit test. + 2 basic
agenda tests.
* testing/examples/agenda-file.org: File to produce content for an
agenda to test.
* lisp/org.el (org-N-empty-lines-before-current): Do not hide newline
character before current headline.
* testing/lisp/test-org.el (test-org/insert-heading): Add test.
Reported-by: Rick Frankel <rick@rickster.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112751>
* doc/org.texi: Document the new capture templates target.
* lisp/org-capture.el (org-capture-upgrade-templates): New function.
(org-capture-templates): Implement the new file+olp+datetree target.
(org-capture): Document the C-1 prefix.
(org-capture-sanitize-olp): New function.
(org-capture-select-template): Make sure upgraded version of templates
variable is used.
* lisp/org-datetree.el (org-datetree-find-date-create): Accept
`subtree-at-point' as a value for the KEEP-RESTRICTION argument.
(org-datetree-find-iso-week-create): Accept `subtree-at-point'
as a value for the KEEP-RESTRICTION argument.
* lisp/org.el (org-find-olp): Throw an error when called in a
buffer that is not in Org mode.
* lisp/org-capture.el (org-capture-fill-template): Use overriding time
also in `?<>' escapes.
* lisp/ox-org.el (org-org--add-missing-sections): New function.
(org-org-section): Small refactoring.
Since footnote definitions are inserted in the section of the
headline, make sure those are not being skipped.
* lisp/ox-org.el (org-org-section): Also include references found in
headlines when inserting footnote definitions at the end of
a section.
Reported-by: WY H <jcjuly@outlook.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112678>
* lisp/ox.el (org-export--remove-uninterpreted-data): Do not modify
communication channel. Change "blob" to "datum".
(org-export--remove-uninterpreted-data-1): Remove function.
(org-export-as): Remove uninterpreted data from parsed keyword before
applying filters.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/112730>
* lisp/org-capture.el (org-capture-fill-template): Escape backslash
characters in %i contents when those are inserted within a S-exp.
Also prevent adding any prefix to %i contents spanning over multiple
lines when they are inserted within a S-exp.
* testing/lisp/test-org-capture.el (test-org-capture/fill-template):
Add tests.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112232>
* lisp/org-bbdb.el (org-bbdb-anniversary-description): New function.
(org-bbdb-general-anniversary-description-after): New variable.
(org-bbdb-anniversaries-future): Incorporate calculation of the description.
* lisp/ox-md.el (org-md--headline-referred-p): Try hard to limit
anchors for headlines really referred to, either globally, or
locally, in a table of contents.
(org-md-keyword): Add support for "TOC" keyword.
(org-md--build-toc): New function.
(org-md-inner-template): Use new function.
* lisp/org-attach.el (org-attach): Create a binding under 'u' to
attach a file from URL
(org-attach-url): Prompt user for URL
(org-attach-attach): Update method list
* doc/org.texi (Attachments): Document attaching from URL
TINYCHANGE
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Set default directory
prior to compiling the generated tex file.
Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112388>
* lisp/ox-html.el (org-html-verse-block): Add missing line break at
the end of each line in verse environments.
Reported-by: Skip Collins <skip.collins@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112537>
* lisp/ob-clojure.el (org-babel-execute:clojure): Use
`cider-current-ns' instead of `cider-current-session'.
org-babel-execute-clojure was calling nrepl-sync-request:eval and
nrepl-request:eval with the session ID as the 3rd argument when the
functions expected a clojure namespace.
TINYCHANGE
* lisp/org-agenda.el (org-deadline-past-days): New variable.
(org-scheduled-past-days): Set :safe keyword.
(org-agenda-get-deadlines): Use new variable.
* lisp/org-clock.el (org-dblock-write:clocktable): Funcall the scope
argument if it is a function.
* doc/org.texi: Document the feature of using a nullary function as the
scope for the clocktable.
* testing/lisp/test-org-clock.el: Adds a test for the above
feature. Also, fix the number of hours of a test that seemed to be
broken.
TINYCHANGE
* lisp/ob-core.el (org-babel-examplify-region): Escape Org syntax
before wrapping it.
* testing/lisp/test-ob.el (test-ob/org-babel-insert-result): Add test.
Renamed from `test-ob/org-babel-insert-result--improper-lists'.
Reported-by: D M German <dmg@turingmachine.org>
* lisp/org.el (org-fontify-quote-and-verse-blocks): Append faces. Use
`add-face-text-property'.
This means fontification of emphasis, links etc. is kept in quote and
verse blocks even with org-fontify-quote-and-verse-blocks non-nil.
TINYCHANGE
* lisp/org-duration.el (org-duration-to-minutes): Fix bug where the
same unit with a decimal unit would be matched multiple times.
* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
Fix test.
* lisp/org-agenda.el (org-agenda-prefer-last-repeat): Document special
behaviour for bare timestamps.
(org-agenda-get-timestamps): Show every past repeated event when
`org-agenda-prefer-last-repeat' is non-nil.
Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
<http://permalink.gmane.org/gmane.emacs.orgmode/111731>
* lisp/org-compat.el (org-time-clocksum-format):
(org-time-clocksum-use-fractional):
(org-time-clocksum-fractional-format):
(org-time-clocksum-use-effort-durations): Do not make an alias to
a variable with an incompatible value.
Reported-by: Achim Gratz <Stromeko@nexgo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112266>