* lisp/org.el (org-set-tags-command): Only fix cursor position in very
specific circumstances (i.e., when cursor is on an empty headline).
* testing/lisp/test-org.el (test-org/set-tags-command): Add tests
related to point position.
Modified-by: Kyle Meyer <kyle@kyleam.com>
Adjusted for review comments and added tests.
* lisp/org.el (org-dynamic-block-insert-dblock): Add an interactive-p
argument that is non-nil for interactive calls and signals to call the
dynamic block function interactively.
org-clock-report takes a prefix argument. When it had a regular
binding, this was easy to access. As of 34b71a0ca (Add a dispatcher
command for inserting dynamic blocks, 2018-12-23), its only "binding"
is through the dynamic block dispatcher. Make it possible to supply a
prefix argument in that context too.
* lisp/org-clock.el:
* lisp/org-colview.el: Autoload call to org-dynamic-block-define.
The dynamic block dispatcher added in 34b71a0ca (Add a dispatcher
command for inserting dynamic blocks, 2018-12-23) offers an entry for
"clocktable" and "columnview" only after the corresponding library is
loaded. However, before that commit, the autoloaded org-clock-report
and org-columns-insert-dblock commands were accessible via plain key
bindings. Restore the ability to access these commands before the
associated library is loaded.
Reported-by: Axel Kielhorn <org-mode@axelkielhorn.de>
<3CE37EF0-6C7A-4CC0-AFEE-2B82296D63E1@axelkielhorn.de>
* lisp/ox-odt.el (odt): Delete a repeated entry for :odt-styles-file
and absorb its org-odt-styles-file, which had no effect due to the
repeated entries, into the first definition.
TINYCHANGE
* lisp/org-id.el (org-id-overriding-file-name): New variable.
(org-id-get): Prefer org-id-overriding-file-name over the buffer's
file name if set.
(org-id-locations-load): Give a more informative error when file is
nil.
* lisp/org.el (org-clone-subtree-with-time-shift): Let-bind
org-id-overriding-file-name, enabling an ID to be created for a cloned
subtree rather than crashing with a type error.
Note that, before 9865e6bd8 (org-id: Speedup, minor functional change
and fix, 2019-08-01), this wouldn't fail with a type error. However,
the ID would not be added correctly because org-id-add-location simply
wouldn't process the ID at all if the passed file was nil.
Reported-by: Ian Eure <ian@retrospec.tv>
<87a73caayj.fsf@phaktory>
* lisp/ob-core.el (org-babel-remove-temporary-directory):
Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to
match anything but "." and "..".
Fix edge case errors in filename-matching regexps
4acdd7fe58ae9f94102afeca67b0383141d597da
Mattias Engdegård
Tue Apr 14 12:25:16 2020 +0200
Note(km): Replaced bare "." with (any ".") for Emacs < 27
compatibility. 4acdd7fe5 was on the emacs-27 branch, but a commit on
their master (d5a7df8c0) will supersede this.
* lisp/org-table.el (org-table-delete-column): Do not assume row ends
right after the last vertical line. Do not use `looking-back'.
* testing/lisp/test-org-table.el (test-org-table/delete-column): Add
test.
* lisp/org-table.el (org-table-delete-column): Stay in the column at
delete. Exceptionally allow column delete when point is at eol
immediately to the right of a cell seperator.
A hint by Eric S Fraga led to this commit.
https://lists.gnu.org/archive/html/emacs-orgmode/2020-04/msg00283.html
* lisp/org-table.el (org-table-insert-column): Adjust the function to
insert the column at point (and not to the right.)
Org-manual, ORG-NEWS and testing are changed accordingly.
* lisp/org.el (org-time-stamp-inactive): Drop incorrect statements in
docstring about differences between inactive and active timestamps.
S-cursor commands work on inactive time stamp, and clicking on an
inactive time stamp visits the day in the agenda, just as it does for
an active time stamp.
Reported-by: Jorge P. de Morais Neto <jorge@disroot.org>
<87a73gstpz.fsf@disroot.org>
* lisp/org-agenda.el (org-agenda-get-scheduled): Revert changes from
39c656870, which introduced a regression that prevents repeating tasks
from appearing for future dates.
The regression, reported in late February, seems likely to affect more
users than the one-time delay handling fixed by 39c656870
(org-agenda.el: Fix handling of one-time delays, 2020-02-01). As we
don't have a proposed fix at the moment, let's revert 39c656870.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
<87imjqdtpo.fsf@gmail.com>
* lisp/org-list.el (org-list-insert-item): Fix typos. Add a check to
determine if an item really belongs to the part being split.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add test.
* lisp/org-list.el (org-list-insert-item): This is a followup to
1ae1f8f2df. It fixes an error when
insertion happens after the last item in the list.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add test.
These both show up when compiling files separately (e.g., 'make
single').
ob-core already assumes ob-tangle is loaded based on declared
functions, presumably because ob.el is given responsibility for
collectively loading these pieces. org.el loads org-attach within the
body of a function before calling org-attach-dir.
* lisp/org.el (org-set-tags-command): Also avoid using `looking-back',
in particular without a LIMIT argument. This silences the
byte-compiler.
(cherry picked from commit 83518daf11)
* lisp/org-list.el (org-list-insert-item): Do not infloop when
insertion happens in an item, after a sub-list. Small refactoring.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add
tests.
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Combine filter
forms with `and' unless multiple positive categories are given.
06cf532f4 (org-agenda.el: Fix bug when using category filters,
2020-01-20) modified org-agenda-filter-make-matcher to group the form
with `or' rather than `and' for category filters. This logic was
tweaked again in a follow-up commit, 7e52b7661 (org-agenda: Fix logic
of `org-agenda-filter-make-matcher', 2020-02-19), which was supposed
to restrict the use of `or' to _multiple_ positive categories.
However, the follow-up commit incorrectly affected all filter types.
Avoid the check for non-category types.
Also, fix the regexp so that it matches whenever there are multiple
positive categories, not just a single one.
Reported-by: Jorge P. de Morais Neto <jorge+list@disroot.org>
<87v9nhit6c.fsf@disroot.org>
* lisp/ob-core.el (org-babel-result-end): Handle results in special
blocks.
* testing/lisp/test-ob.el (test-ob/replace-special-block-result): New
test.
* lisp/org-attach.el (org-attach-delete-all): Use `force' arg
throughout function.
`org-attach-delete-all` advertised a `force` option but passing it
only forced its way past the initial "Really remove all…" query. This
was unexpected and not properly documented.
This extends the use of the `force` argument to the `delete-directory`
call and documents its meaning in the docstring.
TINYCHANGE
* lisp/org.el (org-set-tags-command): Fix point position after
setting tag at the beginning of a blank heading.
(org-kill-line): Prevent from throwing an error when killing
the headline while point is right after the * chars.
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Fix
logic: only use 'or when including several categories as e.g.
'("+cat1" "+cat2").
This fixes 06cf532f4.
* lisp/org-compat.el ("calendar"): Require 'org-agenda before
adding `org--setup-calendar-bindings' to `calendar-mode-hook'.
This fixes Emacs bug#38592.
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Don't use
an overlay to make the task invisible, use text properties.
(org-agenda--mark-blocked-entry): Add text property
'org-filter-type to later use `org-agenda-filter-hide-line' if
necessary.
(org-agenda-filter-hide-line): Fix docstring.
The related bug was first reported in 2013 by Matt Lundin here:
https://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00072.html
Then Andrew Hyatt reported it again, and provided a minimal recipe on
how to reproduce it consistently.
Thanks a lot to both of them.