* lisp/org.el (org-metaup, org-metadown): Throw a user error
explaining that dragging inline tasks is not supported.
* lisp/org-inlinetask.el (org-inlinetask-insert-task)
(org-inlinetask-promote, org-inlinetask-demote): Fix bug when
demoting/promoting inline tasks at the end of the buffer and
throw user errors instead of errors.
Based on an initial patch by Carsten.
Reported-by: Christian Hemminghaus <chrhemmi@gmail.com>
Link: https://orgmode.org/list/CAE47VC=yhObXs3jexLUkf53cNzcOWUkTMqpF8QK4Dcg98QijyQ@mail.gmail.com/
* lisp/org.el (org-stamp-time-of-day-regexp): Limit match group 2 to
first time.
* lisp/org-agenda.el (org-agenda-format-item): Compute duration before
formatting time with `org-get-time-of-day'.
* lisp/org.el (org-insert-heading): When inserting a headline
before the first one, insert a blank line after the inserted
heading if the previous call to `org--blank-before-heading-p'
returned `t'.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87y2cxoybz.fsf@gmail.com/
* lisp/org.el (org-indent-line): Fixes indentation.
(org--get-expected-indentation): Don't handle the 'headline-data
value for `org-adapt-indentation' here, it is taken care upstream
in `org-indent-line'.
* lisp/org.el (org-indent-line): When `org-adapt-indentation' is
'headline-data, prevent indentation for any first non-empty line
after the headline, not just the one right after the headline.
* lisp/org.el (org--get-expected-indentation): Fix indentation of
non-headllines with `org-adapt-indentation' set to 'headline-data.
(org-indent-line): When `org-adapt-indentation' is 'headline-data,
don't indent when point is at the first line after a headline.
Update the docstring to make it explicit that indenting relatively
to current level only happens when `org-adapt-indentation' is set
to `t'.
* lisp/org.el (org-set-font-lock-defaults): Avoid fontifying headlines
with "::" as description list items.
Lists can start with "*", but "*" must not be at the beginning of
line. Old regexp did not require whitespace before "*" in description
list items.
Reported-by: Ypo <ypuntot@gmail.com>
Link: https://orgmode.org/list/5adcfcda-35de-8281-a1ff-18d1c95bbde6@gmail.com/
* lisp/org.el (org-do-emphasis-faces): Don't hide with `org-link'
as the value for the invisible text property.
Before this commit, M-x org-toggle-link-display RET would also toggle
the emphasis markers.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87o8jnzjao.fsf@gmail.com/
* lisp/org.el (org-insert-heading): Fix bug when inserting a
heading before the first headline.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/875z73br32.fsf@gmail.com/
* lisp/org.el (org-display-inline-images): Guard image-map use with
boundp check rather than version check.
Guarding with a boundp will pacify the byte-compiler and is a direct
check that the thing we care about is available, so there's no need to
rely on the version check.
Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
* lisp/org.el (org-open-file): Select a pipe connection type with
process-connection-type rather than make-process, which isn't
available until Emacs 25.
This uses the alternative approach suggested by Eli Zaretskii in the
thread that led to 5db61eb0f (org.el: Avoid xdg-open silent failure,
2021-03-21): https://orgmode.org/list/83y2g96ta6.fsf@gnu.org
Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
* lisp/org-agenda.el (org-agenda-finalize):
(org-agenda-format-item): Do not downcase tags.
(org-downcase-keep-props): Remove unused function.
(org-agenda-filter-expand-tags): Do not case-fold search.
* lisp/org.el (org-tags-expand): Document `downcased' argument as
obsolete and do not allow to expand downcased tags.
* testing/lisp/test-org.el (test-org/tags-expand): Remove test for
downcased tags expansion.
* doc/org-manual.org (TODO keywords, tags, properties, etc.):
Suggest that user-defined are usually lowercase, but don't make it
a requirement.
Reported-by: David Masterson <dsmasterson92630@outlook.com>
Link: https://orgmode.org/list/SJ0PR03MB5455D8D0C4F71AA495A9ABF79B709@SJ0PR03MB5455.namprd03.prod.outlook.com/
* lisp/org.el (org--get-expected-indentation): Use
`org-element-lineage' to check whether the point is right at the
beginning of a logbook drawer.
Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87pmygnr7h.fsf@localhost
* lisp/org.el (org--get-expected-indentation): Fix indentation of
new notes in a logbook drawer when org-adapt-indentation is set to
'headline-data.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/878s9p4xtt.fsf@gnu.org/
* lisp/org.el (org-mode): Mark org-link-descriptive as buffer-local.
Calling org-toggle-link-display is an inherently buffer-local
operation because it works via the buffer-local
buffer-invisibility-spec, so toggling the global value leads to a
mismatched, invalid state in all other buffers.
Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Ref: https://orgmode.org/list/87lfeqzm3a.fsf@gmail.com
Reported-by: Ingo Lohmar <ingo.lohmar@posteo.net>
Ref: https://orgmode.org/list/87pmzdhl4b.fsf@kenko.localhost.com
* lisp/org.el (org-open-file): Use 'pipe :connection-type instead of
'pty to prevent killing of background process on handler exit.
(Bug#44824)
Problem happens only in some desktop environments where configured
through `org-file-apps' or mailcap handlers launches actual viewer
(as defined in .desktop files and obtained from mimeapps.list)
in background. E.g. xdg-open invokes "gio open" or kde-open5 for Gnome
or KDE accordingly and these handlers launches e.g. eog or okular in
background. As soon as main process exits, temporary terminal session
created by `start-process-shell-command' is terminated. As a result
background processes receive SIGHUP.
Previously command were executed with no buffer, so the change
does not affect "needsterminal" and "copiousoutput" mailcap features,
they are not supported as earlier.
If handler main process fails then show a message with exit reason.
Output (including error messages) is ignored as before.
Gtk application tends to report significant amount of failed asserts
hardly informative for majority of users.
TINYCHANGE
* lisp/org.el (org-adapt-indentation): Adjust :safe value for
headline-data, avoid unnecessary quote in :type value, and follow the
convention for quoting symbols in docstrings.
These show up in the Emacs repo (before and after the latest sync in
f22856a5c5), but for an unknown reason do not show up with `make
compile' or `make single' in the Org repo.
All of these functions are autoloaded.
* lisp/org.el (org-in-archived-heading-p): When called on a heading
with a tag containing org-archive-tag string as a substring, that
heading was incorrectly recognised as archived. Changed matching
against the whole :tag1:tag2:...: string to matching against tag list
as returned by `org-get-tags'.
* testing/lisp/test-org.el (test-org/in-archived-heading-p): Add test
when one of the heading tags contains org-archive-tag as a substring.
* lisp/org.el (org-optimize-window-after-visibility-change): Reset
org-scroll-position-to-restore if it is not a repeated call.
The org-scroll-position-to-restore variable is used to save the
position, but the position may be from a cycling sequence other than
the current one. Reset it at the start of a sequence.
* lisp/org.el (org-optimize-window-after-visibility-change): Guard
against calling set-window-start with a nil POS argument.
org-optimize-window-after-visibility-change calls set-window-start
with org-scroll-position-to-restore when it is a repeat call
(i.e. last-command and this-command match). However,
org-scroll-position-to-restore may not have yet been set yet (e.g. if
org-startup-folded is at its default value of showeverything).
Calling set-window-start appears to generally be a noop, but, for a
reason that I don't understand, it triggers a hang when %p is in
frame-title-format.
Reported-by: Massimo Lauria <massimo.lauria@uniroma1.it>
Ref: https://orgmode.org/list/CAJCFsEEHJXP4nKZpWdzheMM5O0Dq-tT+v0u0FsT+3Q0mi4v10A@mail.gmail.com
* lisp/org.el (org-fixup-indentation): Don't call indent-line-to with
a negative value.
* testing/lisp/test-org.el (test-org/promote):
(test-org/demote): Add tests.
The handling added in 11ef7454a (org.el (org-fixup-indentation): Fix
logbook drawers indentation, 2020-09-07) calls indent-line-to with a
value equal to the sum of current indentation and the DIFF argument,
but this can lead to a type error because DIFF may be negative.
Note that, aside from the headline-data test cases, the added tests on
top of the parent of e3b79ad2b (Allow a new value for
`org-adapt-indentation', 2020-02-09), which added the initial logbook
special case to org-fixup-indentation.
Reported-by: Duianto <otnaiud@gmail.com>
Ref: https://orgmode.org/list/CAE-tX7i5ew3ED3YX6jjx57qNuRtV0AumWKuE0W83YUUReKE5-g@mail.gmail.com
Reported-by: stardiviner <numbchild@gmail.com>
Ref: https://orgmode.org/list/CAL1eYuKObYzY2MHSQ+W08mW3TZ+83H45teOq_rHq9qz7-FEgKw@mail.gmail.com
* lisp/org.el: Don't require 'font-lock'; it is preloaded since
version 22.1.
Remove redundant requires of 'font-lock'
0a4aa2894297c0fd9e735328bbb60b427e0ba5d4
Stefan Kangas
Thu Dec 3 08:50:14 2020 +0100