* 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>
* lisp/ob-plantuml.el (org-babel-plantuml-svg-text-to-path): New option.
(org-babel-execute:plantuml): Use the new option to add a SVG-specific
post-export step that runs inkscape text-to-path replacement over
the output file.
TINYCHANGE
* lisp/org.el (org-ctrl-c-ctrl-c): Fix bug.
Commit aea31b065 introduced a bug: C-c C-c on a row of a table that
has no #+plot line, (org-element-property :post-affiliated context)
would return nil, so we first need to check whether we are on a #+plot
line.
* lisp/org-agenda.el (org-agenda-filter)
(org-agenda-get-represented-tags)
(org-agenda-filter-make-matcher-tag-exp): Make tags filtering
case-sensitive.
This fixes a bug introduced in commit 13a1a4fb9.
* lisp/ox-html.el (org-html-standalone-image-p): Remove quote which
causes `org-html-standalone-image-p' to not check if
`org-html-standalone-image-predicate' is fbound and see if it's
initialized.
TINYCHANGE
* 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
* ob-eval.el (org-babel-eval): Improve documentation and rename local
variables to be consistent with `org-babel--shell-command-on-region'
* (org-babel--shell-command-on-region): Remove START and END as
parameters.
* (org-babel--shell-command-on-region): Refactored out parts of
function to `org-babel--write-temp-buffer-input-file' and `org-babel--get-shell-file-name'.
This removes two parameters from
`org-babel--shell-command-on-region'. It appears that START and END
were parameters only because shell-command-on-region has them. This
function is only called by org-babel-eval so it looks safe to remove
those parameters, since they are always (point-min) and (point-max)
and are never changed. Given the way the function works and that it
is, it is unlikely that any user code relies on it.
* ob-C.el (org-babel-C-expand-C, org-babel-C-header-to-C,
org-babel-C-expand-D): Add a `TYPE' parameter to
`org-babel-C-header-to-C' so that the helper functions return the
correct type. Previoulsy for tables of non-strings the helper
functions would attempt to return a string, leading to compilation
errors.
* ob-C.el (org-babel-C-header-to-C): Correctly quote header elements.
Before, if the elisp value was not a string, it would not quote it,
leading to a syntax error.
* ob-C.el (org-babel-C-utility-header-to-C): Include `string.h' in
header `get_column_num' requires `strcmp', leading to compilation
errors.
* ob-C.el (org-babel-C-var-to-C): prefered declaration of a table in D
differs from C and C++. Example in C: `int table[2][3] = ...;'. In D:
`int[3][2] table=...;'
This patch is mainly based on Asa Zeren <asaizeren@gmail.com> patch of
Nov 5 2020, which was not commited at that time.
* lisp/org-plot.el (org-plot/gnuplot): `ignore-error' was introduced
in Emacs 27, and Org's minimum supported Emacs is 24. So, to maintain
compliance I replaced the `ignore-error' call with a `condition-case`.
* lisp/ox.el (org-export--get-global-options,
org-export-insert-default-template): Use lexical-binding.
(org-export--generate-copy-script): Return a closure rather than
list starting with `lambda`.
(org-export-async-start): Turn it into a function (there seems to be
no reason this was a macro). Use `write-region` rather than
`with-temp-file`. Always use `utf-8-emacs-unix` coding system since
it's more efficient and is guaranteed to handle all chars.
Use lexical-binding in the temp file as well.
Actually set `debug-on-error` if `org-export-async-debug` says so.
(org-export-to-buffer, org-export-to-file): Pass a closure rather than
list starting with `lambda` to `org-export-async-start`.
* doc/org-manual.org (Installation): Do not document installation
through Org ELPA or an archive as these installation methods will
become obsolete after Org 9.5.
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Avoid
incorrect regexp in check whether command line argument uses new syntax.
Fix failures of org-protocol tests.
Question mark was not escaped in the previous version 928e67df7e,
so any string was matched by lazy "*". Match in never used,
thus `string-match-p` would be better, but actually regexp is redundant
here.
It is not documented what browser or desktop environment adds extra
slash before "?". Accordingly to
mid:A2B0655F-BF28-4943-BC05-99021BFDA1B3@robewald.de, Windows may be
involved. Likely it happens with double slash after schema as in
org-protocol://capture?url=URL&title=TITLE due to subprotocol is
considered as host name and URI is normalized by adding a slash
as mandatory path part before "?" query. So just reverting the original
commit will likely cause a regression. Another guess is that
with single or triple slash (org-protocol:/capture?url=URL)
subprotocol is a part of path thus no "smart" actions are necessary.
* testing/lisp/test-org-protocol.el
(test-org-protocol/org-protocol-store-link-file,
test-org-protocol/org-protocol-capture-file): Add tests to document
that existing calls to `org-protocol-sanitize-uri' could make passed
URLs invalid by changing number of slashes after scheme.
Till a fix of the problem the new tests are marked as expected failures.
Unless a relatively recent commit 5748615c48, I would believe that
`org-protocol-sanitize-uri' was added by mistake to the initial
implementation. Capture URLs are anyway escaped with percent encoding.
* testing/lisp/test-org-protocol.el
(test-org-protocol/org-protocol-parse-parameters): Specify that the case
simulating real life capture uses new style parameters string
to prevent test failure.
It looks like a typo survived since addition of this case in 2216f4d2c7.
* lisp/ox-html.el (org-html-style-default): `authinfo-mode' is defined
in Emacs 27. As such, in the CSS add an "Authinfo" lang label to
authinfo src blocks.