* lisp/org.el (org-closest-date): Rewrite function with less arguments.
Improve readability.
(org-time-string-to-absolute): Apply changes to `org-closest-date'.
Improve docstring.
* testing/lisp/test-org.el (test-org/closest-date): New test.
This change implies specific repeaters (i.e., ".+" and "++") are no
longer treated the same as regular one (i.e. "+") wrt
`org-agenda-repeating-timestamp-show-all'. Indeed, only the latter
represents multiple dates. The former represent another date only when
TODO state changes, which could then skip some occurrences.
This fixes issue raised at
<http://permalink.gmane.org/gmane.emacs.orgmode/101884> and
<http://article.gmane.org/gmane.emacs.orgmode/26154>.
* lisp/org-src.el (org-edit-src-code): Always preserve tabs not related
to indentation.
* testing/lisp/test-org-src.el (test-org-src/preserve-tabs): New test.
* lisp/org-macro.el (org-macro--collect-macros): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.
* lisp/org.el (org--setup-collect-keywords): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.
* lisp/ox.el (org-export--get-inbuffer-options,
org-export--list-bound-variables): cd to the directory containing the
SETUPFILE before recursing so that relative pathnames in the SETUPFILE
are expanded properly.
If /path/to/foo.org contains:
#+SETUPFILE: settings/beamer.org
and /path/to/settings/beamer.org contains:
#+SETUPFILE: common.org
then we want to read /path/to/settings/common.org, not
/path/to/common.org.
TINYCHANGE
* lisp/org-table.el (orgtbl-to-generic): Export macros as-is, even if
they are undefined.
* testing/lisp/test-org-table.el (test-org-table/to-generic): Add test.
Radio tables are now using a minimal set-up for export. In particular,
no macro is expanded, and no Babel code is executed. If any of these is
needed, use `org-export-string-as' or `org-export-region-as' instead.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100621>
* lisp/ob-tangle.el (org-babel-spec-to-string): Ignore invisible
characters when commenting in destination file.
* testing/lisp/test-ob-tangle.el (ob-tangle/comment-links-at-left-margin):
New test.
Reported-by: Rainer M Krug <Rainer@krugs.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/101002>
* lisp/ox.el (org-export--prepare-file-contents): Do not error when
including multiple footnotes with the same label.
* testing/lisp/test-ox.el (test-org-export/expand-include): Update test.
Reported-by: Leonard Randall <leonard.a.randall@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100906>
* lisp/org.el (org-add-planning-info): Do not remove too much
indentation when removing a planning line.
* testing/lisp/test-org.el: Add tests.
Reported-by: George McNinch <gmcninch@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100819>
* lisp/ob-core.el (org-babel-parse-src-block-match): Compute indentation
taking into consideration tab width.
(org-babel-where-is-src-block-result): Do not assume indentation
consists of white space characters only.
* testing/lisp/test-ob.el (test-ob/preserve-results-indentation): Add
test.
Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
<http://permalink.gmane.org/gmane.emacs.orgmode/100403>
* lisp/org-datetree.el (org-datetree-find-date-create): Ignore case and
discard false positives (e.g., a fake property in an example block).
* testing/lisp/test-org-datetree.el: New file.
* lisp/org-element.el (org-element-link-parser): Call
`org-link-translation-function' if required.
(org-element-link-interpreter): Build link from type and path instead of
simply pasting raw value.
* lisp/org.el (org-translate-link): Call parser to extract proper path
and type.
* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
Add test.
Reported-by: Sergei Nosov <sergei.nosov@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/100227>
* lisp/org-list.el (org-list-empty-line-terminates-plain-lists): Remove
variable.
(org-list-end-re):
(org-list-separating-blank-lines-number):
* lisp/org.el (org-blank-before-new-entry): Adapt to change above.
* testing/lisp/test-org-element.el (test-org-element/at-point):
* testing/lisp/test-org-list.el (test-org-list/move-item-down):
(test-org-list/move-item-up):
(test-org-list/insert-item): Update tests.
This variable is not useful: plain lists can always be terminated with
two blank lines.
* lisp/org-footnote.el (org-footnote-goto-definition): Move to location
appropriate for further editing.
* testing/lisp/test-org-footnote.el (test-org-footnote/delete): Update
test.
* lisp/org.el (org-return): Make sure to keep headline from being
invalidated by restricting positions where it can be split.
* testing/lisp/test-org.el (test-org/return): Add test.
* org.el (org-return): Check for links first when
`org-return-follows-link' is non-nil, before inserting any newlines.
* testing/lisp/test-org.el (test-org/return): Add test.
This patch restores order in which `org-return' perform actions (which
was changed in a7e62499f2).
TINYCHANGE
* lisp/org.el (org-entry-properties): Make sure case is meaningful when
matching a TODO keyword.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99756>
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check if an
entry can be blocked when it doesn't have any TODO keyword.
* lisp/org.el (org-entry-blocked-p): Make sure entry is really an open
task before even considering it as a blocked task. Small refactoring.
* testing/lisp/test-org.el (test-org/entry-properties): Update tests.
(test-org/entry-blocked-p): New test.
Reported-by: Bingo UV <right.ho@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99544>
* lisp/org-element.el (org-element-link-parser): Correctly parse links
with newline characters.
* lisp/org.el (org-make-link-regexps): Allow newline characters within
angle links.
(org-activate-angle-links): Support multiline angle links.
* testing/lisp/test-org-element.el (test-org-element/link-parser):
Update tests.
As a rule of thumb, any newline character and all surrounding
whitespaces are treated as a single space in a bracket link. They are
removed in angle links.
* lisp/org.el (org-open-at-point): Find radio targets again.
(org-search-radio-target): New function.
* testing/lisp/test-org.el (test-org/open-at-point/radio-target): New
test.
* lisp/org.el (org-beginning-of-line): Prevent an error when buffer
contains only a single star.
* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.
* lisp/org-clock.el (org-clock-special-range): Handle `untilnow'
range.
(org-clock--oldest-date): New variable.
(org-clock-display-default-range): Add `untilnow' as valid range. Use
new variable.
(org-clock-display): Offer `untilnow' as a possible range.
* doc/org.texi (The clock table): Document `untilnow'
* testing/lisp/test-org-clock.el (test-org-clock-clocktable-contents-at-point): Fix test
when called interactively.
(test-org-clock/clocktable):
(test-org-clock/clocktable1): Update tests.
(test-org-clock/clocktable-until-now): New test.
* etc/ORG-NEWS (title): Document new feature.
Suggested-by: Sébastien Vauban
* lisp/org.el (org-property--local-values): New function.
(org-entry-get): Use new function. Ignore global values when there is
no inheritance.
(org-entry-get-with-inheritance): Fix extended values, which do not
stop anymore inheritance search.
* testing/lisp/test-org.el (test-org/entry-get): Add tests.