* lisp/org.el (org-display-inline-image--width): When there is
#+attr_org defining :width, use it. Fall back to #+attr_<other>
otherwise. Update the docstring.
(org-image-actual-width): Improve docstring (credit: Matt Huszagh).
* etc/ORG-NEWS (Inline image width value in =#+attr_org= is preferred
over other =#+attr_...= keywords): Document the change.
Co-authored-by: Matt Huszagh <huszaghmatt@gmail.com>
Link: https://orgmode.org/list/871r2ucuhz.fsf@gmail.com
* lisp/org.el (org-indent-line): When indenting natively in src
blocks, call `indent-line-function' instead of relying upon "TAB"
binding doing indentation.
* lisp/ob-calc.el (org-babel-execute:calc): Use internal calc format
when assigning variable values that are numbers.
* testing/lisp/test-ob-calc.el (ob-calc/float-var): New test.
Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://orgmode.org/list/87edbu4kdh.fsf@gmail.com
* lisp/ol.el (org-link--link-folding-spec):
(org-link--description-folding-spec):
(org-link-descriptive-ensure): Remove.
(org-toggle-link-display): Rely upon font-lock to update link display.
* lisp/org-agenda.el (org-agenda-mode): Remove no-longer-necessary
org-fold initializer.
* lisp/org-fold.el (org-fold-initialize): Remove link-related fold
types.
(org-fold-show-set-visibility):
* lisp/org-src.el (org-src-font-lock-fontify-block):
* lisp/org.el (org-do-emphasis-faces):
(org-unfontify-region): Remove special handling of link folds.
* lisp/org.el (org-mode): Remove folding setup for links.
(org-activate-links--text-properties): Remove.
(org-activate-links): Honor `org-link-descriptive' dynamically.
This change reflects de-facto situation where we cannot use folding
system to hide links reliably. Even though we promise in Org 9.6 that
hidden parts of the link can be searched, the way it can be
implemented is not reliable and is working around upstream mechanisms.
Upstream changes are necessary to properly support isearch in text
hidden using text properties; workarounds attempted in org-fold-core
do not cut it because too many built-in Emacs libraries and also
third-party libraries rely upon internal implementation details of
isearch (due to limitations of its API).
We have a better performing cache mechanism in `org-entry-get'.
* lisp/org.el (org-make-tags-matcher): Replace uses of
`org-cached-entry-get' with `org-entry-get'.
(org-cached-entry-get): Move to ...
* lisp/org-compat.el (org-cached-entry-get): ... here. Obsolete in
favor of `org-entry-get'.
* lisp/org-ctags.el (org-ctags-create-tags): Escape shell specials.
Directory name (the argument or `default-directory') may contain various
characters interpreted by shell. Effects may vary from just incorrect
actual path to execution of a command embedded into path. Neither
double nor single quotes is a safe way to use directory name in shell
commands since the name may contain these characters.
A follow-up to
Martin Marshall. [PATCH] `org-ctags-create-tags` creates empty TAGS file.
Fri, 09 Feb 2024 18:57:48 -0500.
<https://list.orgmode.org/87h6ihgphf.fsf@martinmarshall.com>
* etc/ORG-NEWS: Announce the change breaking for `org-ctags' users and
provide init file code to enable the feature.
* lisp/org-ctags.el (org-ctags-enable): Do no invoke this function
during library loading. Collect all initialization code in its body.
Setting up hooks during library loading leads to various issues.
- Emacs coding conventions insist on incompatible changes if loading
a library modifies behavior, see
Info node `(elisp) Coding Conventions'.
- The library may be autoloaded for the sake of help completion
breaking `org-open-at-point':
Nick Dokos. org-ctags land grab. Mon, 20 Mar 2023 23:36:09 -0400.
<https://list.orgmode.org/87o7omg4ie.fsf@alphaville.usersys.redhat.com>
- Unrelated unit tests fail due to user prompt:
Ihor Radchenko. Re: [PATCH] org-ctags.el: Protect shell specials
in directory name. Sun, 28 Apr 2024 12:53:38 +0000.
<https://list.orgmode.org/87a5ldk5rh.fsf@localhost>
* lisp/org-ctags.el (org-ctags-unload-function): New function to cleanup
during `unload-feature' call.
(org-ctags--open-link-functions-list org-ctags-open-link-functions):
Define and use list of options available for `org-open-link-functions'.
(org-ctags--visit-tags-table): Give a name to remove the function from
`org-mode-hook' on library unload.
Prevent the following error after library unloading
Symbol’s function definition is void: org-ctags-find-tag
* lisp/org-table.el (org-table-convert-region): When detecting
delimiter in, do not unconditionally fall back to CSV parser. Only do
it when the line contains commas and use a simple single tab/space
split otherwise. Add new special delimeter-detection strategy when
SEPARATOR is 'babel-auto - convert to | full line | table instead of
falling back to tab/space split when the region contains a single
line.
* lisp/ob-core.el (org-babel-import-elisp-from-file): Force special
strategy when converting data to lisp.
The commit fixes the problem with first `re-search-forward' in the
`cond' moving point to end of the region, making the third `cond'
branch never match.
A special strategy specific to babel is necessary to preserve the
historic behavior with lines like
: single line with spaces
being converted to a single table cell
: | single line with space |
Reported-by: Matt <matt@excalamus.com>
Link: https://orgmode.org/list/18f24d87b62.d55e94e24743657.3252620114689708448@excalamus.com
* lisp/org-clock.el (org-clock-modify-effort-estimate): Autoload the
command. It is used in the agenda menu without loading org-clock, so
we must autoload it. Also, some users want to use the command before
clockin-in.
Link: https://orgmode.org/list/2fb82950-316e-4ebb-bb8b-a65b45e671eb@Spark
* lisp/ox-html.el (org-html-footnote-reference): When multiple
footnote references point to a single footnote, make sure that the
reference ids are not duplicated. Now, the ids for non-first
reference are constructed as fn.<footnote id>.<footnote reference
number>. The reference number of counted across all the footnote
references referencing the same footnote.
Reported-by: Protesilaos Stavrou <info@protesilaos.com>
Link: https://orgmode.org/list/87cyqcv9q1.fsf@protesilaos.com
* lisp/ox-html.el (org-html-footnote-section):
* lisp/ox-html.el (org-html-footnote-reference): When footnote has a
non-number name, build link anchors using this name.
* etc/ORG-NEWS (=ox-html=: When exporting footnotes with custom
non-number names, the names are used as link anchors): Announce the
change.
Link: https://orgmode.org/list/875xwngiwx.fsf@protesilaos.com
Co-authored-by: Protesilaos Stavrou <info@protesilaos.com>
* lisp/org-colview.el (org-columns--clean-item): Additionally process
the result with `org-quote-vert'.
(org-columns--capture-view): Remove call to `org-quote-vert'.
`org-columns--clean-item' is used when formatting and inserting column
view dynamic blocks. By moving the call to `org-quote-vert' to this
function, it can be used by all formatting functions, including
user-supplied ones, to format content to be safe for inclusion in a
table.
* lisp/org-colview.el (org-columns--capture-view): Add new link
parameter, which when non-nil causes ITEM headlines to be linked to
their origins.
(org-dblock-write:columnview): Pass new link parameter to
`org-columns--capture-view', and explain its use in the docstring.
* testing/lisp/test-org-colview.el (test-org-colview/dblock): Add
new test for link feature.
* doc/org-manual.org (Capturing column view): Describe new :link
parameter.
* etc/ORG-NEWS (=colview= dynamic block can link to headlines):
Describe new link feature.
* lisp/org-colview.el (org-dblock-write:column view): Factor out the
existing formatting code to new function
`org-columns-dblock-write-default', and honour new dblock parameter
:formatter for specifying a different formatting function.
(org-columns-dblock-write-default): New function with current
formatting code.
(org-columns--capture-view): Amend docstring to better explain the
format of the data being passed to the formatting function.
(org-clock-clocktable-formatter): New option to define a global
default formatting function, defaulting to the current behaviour.
* testing/lisp/test-org-colview.el (test-org-colview/dblock): New test
for formatting function.
(test-org-colview/dblock-formatter): New function used in formatting
test.
* doc/org-manual.org (Capturing column view): Describe new :formatter
parameter.
* etc/ORG-NEWS (New option ~org-columns-dblock-formatter~): Announce
new option.
(=colview= dynamic block supports custom formatting function):
Describe new custom formatting function feature.
* lisp/oc-biblatex.el: (org-cite-biblatex--package-options) Add support
for options in the native biblatex package format.
* doc/org-manual.org: Document the added format and add an example.
* etc/ORG-NEWS: Announce new format for #+cite_export biblatex options.
* lisp/ox-publish.el (org-publish-transient-cache): New transient
cache, used just during current publish process.
(org-publish-initialize-cache):
(org-publish-reset-cache): Initialize the transient cache.
(org-publish-cache-set-file-property): Add new optional argument to
store property in transient cache rather than persistent cache.
(org-publish-cache-get-file-property): Query transient cache first.
(org-publish-collect-index):
(org-publish-find-title):
(org-publish-find-date): Use transient cache.
This commit fixes situation when :title/:date/:index properties are
not updated even when the corresponding project file does get updated.
Link: https://emacs-china.org/t/org-mode-html/26896/2
* lisp/ox-man.el (org-man--protect-example): New helper function
protecting special escape characters inside literal examples.
(org-man-example-block):
(org-man-inline-src-block):
(org-man-src-block):
(org-man-table): Protect contents that is intended to be rendered
verbatim.
Reported-by: Greg Minshall <minshall@umich.edu>
Link: https://orgmode.org/list/2924644.1643637646@apollo2.minshall.org
* etc/ORG-NEWS
(New and changed options): Describe the new option
'org-babel-lua-multiple-values-separator'.
(New features): Describe the main change, as per the title of this
commit message.
* lisp/ob-lua.el
(org-babel-lua-multiple-values-separator): Enable the user to
customize the string that separates the individual values in
multi-valued returns.
(org-babel-lua-wrapper-method): Support all Lua types and multi-valued
returns. Further, do not pretty-print tables with one or more
extraneous newline characters.
(org-babel-lua-pp-wrapper-method): Remove in favor of the new, more
general 'org-babel-lua-wrapper-method'.
(org-babel-lua-evaluate-external-process): Adapt for the new
'org-babel-lua-wrapper-method'.
* testing/lisp/test-ob-lua.el
(test-ob-lua/colnames-yes-header-argument-pp):
(test-ob-lua/colnames-nil-header-argument):
(test-ob-lua/colnames-no-header-argument): Stop expecting extraneous
newlines, now that the pretty printer does not output them.
(test-ob-lua/types): Test nil, boolean, number, string, and table
results.
(test-ob-lua/multiple-values): Test multi-valued results.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Fix infinite loop
when the inline src block replacement is the same as the existing src
block.
(org-babel-exp-code): Support new placeholder %header-args for
non-default header arguments.
(org-babel-exp-inline-code-template):
(org-babel-exp-code-template): Change the templates to include header
arguments.
* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code):
(ob-exp/exports-inline-code-double-eval-exports-both):
(ob-export/export-with-results-before-block): Adjust tests.
* etc/ORG-NEWS (=ox-org= preserves header non-default arguments in src
blocks): Document the breaking change.
This change fixes ox-org export for src blocks. Previously src blocks
did not preserve their header arguments. Now, non-default header
arguments are preserved.
Link: https://github.com/emacsorphanage/ox-pandoc/issues/37
* lisp/ox-latex.el (org-export-define-backend): Add option.
(org-latex-default-footnote-command): New custom variable.
(org-latex-footnote-reference): Replace string "\\footnote{%s%s}"
with custom variable.
* etc/ORG-NEWS (New and changed options): Add description to option.
Some LaTeX classes define their own footnote commands. For example,
kaobook (https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.pdf)
has \footnotes and \sidenotes, whereby sidenotes (notes are put into
the outter margin) are the dominant form of putting notes in
kaobook. It would be great if you could make the footnote command in
the footnote function customizable. My proposal is in the attachment.
Modified from a feature request by Alexander Gogl.
Link: https://list.orgmode.org/m2v84fhj9u.fsf@gmail.com/T/#m71809443a3b328ed704712ba53e6bb78282249cc
TINYCHANGE
* lisp/org.el (org-paste-subtree): When called with single or double
universal argument, force inserting sibling heading or child heading
accordingly.
* testing/lisp/test-org.el (test-org/paste-subtree): Add tests for the
new behavior.
* doc/org-manual.org (Structure Editing): Update the command description.
* etc/ORG-NEWS (~org-paste-subtree~ now handles =C-u= and =C-u C-u=
prefix arguments specially): Announce the change.
Link: https://orgmode.org/list/878rhxtszb.fsf@localhost
* lisp/org.el (org-use-sub-superscripts): Update the docstring
explaining that (...) is understood as sub/superscript, even when
there are spaces inside. Add a note that the underlying markup is not
altered.
* lisp/ox.el (org-export-with-sub-superscripts): Link to the
`org-use-sub-superscripts' docstring instead of duplicating the
docstring text.
* doc/org-manual.org (Subscripts and Superscripts): Clarify the
differences between `org-export-with-sub-superscripts' and
`org-use-sub-superscripts'. Add a note that underlying markup does
not change.
Link: https://orgmode.org/list/87plvproor.fsf@localhost
* lisp/ox-odt.el (org-odt-link--inline-image): Fix file path expansion
code. Explicitly assert that the passed link must be a file
link (otherwise, the rest of the function logic does not make any
sense).
(org-odt-link): Remove special handling of http, https, ftp, and
mailto links, following the idea behind 72b0e9ff0. Fix coderef link
handling - they must use raw coderef, not coderef:<ref>.
Reported-by: Fraga, Eric <e.fraga@ucl.ac.uk>
Link: https://orgmode.org/list/87r0f3ndvy.fsf@ucl.ac.uk
* lisp/org-element.el (org-element-cache-map): Make sure that there is
always a cached element where we move START position.
* testing/lisp/test-org-element.el (test-org-element/cache-map): New
test.
Co-authored-by: Morgan Smith <Morgan.J.Smith@outlook.com>
* lisp/org.el (org-paste-subtree): When point is on heading, but not
at bol, paste using heading level minimal between current heading
level and next visible heading level.
* testing/lisp/test-org.el (test-org/paste-subtree): Add test cases.
Reported-by: Philipp Kiefer <phil.kiefer@gmail.com>
Link: https://orgmode.org/list/878rhxtszb.fsf@localhost
* lisp/org.el (org--speed-command-p): New helper function checking
whether current command is a speed command.
(org-self-insert-command): Use the new helper.
* lisp/org.el: In `delete-selection' property of
`org-self-insert-command' symbol, signal that selection must not be
deleted when current command is a speed command.
Reported-by: Joe Gilder <joe@homestudiocorner.com>
Link: https://orgmode.org/list/87il0voeok.fsf@localhost
* lisp/org-fold-core.el (org-fold-core--specs): Add new folding spec -
:font-lock. When non-nil, enable re-fontification of the folds.
(org-fold-core-region): Only trigger re-fontification when the folding
spec has :font-lock property.
* lisp/org-fold.el (org-fold-initialize): Only enable re-fontification
of folded outlines, drawers, and blocks.
This syntax has been introduced in Org 4.78, but not supported later,
when Org element parser have been created. Fix this omission to not
remove an existing (and announced!) feature.
This kind of clock is of limited use though - all the customizations
relying upon knowing _when_ clocking time was recorded, like ranges in
clock tables or limits on the displayed clocked-in time, will include
such clocks unconditionally. So, not adding this to the manual, as it
is not very clear how to use it in actual workflow.
* lisp/org-element.el (org-element-clock-line-re): Update the regexp.
(org-element-clock-parser): Do not assume that timestamp always
follows CLOCK: line.
* testing/lisp/test-org-element.el (test-org-element/clock-parser):
(test-org-element/clock-interpreter): Add tests checking parser and
interpreter output of clocks without timestamps.
Link: https://orgmode.org/list/87frvpyzrf.fsf@localhost
* lisp/ox-html.el (org-html-toc): When multiple TOCs are generated
inside the exported document, make sure that they do not have
duplicate IDs.
Reported-by: Michel Damiens <michel.damiens@gmail.com>
Link: https://orgmode.org/list/87sfj6av4t.fsf@localhost
* lisp/org-table.el (org-table-header-set-header): Display table
header even when the point is below the table, as long as the table is
visible at the top of the window.
* lisp/org-element.el (org-element-timestamp-parser,
org-element-timestamp-interpreter): Add support for repeater
deadlines. Adds two new properties: ':repeater-deadline-value' and
':repeater-deadline-unit'.
* testing/lisp/test-org-element.el (test-org-element/timestamp-parser,
test-org-element/timestamp-interpreter): Test support for repeater
deadlines.
* etc/ORG-NEWS: Add relevant news.