* lisp/org.el (org-indent-line): Fix when we are within blank lines
after heading. ELEMENT is then `heading' and looking at :begin - 1
does not make sense.
* testing/lisp/test-org.el (test-org/indent-region): Add test.
Reported-by: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Link: https://orgmode.org/list/d7129804-1f42-ea2b-85e8-18ea1ee32d73@vodafonemail.de
* lisp/org-element.el (org-element-cache-map): Fix when DATA is
obsolete after buffer modification.
* testing/lisp/test-org.el (test-org/map-entries): Add test.
Reported-by: Victor A. Stoichita <victor@svictor.net>
Link: https://orgmode.org/list/87v8fzxbfo.fsf@svictor.net
* lisp/org.el (org-insert-todo-heading-respect-content): Do not force
first TODO keyword in the inserted heading. Instead, accept prefix
arguments and pass them directly to `org-insert-todo-heading'.
* etc/ORG-NEWS (~org-insert-todo-heading-respect-content~ now accepts
prefix arguments): Document the change.
*
testing/lisp/test-org.el (test-org/insert-todo-heading-respect-content):
Add tests.
Reported-by: Xuan Wang <xuan.public@gmail.com>
Link: https://orgmode.org/list/CALjN2yehOVYZuU+tURes+mJ5XyTrRY1O0UG1ijH-6TjJ=W0ibw@mail.gmail.com
* lisp/ob-C.el (org-babel-C-val-to-C-type): Floats should be printed
as string literals to prevent rounding introduced by %f format.
* testing/lisp/test-ob-C.el (ob-C/float-var): Test that floats are not
rounded when passed as an org :var.
* lisp/ob-C.el (org-babel-C-val-to-C-type): Floats should be printed
as string literals to prevent rounding introduced by %f format.
* testing/lisp/test-ob-C.el (ob-C/float-var): Test that floats are not
rounded when passed as an org :var.
* lisp/org-clock.el (org-clock-special-range): Prevent returning
previous week for `thisweek' KEY when WSTART is 0. Treat both 0 and 7
as Sunday.
* testing/lisp/test-org-clock.el (test-org-clock/special-range): New
test for `thisweek' and various WSTART arguments.
It seems only the case of weeks starting on Monday was tested.
Other variants caused shifted intervals.
Bug report: Marcin Borkowski. What is a week?
Mon, 10 Apr 2023 05:35:44 +0200.
<https://list.orgmode.org/87h6to1ka7.fsf@mbork.pl>
* lisp/oc.el (org-cite-list-bibliography-files): When the bibliography
path is relative to the exported file location, keep the path
relative. Resolve relative paths for bibliographies from SETUPFILE as
well.
* testing/lisp/test-oc.el (test-org-cite/list-bibliography-files):
* testing/examples/sub-bib/include-relative-bib.org:
* testing/examples/sub-bib/include-global-bib.org: New test.
Link: https://orgmode.org/list/CAO48Bk_upR4h-xd0YL+FxeKtWvDoqH+Eju6F_Vzds_m6oxBKcg@mail.gmail.com
* lisp/org.el (org-time-stamp-formats):
(org-timestamp-formats):
(org-time-stamp-rounding-minutes):
(org-timestamp-rounding-minutes):
(org-time-stamp-custom-formats):
(org-timestamp-custom-formats):
(org-time-stamp):
(org-timestamp):
(org-time-stamp-inactive):
(org-timestamp-inactive):
(org-insert-time-stamp):
(org-insert-timestamp):
(org-toggle-time-stamp-overlays):
(org-toggle-timestamp-overlays):
(org-time-stamp-to-now):
(org-timestamp-to-now):
* lisp/ox.el (org-export-time-stamp-file):
(org-export-timestamp-file): Rename using "timestamp" term, keeping
the old name as alias.
* doc/org-manual.org: Update all the uses, adding #+findex and
#+vindex entries. Keep the alias names for searchability.
Adjust all the callers.
The following "time-stamp" uses are unchanged:
1. `org-time-stamp-format' where obsolete and _different_ function
`org-timestamp-format' still exists.
2. :time-stamp-file property in export INFO plist. Changing this
would be breaking.
3. ORG-NEWS remains unchanged.
Also, do not use [^\000] as a poor-man's replacement for
(rx (or any newline)).
* lisp/ob-core.el (org-babel-src-block-regexp):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs):
* lisp/org-compat.el (org-hide-block-toggle-all):
* lisp/org-element.el:
* lisp/org-feed.el (org-feed-read-previous-status):
(org-feed-parse-rss-feed):
(org-feed-parse-rss-entry):
* lisp/ox-org.el (org-org-publish-to-org):
* testing/lisp/test-ob-tangle.el:
* lisp/org.el (org-block-regexp):
(org-clock-drawer-re): Use \(.\|\n\) regexp instead of [^\000].
(org-latex-regexps): Do not try to match \000 inside latex fragments -
we now use parser for this purpose.
Reported-by: Tommy Kelly <tommy.kelly@verilab.com>
Link: https://orgmode.org/list/875yfk9vlv.fsf@localhost
* doc/org-manual.org (Exporting): Add cindex entry for both "backend"
and "back-end" for better searchability.
All other changes are trivial.
Note that `org-element-export-snippet-parser' will still use :back-end
property. So will ox.el in INFO channel.
(ob-session-async-R-simple-session-async-output):
(ob-session-async-R-named-output):
(ob-session-async-R-output-drawer): Force no truncation of output
lines in ESS. Otherwise, the expected output may be split into
multiple lines.
Note that we do not want to override the output splitting outside
tests - this is what users may prefer for :results output. And
:results value is not affected.
Link: https://orgmode.org/list/87ilduqrem.fsf@localhost
* testing/lisp/test-ob-fortran.el (ob-fortran/wrong-list):
(ob-fortran/compiler-flags): Uncomment the tests, making sure that
error buffer is displayed.
Fixes issue where the ox-icalendar export uses an inconsistent mix of
dos and unix style line endings.
* lisp/ox-icalendar.el (org-icalendar-fold-string): No longer converts
to CRLF, instead delegating that to `org-icalendar--post-process-file'.
(org-icalendar--post-process-file): New function to handle exported
file post-processing. Converts EOL to CRLF, and then runs
`org-icalendar-after-save-hook'.
(org-icalendar-export-to-ics, org-icalendar-export-current-agenda,
org-icalendar--combine-files): Call `org-icalendar--post-process-file'
instead of running `org-icalendar-after-save-hook' directly.
* testing/lisp/test-ox-icalendar.el: New file for unit tests of
ox-icalendar. Add an initial test for CRLF line endings.
See also:
https://list.orgmode.org/87o7oetneo.fsf@localhost/T/#m3e3eb80f9fc51ba75854b33ebfe9ecdefa2ded24https://list.orgmode.org/orgmode/87ilgljv6i.fsf@localhost/
* ob-shell.el (org-babel-sh-evaluate): Add condition for async within
session. Allow :async header argument to be either t or blank.
* test-ob-shell.el:
(test-ob-shell/session-async-valid-header-arg-values): Check that
:async header works for both t and blank values.
(test-ob-shell/session-async-inserts-uuid-before-results-are-returned):
Check that UUID is used as placeholder until results return.
(test-ob-shell/session-async-evaluation): Check that asynchronously
evaluated results are eventually placed in the buffer.
Link: https://list.orgmode.org/186283d230a.129f5feb61660123.3289004102603503414@excalamus.com/
* lisp/org-element.el (org-element-headline-parser): Allow empty title
with tags. Do not consider space after COMMENT to be a part of title.
*
testing/lisp/test-org-element.el (test-org-element/headline-todo-keyword):
Add tests.
Reported-by: Leo Butler <Leo.Butler@umanitoba.ca>
Link: https://orgmode.org/list/87zg8t4zgo.fsf@localhost
* lisp/org-element.el (org-element-headline-parser): Allow end of line
instead of space after todo keyword.
*
testing/lisp/test-org-element.el (test-org-element/headline-todo-keyword):
Add new test.
* lisp/org-clock.el (org-clock-get-clock-string): End the mode line
element in a space, instead of beginning with space, to make it play
well with other mode line strings, which typically end a space. For
reference, see the mode line string of the Display Time mode.
* lisp/org-element.el (org-element-set-contents): Do alter anonymous
elements (el1 el2 ...). Such elements are used, for example, when
parsing keyword values during export, like :title.
* testing/lisp/test-org-element.el (test-org-element/set-contents):
Add test.
The patch fixed bug during export when exporting a subtree with
option stat:nil. The :title during subtree export is taken from the
heading title and parsed. However, the parsed value is stored outside
the parse tree, in :title property of the INFO channel. The parsed
value does get filtered through `org-export--prune-tree', but before
this commit, `org-element-set-contents' did not actually alter the
out-of-AST-tree parent lists of elements.
Reported-by: Leo Butler <Leo.Butler@umanitoba.ca>
Link: https://orgmode.org/list/87mt4w8epo.fsf@t14.reltub.ca
* lisp/ob-table.el (org-sbe): Allow quoting string values of variables
with "$". Update the docstring.
* testing/lisp/test-ob-table.el (test-ob-table/sbe): Add test. Do not
use `org-test-at-id' in favor of more illustrative
`org-test-with-temp-text'. The latter does not force users to search
the ID in reference Org file.
* testing/examples/babel.org (calling code blocks from inside table):
Remove unused example.
Reported-by: 赵一宇 <zhyznd@163.com>
Link: https://orgmode.org/list/40651be0.3e3b.1867971e644.Coremail.zhyznd@163.com
* lisp/org.el (org-metaup):
(org-metadown): When active region contains headings, move the
containing subtrees according to the selection. Do not deactive
region.
* testing/lisp/test-org.el (test-org/move-subtree): Add test.
* etc/ORG-NEWS (~org-metaup~ and ~org-metadown~ now act on headings in
region): Announce the new features.
* lisp/org-element.el: Query cache variables from the base buffer.
They are only kept up-to-date there.
* testing/lisp/test-org.el (test-org/map-entries): Add test.
Reported-by: Hanno Perrey <hanno@hoowl.se>
Link: https://orgmode.org/list/87pmau4fi3.fsf@hoowl.se
* lisp/org-element.el (org-element-cache-map): Never map over element
starting before the point manually moved (or set via
`org-element-cache-map-continue-from') by FUNC.
* testing/lisp/test-org.el (test-org/map-entries): Add tests.
Reported-by: Matthieu Caneill <matt@brokenwa.re>
Link: https://orgmode.org/list/Y9MKUzWWbErLFhmq@brokenwa.re
* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session): Do not assert that octave must not
emit warnings. Just test the file created by side effect.
We currently have no reliable way to disambiguate warnings from
non-zero exit code when using `org-babel-eval'. Warnings are ok, as
long as they do not result in the file not being created in the test.
Link: https://orgmode.org/list/87mt6m5n6u.fsf@localhost
* testing/lisp/test-ob-shell.el (test-ob-shell/remote-with-stdin-or-cmdline):
Work around non-local exit when running tests on Emacs 26. Do no call
`kill-matching-buffers' unless Emacs in newer.
* lisp/org-capture.el (org-capture-finalize): Do not save the newly
created file buffer when the capture is aborted and org-capture is not
asked to save upon capture.
* testing/lisp/test-org-capture.el (test-org-capture/abort): Add test.
* org-datetree.el (org-datetree--find-create): Add optional argument
MATCH-TITLE that controls whether to match REGEX-TEMPLATE against
heading title inside complex heading or to match REGEX-TEMPLATE
against the whole heading line.
* org-datetree.el (org-datetree--find-create-group,
org-datetree-find-iso-week-create): Allow finding a datetree with TODO
state, priority, tags, statistics cookies, or COMMENT keyword.
* testing/lisp/test-org-datetree.el
(test-org-datetree/find-date-create,
test-org-datetree/find-iso-week-create): Add tests for a datetree with
tags, TODO or priority keywords.
* etc/ORG-NEWS (Datetree structure headlines can now be complex):
Document the change.
* doc/org-manual.org: Update datetree definition.
* lisp/org.el (org-paste-subtree): Remove the whole line when level
indicator is provided. Improve check for level indicator.
* testing/lisp/test-org.el (test-org/paste-subtree): Add test.
Reported-by: Philipp Kiefer <phil.kiefer@gmail.com>
Link: https://orgmode.org/list/a2cc49d3-7f65-5f6a-8f05-21e5056335b3@gmail.com
* lisp/org-refile.el (org-refile): Use dedicated marker (move after
insertion) to store position of the heading being refiled. Otherwise,
if refiled heading is inserted at the same point, `save-excursion'
would restore point before the inserted heading instead of keeping it
at the original heading.
* testing/lisp/test-org.el (test-org/refile): At test.
Reported-by: /u/madclassix