* lisp/org.el (org-fast-tag-selection): Do not print tags without
explicit bindings and tags outside groups when the number of displayed
tags exceeds new customization.
* lisp/org.el (org-fast-tag-selection-maximum-tags): Add new custom
option to set maximum tags number for fast tag selection.
(org--fast-tag-selection-keys): New internal variable holding keys
available for auto-assigning tag bindings.
* doc/org-manual.org (org-fast-tag-selection-maximum-tags): Add new
custom option documentation.
* etc/ORG-NEWS: Declare this new custom option.
Co-Authored-by: Ihor Radchenko <yantar92@posteo.net>
Link: https://list.orgmode.org/orgmode/CAL1eYuK7GUx_=47e8+N5Jh+ZJnDexY+CDMUjPjJHNmcMiVVRrQ@mail.gmail.com/
* lisp/org-agenda.el (org-agenda-format-item): When
`org-agenda-search-headline-for-time' is non-nil, exclude timestamps
in headings from searching the time.
(org-agenda-search-headline-for-time): Remove warning about timestamps
in headings from the docstring.
* etc/ORG-NEWS (~org-agenda-search-headline-for-time~ now ignores all
the timestamp in headings): Announce the change.
Reported-by: rameiko87@posteo.net
Link: https://orgmode.org/list/dc5c0aa3748f5d7ad8b79bea674266e7@posteo.net
This reverts commit 7926045ff5.
`org-src-associate-babel-session' is still useful because:
1. It indicates the need to implement session association to babel
backend (although we still need to make it more clear for backend
authors in future).
2. It provides infrastructure for more granular control over session
association for third-party packages. For example, we might want
to disabled session association when it can cause unwanted side
effects, like starting comint process unconditionally (looking at
ob-R and other ess-based backends).
* lisp/org-element.el (org-element-cache-store-key):
(org-element-cache-get-key): New functions to store and retrieve data
associated with cached nodes. The data is stored inside
:fragile-cache and :robust-cache node properties.
(org-element--cache-shift-positions): Clear :fragile-cache when the
contents boundaries are changed. Optimize when OFFSET is 0.
* lisp/org-element.el (org-element--cache-process-request): Call
`org-element--cache-shift-positions' even for 0 offset to account for
:fragile-cache.
* etc/ORG-NEWS (New API functions to store data within
~org-element-cache~): Announce the new API.
* testing/lisp/test-org-element.el (test-org-element/cache-get-key):
New test.
ob-python will now use the same settings as `run-python' when starting
interactive sessions, by default.
* lisp/ob-python.el (org-babel-python-command): Changed to have
additional `auto' option, which is the new default value.
(org-babel-python-command-session): New option to control default
session Python command.
(org-babel-python-command-nonsession): New option to control default
nonsession Python command.
(org-babel-python--command): New function to determine the command to
run Python.
(org-babel-python-initiate-session-by-key): Call `run-python' without
CMD arg. Instead, set `python-shell-interpreter' and
`python-shell-interpreter-args' from `org-babel-python--command' when
needed.
(org-babel-python-evaluate-external-process): Use
`org-babel-python--command' to start Python.
* lisp/ox-odt.el (org-odt--export-wrap): Do not open the exported file
in the background. Such behavior is not consistent with the other
export backends and is not documented (users don't know about it).
* etc/ORG-NEWS (ODT export no longer opens the exported file in the
background): Document the breaking change.
* lisp/ol-man.el (org-man-complete): New function implementing
completion for man pages using `Man-completion-table'. Set this
function as the `:complete' property of "man" links.
Ihor Radchenko. Re: Completion of links to man pages.
Sat, 09 Dec 2023 11:32:39 +0000.
<https://list.orgmode.org/877clnsjag.fsf@localhost>
* org-capture.el (org-capture-fill-template): fill %K values using link
value from `org-store-link', which respects `org-id-link-to-use-id'.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.
Reported-by: Nathaniel W Griswold <nate@manicmind.earth>
Signed-off-by: Kenny Ballou <kb@devnulllabs.io>
Link: https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/
TINYCHANGE
* lisp/org.el (org-mode): Call the setup function for yank-media and
DND.
(org-setup-yank-dnd-handlers): Register yank-media-handler and DND
handler.
(org-yank-image-save-method, org-yank-image-file-name-function)
(org-yank-dnd-method, org-yank-dnd-default-attach-method): New
defcustoms.
(org--image-yank-media-handler, org--copied-files-yank-media-handler)
(org--dnd-rmc, org--dnd-multi-local-file-handler)
(org--dnd-local-file-handler, org--dnd-attach-file, org--dnd-xds-method)
(org--dnd-xds-function): Add yank-media and DND handlers.
* doc/org-manual.org: (Drag and Drop & ~yank-media~): Describe the new
feature in the manual.
* etc/ORG-NEWS: Advertise the new features.
* etc/ORG-NEWS (~org-src-associate-babel-session~ and
~org-babel-<lang>-associate-session~ are now obsolete): Announce the
change.
* lisp/org-compat.el (org-src-associate-babel-session):
(org-src-babel-configure-edit-buffer): Mark obsolete.
* lisp/org-src.el: Add comment to remove "Babel related functions"
block in the next release.
Link: https://orgmode.org/list/CAOQTW-OMeyWYcLq8hDJ4MB10_4dOkvoNjKnFedLYP2z+-M6BAg@mail.gmail.com
* etc/ORG-NEWS (~org-print-speed-command~ is now an internal
function): Announce the change.
* lisp/org-compat.el (org-print-speed-command): Mark obsolete.
* lisp/org-keys.el (org--print-speed-command): Rename as internal
function. Add docstring. Rename the argument to be more clear.
(org-speed-command-help): Use the new function name.
* lisp/org-macs.el (org-current-text-column): Assert `tab-width' to be
8 to ensure consistency of the parser across user configurations.
* etc/ORG-NEWS (~tab-width~ value is now assumed to be 8): Document
the breaking change.
This breaking change is made to standardize Org mode format for list
items. With variable `tab-width', indentation in lists may depend on
user settings leading to inconsistent Org documents when open by
different users.
Link: https://orgmode.org/list/2c9a6cbd-21c0-45bf-8fbb-4f7eccac4ae7@app.fastmail.com
* lisp/ob-ref.el (org-babel-ref-resolve): Only search in other file
when FILE in FILE:REF exists.
* doc/org-manual.org (Passing arguments):
* etc/ORG-NEWS (Babel references =FILE:REFERENCE= now search current
buffer when =FILE= does not exist): Document the change.
Reported-by: Stefano Ghirlanda <dr.ghirlanda@gmail.com>
Link: https://orgmode.org/list/CAK_gY-Q4f82dbDQgyS+FfyeQaHAMXHqygq3e6ZsWnEj-+eoG9A@mail.gmail.com
* lisp/org-clock.el (org-clock-out-removed-last-clock): Add new global
variable.
(org-clock-out): Set the variable to non-nil when the CLOCK line has
been removed before running `org-clock-out-hook'.
(org-clock-out-hook): Add reference to the new variable.
* etc/ORG-NEWS (New variable ~org-clock-out-removed-last-clock~):
Announce the change.
(org-babel-execute:plantuml): Generate tikz code without preamble when
requested :file has .tikz extension.
* etc/ORG-NEWS (=ob-plantuml.el=: Support tikz file format output):
Document the change.
TINYCHANGE
* (org-babel-header-args:maxima): Document the two new header
arguments (batch and graphics-pkg) that are specific to ob-maxima.
* (org-babel-maxima--command-arguments-default): A new variable
storing the default command-line argument(s). This value was
hard-coded in `org-babel-maxima:execute'.
* (org-babel-maxima--graphic-package-options): A new variable that
stores an alist of Maxima graphics packages and the Maxima code to set
up that package.
* (org-babel-maxima--default-epilogue): A new variable that stores an
alist of the clean-up code that is run at end of a `graphical-output'
or `non-graphical-output' source block.
* (org-babel-maxima--output-filter-regexps): A new variable that
stores a list of regexps to identify "bad" output lines to be removed
from Maxima's output. Source-code comments document each regexp's
purpose. Two additional regexps have been added: one filters
un-wanted output from `batch' and the other removes empty input lines
that `batch'-ed output may spuriously produce (actual empty input
lines are syntax errors, see the new tests below).
* (org-babel-maxima--output-filter): A new function that takes a
single line of Maxima output. It returns nil if the line has zero
length or matches a regexp in
`org-babel-maxima--output-filter-regexps'; otherwise, it returns the
line. This function and regexp replace the hard-coded filter in
`org-babel-execute:maxima'.
* (org-babel-maxima-expand): Prepare the source block for execution,
depending on whether it is producing graphical output or not. In case
of graphical output, use the `graphics-pkg' header to set the graphics
package and use `org-babel-maxima--graphic-package-options' to set-up
the package. Grovel the graphics terminal from the output filename.
* (org-babel-execute:maxima): Use the :batch header argument and
`org-babel-maxima--command-arguments-default' to execute the source
block. Replace the existing, in-line output filter and its regexps
with `org-babel-maxima--output-filter' and
`org-babel-maxima--output-filter-regexps'.
* testing/examples/ob-maxima-test.org: Add test examples.
Include examples of the batch-related tests from
testing/lisp/test-ob-maxima.el. Provide an example of the
`:graphics-pkg' header argument with the `draw' package.
* testing/lisp/test-ob-maxima.el: Introduce six new, batch-related
test functions. Each test exercises the :batch header argument. The
response to unusual inputs is tested (empty strings, strings with just
whitespace, input with the `:lisp' reader, and two syntax-related
errors).
link: https://list.orgmode.org/87cyz1ivzw.fsf@t14.reltub.ca/
* ob-lilypond.el (org-babel-lilypond-compile-lilyfile):
Correct compilation message.
Remove superfluous local variables.
Remove unused ad-hoc debugging TEST parameter.
* test-ob-lilypond.el (ob-lilypond/ly-compile-lilyfile):
Locally bind variables which may generate output files.
Refactor to account for removed TEST parameter.
Thanks to Ihor Radchenko and Liu Hui for valuable feedback on this
patch.
* lisp/ob-python.el (org-babel-execute:python): Parse graphics-file
from params, and pass it to `org-babel-python-evaluate'.
(org-babel-python--output-graphics-wrapper): New constant. Python
code to save graphical output.
(org-babel-python--def-format-value): New constant. Python function
to format and save value results to file. Includes handling for
graphics, dataframes, and arrays.
(org-babel-python-table-or-string): Prevent `org-babel-script-escape'
from mangling dict results.
(org-babel-python--setup-session): New function to
run setup code within Python session.
(org-babel-python-initiate-session-by-key): Replace lambda with
`org-babel-python--setup-session' in `python-shell-first-prompt-hook',
or run it directly if the session was started outside Org.
(org-babel-python-wrapper-method): Removed. Instead use part of the
string directly in `org-babel-python-evaluate-external-process'.
(org-babel-python-pp-wrapper-method): Removed. Pretty printing is now
handled by `org-babel-python--def-format-value'.
(org-babel-python--exec-tmpfile): Removed. Instead use the raw string
directly in `org-babel-python-evaluate-session'.
(org-babel-python-format-session-value): Updated to use
`org-babel-python--def-format-value' for formatting value result.
(org-babel-python-evaluate): New parameter graphics-file. Pass
graphics-file onto downstream helper functions.
(org-babel-python-evaluate-external-process): New parameter
graphics-file. Use `org-babel-python--output-graphics-wrapper' for
graphical output. For value result, use
`org-babel-python--def-format-value'. Don't call `org-trim' on
results, to prevent misalignment of pandas DataFrames.
(org-babel-python-evaluate-session): New parameter graphics-file. Use
`org-babel-python--output-graphics-wrapper' for graphical output.
Replace the removed constant `org-babel-python--exec-tmpfile' with the
string directly. Rename local variable tmp-results-file to
results-file, which may take the value of graphics-file when provided.
(org-babel-python-async-evaluate-session): New parameter
graphics-file. Use `org-babel-python--output-graphics-wrapper' for
graphical output. Rename local variable tmp-results-file to
results-file, which may take the value of graphics-file when provided.
* doc/org-manual.org (org-columns-move-row-up,
org-columns-move-row-down, org-columns-move-left,
org-columns-move-right): Document two new and two old commands.
* etc/ORG-NEWS (New commands to move rows up & down): Document the new
feature.
* lisp/org-colview.el (org-columns--move-row, org-columns-move-row-up,
org-columns-move-row-down): New functions.
* testing/lisp/test-org-colview.el (test-org-colview/columns-move-row-down,
test-org-colview/columns-move-row-up,
test-org-colview/columns--move-row-stay-at-the-same-column,
test-org-colview/columns-move-row-down-with-subheading): New tests.
* lisp/ox.el (org-export-smart-quotes-alist): Change to `defcustom'.
Fix typo in the value. Add :type/:package-version/:group definitions.
* etc/ORG-NEWS (~org-export-smart-quotes-alist~ is now a custom
option): Announce the change.
Link: https://orgmode.org/list/871qg5bnfh.fsf@bzg.fr
* lisp/ol.el (org-link-store-existing): Remove the previously added
custom option.
(org-store-link): Do not use `org-link-store-existing' removing all
the code branches for values other than 'move-to-front.
* etc/ORG-NEWS (~org-store-link~ now moves an already stored link to
front of the ~org-stored-links~): Remove reference to the removed
custom option.
Link: https://orgmode.org/list/87leeffd1z.fsf@localhost
* etc/ORG-NEWS (New features): Add a news entry.
* lisp/ob-sqlite.el (org-babel-execute:sqlite): Default ':db' to
":memory:" instead of throwing an error.
* testing/lisp/test-ob-sqlite.el (ob-sqlite/in-file): Test the old behavior.
* testing/lisp/test-ob-sqlite.el (ob-sqlite/in-memory): Test the new behavior.
* etc/ORG-NEWS (Internal structure of Org parse tree has been
changed): Clarify when one needs to adjust for the breaking change
introducing deferred properties.
* lisp/org.el (org-make-tags-matcher): Add starred property operators.
Recognize additional operators "==", "!=", "/=". Clean up and
document match term parsing. Remove needless and buggy unquoting of
minus characters in property and tag names.
(org-op-to-function): Recognize additional inequality operator "/=".
* doc/org-manual.org (Matching tags and properties): Add documentation
on starred and additional operators. Document allowed characters in
property names and handling of minus characters in property names.
* testing/lisp/test-org.el (test-org/map-entries): Add tests for
starred and additional operators. Add tests for property names
containing minus characters.
* etc/ORG-NEWS: (~org-tags-view~ supports more property operators):
Add announcement on starred and additional operators.
Link: https://orgmode.org/list/9132e58f-d89e-f7df-bbe4-43d53a2367d2@vodafonemail.de
* lisp/ox.el (org-export-options-alist): New export option toggling
environment variable expansion in link paths.
(org-export-expand-links): New customization.
(org-export--expand-links): New function expanding environment
variables all the link paths in AST.
(org-export-expand-include-keyword):
(org-export--blindly-expand-include): Add new optional arguments to
expand environment variables in INCLUDE file paths. Update
docstrings.
(org-export--annotate-info): Call `org-export--expand-links' during
export and pass :expand-links parameter to
`org-export-expand-include-keyword'.
* doc/org-manual.org (Export Settings): Document the new option.
* etc/ORG-NEWS (New export option ~org-export-expand-links~): Announce
new option.
Link: https://list.orgmode.org/orgmode/87pm6fbnlo.fsf@localhost/
* lisp/ol.el (org-link-store-existing): New customization controlling
how to deal with already stored links.
(org-store-link): Respect the new customization, allowing duplicates
to (1) be added anyway; (2) be ignored; (3) be moved to front of
`org-stored-links'. The default is (3).
* etc/ORG-NEWS (~org-store-link~ now moves an already stored link to
front of the ~org-stored-links~): Document the breaking change.
Reported-by: Samuel Wales <samologist@gmail.com>
Link: https://list.orgmode.org/orgmode/CAJcAo8sjD3_FX5pFQ4git9wRDNM3bMqTgP-R5mM8zcf1B3mjPg@mail.gmail.com/
The new property is needed to reduce ambiguity when interpreting the
parsed data.
* lisp/org-element.el (org-element-timestamp-interpreter): Preserve old
behavior when :range-type is `nil'. Take into account :range-type
value when interpreting ranges. When :range-type is `timerange',
return a timerange (<YYYY-mm-DD HH:MM-HH:MM>). If :range-type is
`daterange' return a daterange (<...>--<...>). When :range-type is
nil, return a daterange (as it was before). When :range-type is
`daterange' or `timerange' and :type is `active'/`inactive', throw an
error.
(org-element-timestamp-parser): Add :range-type property.
* lisp/org.el (org-timestamp-split-range): Make sure that :range-type
is nil for a split timestamp.
* testing/lisp/test-org-element.el
(test-org-element/timestamp-interpreter): Add new tests.
(test-org-element/timestamp-parser): Add tests for :range-type
property.
* etc/ORG-NEWS (Major changes and additions to Org API): Add news about this property.
Link: https://list.orgmode.org/orgmode/87y1ot6dqz.fsf@gmail.com/
* lisp/org.el (org-metaleft-final-hook, org-metaright-final-hook,
org-metaup-final-hook, org-metadown-final-hook): Define final hooks
for S-cursor commands.
(org-metaleft, org-metaright, org-metaup, org-metadown): Add final
hooks to M-commands and document them in the docstring.
* lisp/org.el (org-shiftup, org-shiftdown, org-shiftright,
org-shiftleft): Document hooks for S-cursor commands in the docstring.
* lisp/org.el (org-shiftmetaleft-final-hook,
org-shiftmetaright-final-hook, org-shiftmetaup-final-hook,
org-shiftmetadown-final-hook): Define final hooks for the S-M-cursor
commands.
(org-shiftmetaleft, org-shiftmetaright, org-shiftmetaup,
org-shiftmetadown): Add final hooks to the S-M-cursor commands and
document hooks in the docstring.
* etc/ORG-NEWS (New final hooks for Modifier-Cursor keys): Document
new hooks.
TINYCHANGE
* etc/ORG-NEWS (Major changes and additions to Org API):
(New functions and changes in function arguments): Document the
changes and additions to Org API.
* lisp/org-habit.el (org-is-habit-p): Use `org-entry-get' with
'selective option to optionally find habit subheadings.
* etc/ORG-NEWS: Describe a breaking change.
TINYCHANGE
* lisp/org-capture.el (org-capture-set-target-location): Allow
`(here)' as a template target in addition to `here'.
(org-capture-templates): Update the docstring, describing the new
target.
* doc/org-manual.org (Template elements): Add `(here)' target
documentation
* etc/ORG-NEWS (Capture templates now support ~(here)~ as a target):
Document the new feature.
Templates had no user accessible way to target the current location
directly from a capture template. Attempting to directly utilize the
behavior accessible through a 0 prefix arg exposed the inconsistent
treatment of the `:target` property in
`org-capture`. `org-capture-set-target-location` understood that it
could be both a symbol and a list, while `org-capture` itself required
it to be a list through its use of `car`.
This change opts to make `org-capture-set-target-location` more
liberal in what it accepts rather than making `org-capture` agree that
targets can be lists. This is because the manual implies, especially
in the `(clock)' entry, that targets are expected to be lists even if
they are meant as specific points.
TINYCHANGE
* lisp/org.el (org-priority-show): Do not wrongly assert that the
priority is affected by scheduled and deadline values. This was not
true in the past for Org mode buffers, and it is no longer true after
8fab6eeef renamed composite agenda rank from priority to urgency.
* etc/ORG-NEWS (~org-priority=show~ command no longer adjusts for
scheduled/deadline): Document the change, right before the NEWS item
describing changes in the agenda.
* lisp/ox-icalendar.el (org-icalendar-todo-unscheduled-start): New
customization to control the exported start time of unscheduled tasks.
(org-icalendar--rrule): Helper function for RRULE export.
(org-icalendar--vevent): Use the new helper function for RRULE.
(org-icalendar--repeater-type): Helper function to get the repeater
type, and display warning if not supported.
(org-icalendar--vtodo): Change how unscheduled TODOs are handled using
the new customization option. Export SCHEDULED and DEADLINE
repeaters. In case of SCHEDULED repeater and a DEADLINE without
repeater, treat DEADLINE as RRULE UNTIL. Emit a warning for tricky
edge cases that are not yet implemented.
* testing/lisp/test-ox-icalendar.el
(test-ox-icalendar/todo-repeater-shared): Test for exporting shared
SCHEDULED/DEADLINE repeater.
(test-ox-icalendar/todo-repeating-deadline-warndays): Test using
warning days as DTSTART of repeating deadline.
(test-ox-icalendar/todo-repeater-until): Test using DEADLINE as RRULE
UNTIL.
(test-ox-icalendar/todo-repeater-until-utc): Test RRULE UNTIL is in
UTC format when DTSTART is not in local time format.
(test-ox-icalendar/warn-unsupported-repeater): Unit test to warn for
unsupported repeater types.
* lisp/org-lint.el (org-lint-mismatched-planning-repeaters): Add lint
for mismatched SCHEDULED and DEADLINE repeaters.
* testing/lisp/test-org-lint.el
(test-org-lint/mismatched-planning-repeaters): Add test for linting of
mismatched SCHEDULED and DEADLINE repeaters.
* doc/org-manual.org (iCalendar Export): Add link to new variable
`org-icalendar-todo-unscheduled-start'.
* lisp/org.el (org-insert-todo-heading-respect-content): Do not force
first TODO keyword in the inserted heading. Instead, accept prefix
arguments and pass them directly to `org-insert-todo-heading'.
* etc/ORG-NEWS (~org-insert-todo-heading-respect-content~ now accepts
prefix arguments): Document the change.
*
testing/lisp/test-org.el (test-org/insert-todo-heading-respect-content):
Add tests.
Reported-by: Xuan Wang <xuan.public@gmail.com>
Link: https://orgmode.org/list/CALjN2yehOVYZuU+tURes+mJ5XyTrRY1O0UG1ijH-6TjJ=W0ibw@mail.gmail.com
* lisp/org.el (org-return): When `org-return-follows-link' is non-nil
and point is over an org-cite citation or citation reference, call `org-open-at-point'.
TINYCHANGE
* lisp/org-crypt.el: Call `org-cycle-set-startup-visibility' on the
decrypted entries. Still re-fold if the decrypted entry has been
inside an existing fold.
* lisp/org-cycle.el (org-cycle-set-visibility-according-to-property):
Respect narrowing.
* etc/ORG-NEWS (=org-crypt.el= now applies initial visibility settings
to decrypted entries): Announce the change.
This patch solves a slight annoyance when the freshly decrypted entry
is fully unfolded, including all the property drawers. It will make
more sense to make the folding state follow initial visibility
settings, including VISIBILITY properties.
* lisp/ox.el (org-export-dispatch): Add customizable variables
`org-export-body-only', `org-export-visible-only', and
`org-export-force-publishing', and use them in `org-export-dispatch'.
* doc/org-manual.org (The Export Dispatcher): Document the new export
variables.
* etc/ORG-NEWS (New customization options for ~org-export-dispatch~):
Announce the new customization options.
Currently when calling `org-export-dispatch', two of the export
options can have their defaults specified with customizable variables:
"Export scope" (via `org-export-initial-scope') and "Async export"
(via `org-export-in-background'). This change adds customizable
variables for the "Body only", "Visible only", and "Force publishing"
options as well.
* lisp/org-fold.el (org-fold-catch-invisible-edits-commands): New
custom option.
(org-fold-catch-invisible-edits): Mention the new custom option in the
docstring.
(org-fold-check-before-invisible-edit-maybe): New function checking
if edits are safe for `this-command'.
(org-fold--advice-edit-commands): New function advising the functions
with `org-fold-check-before-invisible-edit-maybe'.
* lisp/org.el (org-mode): Advice functions on Org startup.
(org-self-insert-command):
(org-delete-backward-char):
(org-delete-char):
(org-meta-return): Do not call `org-fold-check-before-invisible-edit'
and rely on the new advise mechanism instead.
* etc/ORG-NEWS (Commands affected by ~org-fold-catch-invisible-edits~
can now be customized): Announce the change.
* doc/org-manual.org (Catching invisible edits): Mention new
customization.