* lisp/ob-core.el (org-babel-read): When reading "string", ignore
leading/trailing newlines in addition to spaces.
* testing/lisp/test-ob.el (test-ob/org-babel-read): Add more tests.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/v15lva$hhl$1@ciao.gmane.io
* lisp/ob-core.el (org-babel-expand-noweb-references): After closing
comment, when using :comments noweb, leave trailing newline after the
closing comment.
* testing/lisp/test-ob-tangle.el (ob-tangle/comment-noweb-relative):
Modify test to check for the newline.
Reported-by: João Pedro <jpedrodeamorim@gmail.com>
Link: https://orgmode.org/list/87fruy2rw6.fsf@ergo
* lisp/ob-core.el (org-babel-read): Fix naive regexp for matching
escaped quotes. Instead, check if `read' can read the whole CELL in
one go.
* testing/lisp/test-ob.el (test-ob/org-babel-read): Add tests.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/v10k4s$et9$1@ciao.gmane.io
* lisp/org-agenda.el (org-agenda-get-timestamps):
* lisp/org-element.el (org-element--timestamp-regexp): Adjust
timestamp regexp.
(org-element-timestamp-parser): Support the new syntax for diary sexp
timestamps. The diary sexp is now stored in :diary-sexp property and
the time/time range is stored as usual.
(org-element-timestamp-interpreter): Interpret diary timestamp
according to its building blocks rather than raw value.
* testing/lisp/test-org-agenda.el (test-org-agenda/diary-timestamp):
New test checking for agenda support of times in diary timestamps.
*
testing/lisp/test-org-element.el (test-org-element/timestamp-interpreter):
Add parser tests.
* doc/org-manual.org (Timestamps): Add an example of the new syntax to
the manual.
* etc/ORG-NEWS (Diary type timestamps now support optional
time/timerange): Document the Org syntax addition.
This syntax modification is fixing an omission in org-element.el. In
the past, org-agenda had explicit support for diary timestamps with
time/timerange, but that support was ad-hoc. Now, after org-agenda
switched to use parser, we must modify Org syntax to fix the feature
regression.
* lisp/org.el (org-indent-line): When attempting to indent as in major
mode, ignore any errors, like errors arising when the major mode is
not available.
* 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.
* lisp/ol.el (org-insert-link):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
* lisp/org-attach.el (org-attach):
* lisp/org-clock.el (org-clock-select-task):
* lisp/org-goto.el (org-goto-location):
* lisp/org-macs.el (org-mks):
* lisp/org-table.el (org-table-fedit-finish):
* lisp/org.el (org-offer-links-in-entry):
* lisp/ox.el (org-export-dispatch): Arrange the dialogue window to be
killed when it is displayed in a new frame.
`save-window-configuration' is not enough in such scenarios. Use
`quit-window' instead.
* lisp/org-table.el (org-table-edit-formulas): Prohibit popping up
table editor in a new frame. This is because the major mode for
formula editing makes assumptions about where the editor window is
located and does not work reliably in a separate frame.
Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://orgmode.org/list/87jzlcoxuq.fsf@
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): When :session
is provided, signal error - sessions are not supported.
(org-babel-prep-session:emacs-lisp): Signal error when trying to
switch to session.
Reported-by: Adam Sneller <adam@earth2adam.com>
Link: https://orgmode.org/list/871qoe8k9e.fsf@localhost
* lisp/org.el (org-offer-links-in-entry): When selection is aborted
via C-g, kill *Select Link* buffer. This is useful when the location
of the buffer is customized via `display-buffer-alist' to be not in
the same frame - then, `save-window-configuration' is not enough get
rid of the temporary window.
* lisp/org-macs.el (org-display-buffer-split): New function to display
just the new buffer and current buffer visible in the frame. To be
used as `display-buffer' ACTION parameter.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
(org-agenda-fit-window-to-buffer):
(org-agenda-prepare-window):
(org-agenda-switch-to):
* lisp/org-capture.el (org-capture-place-template):
* lisp/org-goto.el (org-goto-location):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org.el (org-tree-to-indirect-buffer):
(org-fast-todo-selection):
(org-add-log-note):
(org-fast-tag-selection):
(org-submit-bug-report):
* lisp/ox.el (org-export--dispatch-ui): Get rid of calling
`delete-other-windows' manually. Instead, make use of
`org-display-buffer-slip' + `pop-to-buffer'/`display-buffer'. This
way, user overrides in `display-buffer-alist' are honored.
* lisp/org-plot.el (org-plot/gnuplot):
* lisp/org.el (org-offer-links-in-entry): When `delete-other-windows'
cannot be avoided, make it ignore errors in the frames where
displaying a lone window is forbidden.
* lisp/org-colview.el Add defcustom
`org-columns-checkbox-allowed-values'.
(org-columns-next-allowed-value): Introduce variable
`org-columns-checkbox-allowed-values'.
This would allow to use more than two states ("[ ]", "[X]") in columns
with SUMMARY-TYPE that use checkbox ("X", "X/", "X%"). For example
you can add an intermediate state ("[-]"). Or empty state ("") to
remove checkbox.
* etc/ORG-NEWS: New option ~org-columns-checkbox-states~.
* lisp/org-clock.el (org-clock-find-position):
* lisp/org-compat.el (org-flag-drawer):
* lisp/org-src.el (org-edit-src-exit):
* lisp/org.el (org-log-beginning): Do not force 'outline folds when
`org-fold-core-style' is 'overlays. The erroneous logic dates back to
the time when all the folding was done via 'outline folds to save up
on the number of overlays in buffer. This is not longer the case -
newer Emacs no longer struggle with number of overlays and we fall
back to using text properties in older Emacs.
Reported-by: Bruno Cardoso <cardoso.bc@gmail.com>
Link: https://orgmode.org/list/87sezzmd1m.fsf@gmail.com
* lisp/ox-odt.el (org-odt-item): When exporting table inside a list,
fix scenario when the table is located inside a sub-list of another
list.
Reported-by: Christian Moe <mail@christianmoe.com>
Link: https://orgmode.org/list/87edxn9z7n.fsf@localhost
* lisp/org-element.el (org-element--cache-after-change):
`org-element--cache-after-change' already changes
`org-element--cache-change-warning' by side effect. No need to assign
it.
* lisp/ox-html.el (org-html-htmlize-generate-css): Fix not adding
faces without :inherit property to the generated css. Update the
docstring, detailing that the css class names are the face names with
`org-html-htmlize-font-prefix' prepended.
* lisp/org-element.el (org-element--object-lex): Prioritise underline
parser over subscript. `org-element-underline-parser' is more strict
compared to `org-element-subscript-parser'.
* testing/lisp/test-org-element.el (test-org-element/underline-parser):
Add test.
* etc/ORG-NEWS (Underline syntax now takes priority over subscript
when both are applicable): Announce the breaking change.
Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
Link: https://list.orgmode.org/87v8z52eom.fsf@posteo.net/T/#t
* lisp/org.el (org-create-math-formula):
(org-format-latex-as-html): Shell-quote LaTeX fragment text when
replacing %i placeholder. This prevents shell expansion of
$... and similar constructs inside the code.
(org-latex-to-mathml-convert-command):
(org-latex-to-html-convert-command): Update the docstring.
* etc/ORG-NEWS (~org-latex-to-mathml-convert-command~ and
~org-latex-to-html-convert-command~ shell-escape LaTeX code): Announce
the breaking change.
* doc/org-manual.org (LaTeX math snippets): Update example.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/735645dd-1ddf-4579-a6dd-2700f3e83c94@gmail.com
* lisp/org.el (org--collect-keywords-1): When `expand-file-name'
handler errs on #+SETUPFILE, ignore it. An error may be thrown when
by custom file handler (for example, by TRAMP handler on GVFS path
when `tramp-gvfs-enabled' is nil; which is the default).
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/uue18j$j42$1@ciao.gmane.io
* lisp/org.el (org-set-font-lock-defaults): Apply 'org-special-keyword
face to commented headings last, so that every markup inside look dim,
as per 'org-special-keyword face.
* lisp/org-src.el (org-fontify-inline-src-blocks-1):
* lisp/org.el (org-fontify-macros):
* lisp/org.el (org-activate-footnote-links):
(org-set-font-lock-defaults): Prepend faces during
activation instead of overriding. Add a comment explaining the
general rule how we combine faces.
* etc/ORG-NEWS (Org mode faces are now consistently combined, with
markup faces taking precedence over the containing element faces):
Document the breaking change.
Reported-by: StrawberryTea <look@strawberrytea.xyz>
Link: https://orgmode.org/list/875xy21e49.fsf@localhost
* lisp/ob-comint.el (org-babel-comint-with-output): Replace logic for
prompt and echo filtering with `org-babel-comint--prompt-filter' and
`org-babel-comint--echo-filter'. Delete
`org-babel-comint-prompt-separator' variable and move related comment
to `org-babel-comint--prompt-filter'.
* lisp/ox-html.el (org-html-inline-image-rules): Add AVIF image
support for inline images on HTML export.
AVIF is well supported by browsers these days and offers similar
features and much better compression than the other image formats
commonly used for the web.
TINYCHANGE
Create commands for `org-read-date-minibuffer-local-map' for use in
place of the inline lambda commands in order to aid user discoverability.
* org.el (org-calendar-goto-today-or-insert-dot)
(org-calendar-goto-today, org-calendar-backward-month)
(org-calendar-forward-month, org-calendar-backward-year)
(org-calendar-forward-year, org-calendar-backward-week)
(org-calendar-forward-week, org-calendar-backward-day)
(org-calendar-forward-day, org-calendar-view-entries)
(org-calendar-scroll-month-left, org-calendar-scroll-month-right)
(org-calendar-scroll-three-months-left)
(org-calendar-scroll-three-months-right): New functions.
* org-keys.el (org-read-date-minibuffer-local-map): Use the new
functions for keybindings instead of inline functions.
TINYCHANGE
* lisp/org.el (org--latex-preview-when-risky): New variable
controlling how to handle LaTeX previews in Org files from untrusted
origin.
(org-latex-preview): Consult `org--latex-preview-when-risky' before
generating previews.
This patch adds a layer of protection when LaTeX preview is requested
for an email attachment, where `untrusted-content' is set to non-nil.
* lisp/org-macro.el (org-macro--set-templates): Get rid of any
risk to evaluate code when `org-macro--set-templates' is called as a
part of major mode initialization. This way, no code evaluation is
ever triggered when user merely opens the file or when
`mm-display-org-inline' invokes Org major mode to fontify mime part
preview in email messages.
* lisp/ox.el (org-export--smart-quote-status): When quotes are not
balanced, treat " literally and ' as apostrophes.
* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes): Fix
test with unbalanced " and add new tests for unbalanced quotes.
Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
Link: https://list.orgmode.org/orgmode/875xxfqdpt.fsf@posteo.net/
* lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
always use the specified shell language
Sessions are initialized using `shell'. The `shell' command checks
`explicit-shell-file-name' for file to use before checking other
variables, like `shell-file-name'. Previously, only `shell-file-name'
was set. So, if the user had set the `explicit-shell-file-name',
session blocks would use that whereas non-session blocks would use
`shell-file-name', resulting in inconsistent behavior. This change
sets both variables so that even if the user changes the
`explicit-shell-file-name' or `shell-file-name', blocks will only use
the shell language specified by the block.
TINYCHANGE
* lisp/org-persist.el (org-persist--check-write-access): New function
checking write access to creating a directory and all the necessary
parents. The function is a refactoring of duplicated code that
previously checked one parent beyond what needs to be created.
(org-persist-write:index): Use the new function. Create
`org-persist-directory' together with all its parents. Gracefully
handle failure.
* lisp/org-persist.el: Use the new function when adding hooks to
`kill-emacs-hook'.
Reported-by: Al Oomens <aloomens@outlook.com>
Link: https://list.orgmode.org/MW4PR19MB6888F37194BA260AE5631770C4332@MW4PR19MB6888.namprd19.prod.outlook.com
* lisp/org-persist.el (org-persist--check-write-access): New function
checking write access to creating a directory and all the necessary
parents. The function is a refactoring of duplicated code that
previously checked one parent beyond what needs to be created.
(org-persist-write:index): Use the new function. Create
`org-persist-directory' together with all its parents. Gracefully
handle failure.
* lisp/org-persist.el: Use the new function when adding hooks to
`kill-emacs-hook'.
Reported-by: Al Oomens <aloomens@outlook.com>
Link: https://list.orgmode.org/MW4PR19MB6888F37194BA260AE5631770C4332@MW4PR19MB6888.namprd19.prod.outlook.com
* lisp/org.el (org-create-math-formula): Avoid using
`find-file-noselect' to check contents of the generated mathml
formula. `find-file-noselect' runs a number of hooks, which are not
necessary and may sometimes throw errors.
Link: https://orgmode.org/list/ut96a7$i6d$1@ciao.gmane.io
* lisp/ox-beamer.el (org-beamer--format-frame, org-beamer-template):
Only use `org-beamer-frame-environment' when a frame is marked as
fragile and the frame's contents include either \begin{frame} or
\end{frame}. When `org-beamer-frame-environment' is used and not
equal to "frame", add the property :beamer-define-frame to INFO and
set it to t. When that property is t, `org-beamer-template' emits a
definition of the alternative frame environment.
Refs: https://list.orgmode.org/orgmode/87bk7jeik8.fsf@localhost/https://list.orgmode.org/87a5nux3zr.fsf@t14.reltub.ca/T/
* lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
always use the specified shell language
Sessions are initialized using `shell'. The `shell' command checks
`explicit-shell-file-name' for file to use before checking other
variables, like `shell-file-name'. Previously, only `shell-file-name'
was set. So, if the user had set the `explicit-shell-file-name',
session blocks would use that whereas non-session blocks would use
`shell-file-name', resulting in inconsistent behavior. This change
sets both variables so that even if the user changes the
`explicit-shell-file-name' or `shell-file-name', blocks will only use
the shell language specified by the block.
TINYCHANGE
A table with MxN dimensions is converted to a MxN matrix when given in
:var to a Calc source block. A table with a single row is converted
to a vector (i.e., row vector).
* lisp/ob-calc.el (org-babel-execute-src-block:calc): Construct the
right data structure to pass tables as matrices to Calc.
* testing/lisp/test-ob-calc.el: Add tests for ob-calc, and this new
feature.
* etc/ORG-NEWS: Announce the feature.
* mk/default.mk (BTEST_OB_LANGUAGES): Enable ob-calc tests by default.
* lisp/org-macs.el (org-with-file-buffer): New macro switching to a
file buffer temporarily and killing it if a buffer visiting file did
not exist previously.
(org-file-buffer-created): New variable set when buffer visiting file
has been created.
* lisp/ob-tangle.el (org-babel-tangle-file):
* lisp/org-archive.el (org-archive-subtree):
* lisp/org-refile.el (org-refile):
(org-refile-check-position):
(org-refile-new-child):
* lisp/ox-org.el (org-org-publish-to-org):
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-find-property): Avoid calling `find-buffer-visiting' +
`find-file-noselect'. The latter calls the former. Instead, either
just call `find-file-noselect' or use `org-with-file-buffer'.
This commit addresses O(N_buffers) complexity in
`find-buffer-visiting', reducing the number of calls to it.
See Emacs bug#66117.
* lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
always use the specified shell language
Sessions are initialized using `shell'. The `shell' command checks
`explicit-shell-file-name' for file to use before checking other
variables, like `shell-file-name'. Previously, only `shell-file-name'
was set. So, if the user had set the `explicit-shell-file-name',
session blocks would use that whereas non-session blocks would use
`shell-file-name', resulting in inconsistent behavior. This change
sets both variables so that even if the user changes the
`explicit-shell-file-name' or `shell-file-name', blocks will only use
the shell language specified by the block.
Submitted by: "Aaron L. Zeng" me@bcc32.com
TINYCHANGE
* lisp/org.el (org-insert-property-drawer): When folding style is
overlays, do not use outline folds to fold the property drawer.
Reported-by: Bruno Cardoso <cardoso.bc@gmail.com>
Link: https://orgmode.org/list/87wmq5btzn.fsf@gmail.com
* lisp/org-src.el (org-src-font-lock-fontify-block): Improve the translation
of local positions into org-buffer positions, and get rid of
assumption about the value of `point-min' while we're at it.
* lisp/org.el (org--warnings): New variable storing Org mode warnings
to be submitted together with bug reports.
(org-submit-bug-report): Add `org--warnings' to bug report template.
* lisp/org-element.el (org-element--cache-warn): Store cache warnings
for submission.
* lisp/org.el (org-update-parent-todo-statistics): Make sure that we
move to the end of updated cookie at the end of search loop, even when
the cookie has not been updated.
Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87le6pucnv.fsf@gmail.com
* lisp/ob-exp.el (org-babel-exp-do-export): Display warning when
:exports value is not known. Document nil return value.
(org-babel-exp-process-buffer): Do not remove code block when
`org-babel-exp-do-export' returns nil.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/usc9jn$g2r$1@ciao.gmane.io
* lisp/org-macs.el (org-do-remove-indentation): Set
`buffer-invisibility-spec' to nil before detecting the column or
moving to a column.
This fixes src_block indentation removal for org-modern-mode but will
also correct other cases of hidden indentation.
TINYCHANGE
* lisp/org-macs.el (org-mks): Make sure that selection window is
closed upon exiting. See also fef873b1c.
Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://orgmode.org/list/874jdg2ipo.fsf@