* lisp/ox-icalendar.el (org-icalendar-entry): Include timestamps of
type diary when `:with-timestamps' is `active'.
* lisp/ox.el (org-export--skip-p): Include timestamps of type diary
when `:with-timestamps' is `active'.
*
testing/lisp/test-ox-icalendar.el (test-ox-icalendar/diary-timestamp):
Unit test for exporting timestamps of type diary.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Add "export" to
list of block types that are fontified if `org-src-fontify-natively'
is non-nil. This brings back the previous undocumented behaviour.
Link: https://list.orgmode.org/87h6aejf17.fsf@localhost/
TINYCHANGE
* lisp/org-persist.el: (org-persist--find-index): Fix regression that
makes the function return nil when container in COLLECTION is not a
list of containers.
TINYCHANGE
* etc/ORG-NEWS (Texinfo exporter now supports links in headings):
Announce the new feature.
* lisp/ox-texinfo.el: (org-texinfo--format-entries,
org-texinfo--get-node, org-texinfo--sanitize-title-reference,
org-texinfo--sanitize-title): A 2-step change: (1) Rename
`--sanitize-title' to `--sanitize-title-reference' and (2) create a
new `--sanitize-title' sanitation function. The new function is less
strict in that does not remove links, which should be allowed in
sectioning commands, such as `@unnumbered'. The old function remains
more strict, which is useful for generating `@node' names, for
example.
* testing/lisp/test-ox-texinfo.el:
(test-ox-texinfo/headings-with-links): Test the new functionality to
avoid regressions in the future.
* lisp/ox-texinfo.el (org-texinfo--@ref): Fix an incorrect assumption
that Texinfo uses node names for automatic link text. It does not.
Instead, it uses the corresponding section title. For example, if a
node is named `a' its section is named `A', the Org link to the node
`a' written as `[[...][xxx]]' ends up being rendered as "A", which
means the link description the Org user provided is ignored.
* lisp/org-colview.el (org-columns-compile-format): Refactor
string-based regexp to `rx' form. Fix regexp: When an empty
parentheses () is in the column format string then the regexp
can't capture the operator which is in curly brackets {}.
(org-columns-new): prevent adding empty parantheses '()' to 'column
format string' when 'column title' is empty.
* testing/lisp.test-org-colview.el (test-org-colview/compile-format):
New test case: check if operator will be captured when there is
empty parantheses '()' in 'column format string'.
Reported-by: Sławomir Grochowski <slawomir.grochowski@gmail.com>
Link: https://list.orgmode.org/orgmode/877ccczt83.fsf@gmail.com/
* lisp/org.el (org-toggle-inline-images-command): New command to
toggle images. Unlike the old `org-toggle-inline-image', it is more
flexible and default to toggling images at point/current entry.
* lisp/org-keys.el (org-mode-map): Bind C-c C-x C-v to the new
command.
* doc/org-manual.org (Images): Update the manual describing the new
command behaviour.
* etc/ORG-NEWS (=C-c C-x C-v= command toggling inline image display
has been reworked): Document the breaking change.
Link: https://list.orgmode.org/6461a84b.a70a0220.b6d36.5d00@mx.google.com/
* lisp/ox-publish.el (org-publish-update-timestamp): Store current
time in publish cache, instead of modification time of source file.
(org-publish-cache-file-needs-publishing): Return t, if source or an
included file was modified more recently.
Previously, a source file including a newer file was published again
and again. Now, publishing only happens if either source or an
included file changed since the last publishing.
* lisp/org.el (org-display-inline-image--width): Ignore non-pixel
specifications like :width 4in (previously treated as 4 pixels). Do
not ignore fractional percent values like :width 30.5%.
* lisp/ob-core.el (org-babel-demarcate-block): Keep case in
#+BEGIN_SRC and #+END_SRC keywords splitting src block.
* testing/lisp/test-ob.el (test-ob/keep-case): New test.
Reported-by: Rudolf Adamkovič <rudolf@adamkovic.org>
Link: https://orgmode.org/list/m2y152f8s3.fsf@adamkovic.org
* lisp/org-compat.el (org-mode-flyspell-verify): Remove LOGBOOK drawer
filter. Not checking inside LOGBOOK drawers has no clear purpose. I
also see no explanation in the git logs and mailing list archives, all
the way back to refactoring this function to use org-element API.
* etc/ORG-NEWS (Org mode no longer prevents =flyspell= from
spell-checking inside =LOGBOOK= drawers): Announce the breaking
change.
Reported-by: Morgan Willcock <morgan@ice9.digital>
Link: https://orgmode.org/list/87jzgpvdbk.fsf@ice9.digital
* lisp/org-persist.el (org-persist-write:index): Disable
pretty-printing when writing index. This is simply too slow once
index reaches ~1000 items. `pp' is slow. See bug#58687.
(org-persist--write-elisp-file): Add FIXME explaining that using PP
argument is probably not a good idea.
Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://orgmode.org/list/87r0axvu7y.fsf@gmail.com
* lisp/ob-shell.el (org-babel-sh-prompt): Use the old prompt for Emacs
27. CI fails on Debian + Emacs 27 when running tests, even though
Emacs 27 tests do pass on my system. Play it safe and fall back to
the old prompt for Emacs 27, to avoid possible breakage. Emacs 27
support is going to be dropped soon anyway, after Emacs 30 release.
* lisp/ob-R.el (org-babel-R-initiate-session):
* lisp/ob-julia.el (org-babel-julia-initiate-session): Force using
`default-directory' as working directory for ESS sessions.
* etc/ORG-NEWS (~ob-R~ and ~ob-julia~ no longer use ESS settings for
working directory): Announce the breaking change.
Link: https://orgmode.org/list/871q4izpr4.fsf@localhost
* lisp/org.el (org-cancel-repeaters): Rename from
`org-cancel-repeater' (leaving old name as an alias). Cancel all the
repeaters instead of just the repeater in the first active timestamp.
(org-todo): Use the new function name.
* etc/ORG-NEWS (~org-cancel-repeater~ now cancels all the repeaters
under inside entry): Announce the breaking change.
The old version failed to cancel repeaters except the one in the very
first active timestamp. If the first timestsamp did not have a
repeaters, all other repeaters were ignored.
Since the original use case of this is -1 prefix argument in
`org-todo' with the intention to prevent switching back to TODO when
marking done, cancelling all the repeaters makes more sense.
Reported-by: Peter Solodov <solodov@gmail.com>
Link: https://orgmode.org/list/87r0b4duzo.fsf@localhost
* lisp/org-persist.el (org-persist--find-index):
(org-persist--add-to-index):
(org-persist--remove-from-index): Do not assume that every container
is a list of other containers.
* lisp/ob-shell.el (org-babel-sh-prompt): Change the value of unique
prompt from long prompt string to a much shorter, but still unlikely
to appear in output, single-char prompt.
Cuneiform because Sumerian, Babylon, Tower ob Babel :)
* lisp/ob-shell.el (org-babel-sh-initiate-session): Set
`comint-prompt-regexp' early, _before_ evaluating prompt change. This
way, we make sure that comint is not stuck trying to search for the
old prompt if the new prompt no longer matches `comint-prompt-regexp'.
* lisp/ob-shell.el (org-babel-sh--prompt-initialized): New variable
flag that indicates whether ob-shell changed the prompt in current
comint buffer.
(org-babel-sh-initiate-session): Set unique prompt in existing
sessions if it is not yet done.
Link: https://orgmode.org/list/87o782gx7o.fsf@localhost
* lisp/ob-comint.el (org-babel-comint-prompt-regexp-fallback): Rename
to more accurate name. Leave the old name as an alias.
(org-babel-comint--set-fallback-prompt): Use the new name.
(org-babel-comint-with-output):
(org-babel-comint-wait-for-output):
* lisp/ob-clojure.el (ob-clojure-eval-with-inf-clojure):
* lisp/ob-haskell.el (org-babel-interpret-haskell):
* lisp/ob-ruby.el (org-babel-ruby-initiate-session):
* lisp/ob-shell.el (org-babel-sh-initiate-session):
* lisp/org-agenda.el (org-agenda-write): Drop `set-buffer' call at the
end. It does nothing since the rest of the code is wrapped in
`save-excursion' and the aim of the `set-buffer' is to switch to the
agenda buffer we just saved. Ignore AGENDA-BUFNAME argument - it is
unused now. Update the docstring, removing the mention of what
appears to be the now-ignored argument.
(org--batch-store-agenda-views): Update the caller. Passing current
agenda buffer name is no longer necessary. We set it before the call
anyway.
Reported-by: Sławomir Grochowski <slawomir.grochowski@gmail.com>
Link: https://orgmode.org/list/87ed7dwygq.fsf@gmail.com
* lisp/org-plot.el (org-plot-timestamp-fmt): Add default value and the docstring.
(org-plot/gnuplot-to-data): `let'-bind `org-plot-timestamp-fmt'
instead of setting it in current buffer.
Reported-by: Chris Keschnat <chris@catsu.it>
Link: https://orgmode.org/list/87r0bje1vs.fsf@catsu.it
* lisp/org.el (org--get-expected-indentation): Allow ELEMENT to be nil.
(org-indent-line): Account for element at point possibly being
nil (`org-element-at-point' returns nil at blank lines at the
beginning of buffer).
Reported-by: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Link: https://orgmode.org/list/87ed7tb4ja.fsf@sappc2.mail-host-address-is-not-set
* lisp/ox.el (org-export-get-all-options):
(org-export-get-all-filters): Do not demand parent chain to be from
registered backends. Allow anonymous parents as well.
This is necessary because `orgtbl-to-generic' now uses anonymous
backend via normal ox.el machinery and ob-gnuplot layers an anonymous
backend on top (which is not invalid, given that `orgtbl-to-generic'
did work with this setup in the past).
* lisp/org-refile.el (org-refile):
(org-refile-goto-last-stored): Save position to the Org mark ring if
we are about to jump to a different position.
* etc/ORG-NEWS (~org-refile~ now saves current position to Org mark
ring when jumping to heading): Document the new feature.
Link: https://orgmode.org/list/CAJcAo8vYLJ3YGH0+nZs1rgtdq2iRKzJ8tuGxJKRD-XyEwEm4FA@mail.gmail.com
* lisp/org-table.el (orgtbl-to-generic): Before e0924db3c,
`orgtbl-to-generic' did honor the filter functions for AST
specifically (but no other). Keep it so.
* lisp/org.el (org-insert-subheading): Make sure that `forward-char'
never happens at the end of buffer. Also, only move char when we are
at actual heading/item - that's the only case when we need to adjust
point position to avoid `org-insert-heading' inserting above.
* lisp/ox-beamer.el (org-beamer--format-frame): Allow a frame subtitle
to be specified in the BEAMER_SUBTITLE property. If specified, put it
in the second non-optional argument to \begin{frame}.
* doc/org-manual.org (Frames and Blocks in Beamer): Document above
behaviour.
* etc/ORG-NEWS (Beamer export supports setting frame subtitles):
Document the new feature.
* lisp/org-table.el (orgtbl--skip):
(orgtbl--skipcols): New helper functions.
(orgtbl-to-generic): Use `org-export-as' machinery to setup table
export instead of duplicating ox.el internals. Retain special rows in
tables when exporting to Org. Org export is used by ob-core to format
the code block output and will thus retain special rows.
* testing/lisp/test-org-table.el (test-org-table/to-generic): Adjust
test to expect special rows to be exported.
* etc/ORG-NEWS (~orgtbl-to-generic~ retains special rows when
exporting to Org): Announce the breaking change.
Reported-by: Rudolf Adamkovič <rudolf@adamkovic.org>
Link: https://orgmode.org/list/87r0ch6q9h.fsf@localhost
* lisp/ox.el (org-export-replace-macros): New custom option
controlling macro replacement.
(org-export--annotate-info): Honor it, except when processing inline
code block results and their {{{results...}}} macro.
* etc/ORG-NEWS (Allow disabling macro replacement during export):
Announce the new option.
* doc/org-manual.org (Macro Replacement):
(Summary of the export process): Document the new option.
* lisp/org-list.el (org-list-struct-apply-struct): Make sure that we
never shift item contents to or before the item indentation.
* testing/lisp/test-org-list.el (test-org-list/cycle-bullet): Add new
test.
Reported-by: vitalij@gmx.com
Link: https://orgmode.org/list/871q42qbn7.fsf@gmx.com
* lisp/ox-html.el (org-html-head):
(org-html-head-extra): Allow value to be a function.
(org-html-normalize-string-or-function): New helper function.
(org-html--build-head): Use the new helper to handle the function
value of :html-head and :html-head-extra export options.
* etc/ORG-NEWS:
(~org-html-head~ and ~org-html-head-extra~ can now be specified as
functions): Document the new feature.
* testing/lisp/test-ox-html.el (ox-html/test-normalize-string-or-function):
New test.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-category-icon-alist): Refer to
`org-agenda-prefix-format' in the docstring, as it is what controls
whether the icons are rendered at all.
* lisp/ob-core.el (org-babel-insert-result): Explain that
RESULT-PARAMS is a list. Clarify the treatment of INFO. Fix
incorrect :file parameters that is actually not used. Instead,
document :file-desc parameter that is being used.
Reported-by: Stefan Kangas <stefankangas@gmail.com>
Link: https://orgmode.org/list/871q4fzx0k.fsf@localhost
* lisp/org-persist.el (org-persist--find-index): Only match index
entries that contain _all_ the components of the given COLLECTION.
For example, when searching for
`((elisp org-element--cache) (version ,org-element-cache-version))
container, make sure that the returned value match both "elisp" and
"version" containers.
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
c645e1d8205f0f0663ec4a2d27575b238c646c7c
Ihor Radchenko
Sat Jun 22 00:54:36 2024 +0200
[ km: This was independently covered on the bugfix branch with
f4cc61636. I'm applying it here too for bookkeeping/traceability
purposes. ]
* lisp/ob-shell.el (org-babel-sh-evaluate): When running src block as
script file, make sure that shebang is always added on top. This is
to prevent <shell> <script> command in shells like dash form using
/bin/sh to evaluate scripts without shebang. (In contrast with bash
that uses itself). Add comment highlighting that
`with-connetion-local-variables' sets `shell-file-name' and
`shell-command-switch' as necessary.
*
testing/lisp/test-ob-shell.el (test-ob-shell/remote-with-stdin-or-cmdline):
Add new test.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://list.orgmode.org/orgmode/v0an63$3n2$1@ciao.gmane.io/
* lisp/ob-shell.el (org-babel-sh-evaluate): When invoking script file
generated from the code block, consistently use
<shell-name> -c <script-file> <cmdline-args> command line, even when
:shebang is header argument is provided. The previous approach with
<script-file> <cmdline-args> call caused differences in how shell
parsed the provided command line arguments.
* testing/lisp/test-ob-shell.el (test-ob-shell/cmdline): New test.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/18f01342a2f.124ad27612732529.8693431365849276517@excalamus.com
* lisp/org-persist.el (org-persist--normalize-associated): Force
'emacs-internal coding system when computing buffer contents hash.
Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://orgmode.org/list/86jzia68ih.fsf@gnu.org
* lisp/ob-sqlite.el (org-babel-header-args:sqlite):
(org-babel-execute:sqlite): Add new header argument :readonly.
* etc/ORG-NEWS (ob-sqlite: Added ability to open a database in
readonly mode): Announce the new header argument.
* lisp/ol.el (org-link-expand-abbrev): Refuse expanding %(...) link
abbrevs that specify unsafe function. Instead, display a warning, and
do not expand the abbrev. Clear all the text properties from the
returned link, to avoid any potential vulnerabilities caused by
properties that may contain arbitrary Elisp.
* lisp/Makefile (.NOTPARALLEL):
* mk/targets.mk (.NOTPARALLEL): Do not fiddle with explicit
.NOTPARALLEL. Given that we provide correct dependencies, parallel
execution should work, and it does work.
* lisp/org-refile.el (org-refile-get-location): When current buffer
file is a symlink to refile location, do not append the file name to
the outline path, just as we do when current buffer is the same as
refile location file.
TINYCHANGE
* lisp/org-element.el (org-element--timestamp-regexp): Do not match
malformed timestamps like:
<202-07-10 .+1d>
`org-ts-regexp-both' already covers the removed part of the regexp.
It appears that the problematic regexp is coming from a copy-paste from
`org-agenda-get-timestamps' where the inaccurate regexp is used to
search timestamps with repeaters in conjunction to searching for exact
agenda dates. In `org-agenda-get-timestamps', inaccuracy is not a
problem because proper matching against `org-ts-regexp-both' is
performed later, simply skipping non-timestamps.
Reported-by: Platon Pronko <platon7pronko@gmail.com>
Link: https://orgmode.org/list/6000e3bf-f95f-44fd-b321-cf44acd5c485@gmail.com
* lisp/oc-csl.el (org-cite-csl-bibtex-titles-to-sentence-case): New
variable.
(org-cite-csl--processor): Create the itemgetter using the new option.
* etc/ORG-NEWS (New option
~org-cite-csl-bibtex-titles-to-sentence-case~): Announce the change.
* org-plot.el (org-plot/gnuplot-script-preamble)
(org-plot/gnuplot-term-extra): Explain what "plot type" means.
(org-plot/preset-plot-types): Fix docstring and correct the lambda
argument order for the 'grid' plot type.
(org-plot/gnuplot): Merge the parameters given in
`org-plot/preset-plot-types' and the #+PLOT line to ensure the former
is respected everywhere.
Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://orgmode.org/list/87cypbjw50.fsf@gmail.com