* 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--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/ob-R.el (org-babel-R-evaluate-session): New implementation for session output
results, that concat "^" to comint-prompt-regexp to avoid prompt
confusion with R.
Patch suggested by Jack Kamm:
https://orgmode.org/list/87h7slgbi5.fsf@gmail.com/
* 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-colview.el (org-columns): Prevent enabling `truncate-lines'
when `global-visual-line-mode' is enabled.
This fixes a bug where `org-columns' overlays were disabling wrapping
of lines when `global-visual-line-mode` was already activated, and so
therefore expectation was that the lines would continue wrapping.
This is because `org-columns' was setting truncate-lines to t, when
global-visual-line-mode requires it to be set to nil. The interaction
between the two caused the wrapping not to occur.
* lisp/org-colview.el (org-columns): Prevent enabling `truncate-lines'
when `global-visual-line-mode' is enabled.
This fixes a bug where `org-columns' overlays were disabling wrapping
of lines when `global-visual-line-mode` was already activated, and so
therefore expectation was that the lines would continue wrapping.
This is because `org-columns' was setting truncate-lines to t, when
global-visual-line-mode requires it to be set to nil. The interaction
between the two caused the wrapping not to occur.
* lisp/ox-ascii.el (org-ascii-template--document-title): Find width of
title with `string-width' instead of counting characters.
Fixes: #48148
Reported-by: Shingo Tanaka <shingo.fg8@gmail.com>
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Group
collected blocks by tangled file name.
(org-babel-tangle): Avoid quadratic behavior in number of blocks and
set modes before writing to file.
* testing/lisp/test-ob-tangle.el (ob-tangle/block-order): Update test.
* lisp/org-agenda.el (org-agenda-show-new-time): Add fallback for when
window-font-width isn't available.
efbf96389 (org-agenda.el: Fix display of agenda new time, 2020-02-02)
reworked the column calculation to use window-font-width, but that
function isn't available until Emacs 25, and it's definition can't be
easily ported to org-compat.
Instead just use the old logic, which had been in place since v8.2.6,
when window-font-width isn't available.
Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
* lisp/ob-C.el (org-babel-C-header-to-C): Switch pcase patterns to
"`X" rather than "'X", which isn't supported until Emacs 25.
These were introduced by 38f87a26b (ob-C.el: Fix a number a
regressions related to table parameters, 2021-04-29).
Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
* 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-read-date-analyze): Add support for HHhMM time
input, in similar way as for am/pm times.
* doc/org-manual.org (The date/time prompt): Add example to illustrate
the feature.
TINYCHANGE
* lisp/ob-core.el (org-babel-result-end): Alloow the result to end
into a LaTeX environment.
By adding latex-enviroment to the possible results types, a much
richer experience is possible for backends that can produce
LaTeX-formatted maths as their results (for example: Calc, Julia with
Latexify, Python with SymPy, Octave with symbolic). This is superior
to a LaTeX export block as LaTeX environments can be (1) rendered
inline, and (2) better used in non-LaTeX export formats (e.g. HTML
with MathJax). Without this, backends can output a LaTeX environment,
but new results will be added in front instead of replacing the
environment.
* lisp/org-src.el (org-src--coordinates)
(org-src--goto-coordinates): Use point instead of column.
Using a column-based approach fails to account for invisible regions
or display overlays that change the number of columns: for example,
showing a LaTeX \alpha as α. In src edits which involve such
structures, this causes the point to be shifted undesirably. By using
a point-based approach this issue does not occur.
* lisp/org-clock.el (org-clocktable-write-default): When ':formula %'
is in-effect, show the per-file time percentage in the '%' column.
TINYCHANGE
This change only has an effect when multiple files are contributing to
a given clocktable (such as when ':scope agenda' has been specified).
The existing behavior is that such tables have an extra 'File' column,
and each individual file that contributes has its own summary line
with the headline value '*File time*'. Those summary rows also
produce a rollup time value for the file in the 'Time' column.
Prior to this change, the built-in '%' formula does not produce a
calculation for those per-file times in the '%' column (the relevant
cells in the '%' column were blank). With this change, the percentage
contribution of each individual file time to the total time is shown.
The more agenda files you have, the more useful this behavior becomes.
Signed-off-by: Alan D. Salewski <ads@salewski.email>