* lisp/org-element.el (org-element-paragraph-parser): Fix edge case
when 🔚 is in the middle of a paragraph.
*
testing/lisp/test-org-element.el (test-org-element/paragraph-parser):
Fix point position in the tests. Add test case for ending lines of
incomplete blocks/drawers. Remove test for incomplete dynamic blocks
- they are keywords.
Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/87o7hiwzma.fsf@localhost
* lisp/ox.el (org-export-options-alist): New internal plist option -
:with-special-rows. Defaults to nil.
(org-export--skip-p): Do not skip special table rows when
:with-special-rows is non-nil.
* lisp/ox-org.el (org-org-with-special-rows): New custom option
controlling whether to export special table rows. t by default.
(org): Use `org-org-with-special-rows' as the value of
:with-special-rows option.
* etc/ORG-NEWS (=ox-org= now exports special table rows by default):
(New option ~org-org-with-special-rows~): Announce the change.
* lisp/org-colview.el (org-columns--compute-spec): When summarizing
columns, limit the length of LVALS vector to maximum (not minimal!)
possible inlinetask depth.
* lisp/org-colview.el (org-columns--read-only-string):
(org-columns--display-here): Cache return value of
`substitede-command-keys' in a variable. It is otherwise slow to call
it every time a row is displayed.
* lisp/ol.el (org-insert-link):
* lisp/org-ctags.el (org-ctags-find-tag-interactive):
* lisp/ox-odt.el (org-odt-convert-read-params): Remove the remaining
uses and references to ido-mode. Rely upon built-in Emacs completion
system using the necessary completion backend rather than directly
calling ido functions.
This commit removes leftovers after
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fdbf441560
Reported-by: Martin Marshall <law@martinmarshall.com>
* lisp/org.el (org-startup-folded): Document all the allowed values in
the docstring. Allow symbols named the same as #+STARTUP option.
(org-startup-options): Allow `org-startup-folded' to have values
corresponding to the corresponding #+STARTUP options.
* lisp/ob-core.el (org-babel-session-buffer): New API function that
return session buffer, if such buffer exists and is live.
(org-babel-execute-src-block): Use `org-babel-session-buffer'.
* lisp/ob-lua.el (org-babel-session-buffer:lua):
* lisp/ob-python.el (org-babel-session-buffer:python): Provide API to
retrieve session buffer name.
(org-babel-python-initiate-session-by-key): Use
`org-babel-session-buffer:python'.
* etc/ORG-NEWS (Org babel backends are now expected to define an
additional API function ~org-babel-session-buffer:<lang>~): Declare
the API addition.
Link: https://orgmode.org/list/87r0hr9f3b.fsf@localhost
* lisp/ob-core.el (org-babel-execute-src-block): Force eval directory
to follow live session buffer, if any. This is consistent with what
we promise in the manual section "16.4 Environment of a Code
Block">Choosing a working directory.
Link: https://orgmode.org/list/87mssi8ht2.fsf@gmail.com
* lisp/org.el (org-insert-subheading): When at bol, do not insert
heading above (default behavior of `org-insert-heading'). Instead,
force `org-insert-heading' to insert below. Improve docstring,
explaining how the prefix arguments are used and the new different
with `org-insert-heading'.
* etc/ORG-NEWS (~org-insert-subheading~ no longer inserts a
sub-heading above current when point is at the beginning of line):
Document the breaking change.
Reported-by: Michael Dauer <mick.dauer@gmail.com>
Link: https://list.orgmode.org/CAP7OBx+whiB8Jo_hEcfL6MajDU1EH=E5j0ZOvHB3dPRK+Aj4mQ@mail.gmail.com/
* lisp/org-element.el (org-element-cache-map): Fix searching next-re
in move-start-to-next-match. The if confition was erroneously always
true due to the last `cl-incf'. Do not map over failing entry when
next-re did not match and continue-flag is set. Do not move point to
next entry before calling FUNC.
* testing/lisp/test-org.el (test-org/map-entries): Add new test case.
* lisp/ox-latex.el (org-latex-headline): When headline contains
footnotes and does not have ALT_TITLE, arrange alternative title that
will appear in TOC and footers to not have any footnotes.
Reported-by: Eric Anderson <kluwak@gmail.com>
Link: https://orgmode.org/list/691643eb-49d0-45c3-ab7f-a1edbd093bef@gmail.com
* lisp/ob-comint.el (org-babel-comint-prompt-regexp-old): New variable
storing the default value of `comint-prompt-regexp' to be used when
the prompt set by Org mode changes for some reason.
(org-babel-comint-fallback-regexp-threshold): New customization to set
the time Org babel waits for comint command to finish until trying
fallback prompt regexp.
(org-babel-comint--set-fallback-prompt): New internal function that
sets the fallback prompt regexp, if there is any available.
(org-babel-comint-with-output):
(org-babel-comint-wait-for-output): Try fallback prompt regexp when we
cannot find comint command end for too long.
* 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/ob-clojure.el (ob-clojure-eval-with-inf-clojure): Set
`org-babel-comint-prompt-regexp-old' when initializing the inferior
shell.
* etc/ORG-NEWS (New option
~org-babel-comint-fallback-regexp-threshold~): Document the new
customization.
Reported-by: Jack Kamm <jackkamm@tatersworld.org>
Link: https://orgmode.org/list/87sf2q9ubd.fsf@gmail.com
* lisp/Makefile (.NOTPARALLEL): Do not suppress parallel execution.
(all compile compile-dirty):
(compile-single):
(compile-native):
(compile-source):
(compile-slint1):
(compile-slint2): Explicitly declare prerequisites that must be run
sequentially.
* mk/targets.mk (.NOTPARALLEL): Do not suppress parallel execution.
(uncompiled):
(update update2):
(repro): Explicitly declare prerequisites that must be run
sequentially.
* lisp/org-element-ast.el (org-element--property-idx): Define inline
expansion within `eval-and-compile' to make sure that the expanded is
available at compile time.
See Emacs bug#68851.
* lisp/Makefile (LISPN): New variable listing all the valid .eln
targets.
(_ORGCM_):
(compile-native):
(native): New compile target.
(%.eln): Rule how to compile .eln files from .el files.
* mk/default.mk (ELN): Command to perform native compilation of a
single .eln file.
* mk/targets.mk (.PHONY):
(CONF_CALL): List the new targets and variables.
(native): Add target.
* lisp/org-num.el (org-num-face):
(org-num-max-level):
(org-num-skip-commented):
(org-num-skip-footnotes):
(org-num-skip-tags):
(org-num-skip-unnumbered): Autoload variables with :safe
specification. Without autoloading, if org-num is not loaded,
unexpected warning may be displayed when opening an Org file.
Reported-by: Chang Xiaoduan <drcxd@sina.com>
Link: https://list.orgmode.org/orgmode/87jznf7gqo.fsf@PWRD-20230207OU./
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress): When matching specific date in timestamp,
do not demand that timestamp to contain day name.
Reported-by: Stephen J. Eglen <sje30@cam.ac.uk>
Link: https://orgmode.org/list/874jejrij6.fsf@localhost
* lisp/org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
Move 'repeated-after-deadline value into a new custom option.
(org-agenda-skip-scheduled-repeats-after-deadline): Create a new
custom option to make agenda hide scheduled entries repeated past
deadline.
* lisp/org-agenda.el (org-agenda-get-scheduled): Use the new custom
option. Do not demand deadline to be actually shown when deciding
whether to skip scheduled repeats past deadline. This fixes a bug
when repeats continue to be displayed if past deadline is not
displayed within agenda span.
* doc/org-manual.org (Repeated tasks): Adjust manual entry, mentioning
the new custom option.
* etc/ORG-NEWS (~repeated-after-deadline~ value of
~org-agenda-skip-scheduled-repeats-after-deadline~ is moved to a new
customization): Announce the change.
*
testing/lisp/test-org-agenda.el (test-org-agenda/skip-scheduled-repeats-after-deadline):
Add new test.
Reported-by: Morgan Smith <Morgan.J.Smith@outlook.com>
Link: https://orgmode.org/list/874jft6vpj.fsf@localhost
* lisp/org.el (org-update-parent-todo-statistics): When the updated
statistics cookie is unchanged, do not modify buffer. This prevents
unnecessary queries to element cache.
* lisp/org-footnote.el (org-footnote-new, org-footnote-auto-label):
Add symbol `anonymous' to `org-footnote-auto-label'. With this,
anonymous footnotes will be created. This is sometimes useful in long
texts. Mimics \footnote{} in LaTeX. Modify `org-footnote-new' to
generate anonymous footnotes directly.
* lisp/org.el (org-startup-options): Add `fnanon' to startup options.
* testing/lisp/test-org-footnote.el (test-org-footnote/new-anon): Add
a test for creation of anonymous footnotes.
* etc/ORG-NEWS:
(~org-footnote-new~ can be configured to create anonymous footnotes):
Announce new anonymous footnote support.
* doc/org-manual.org (Summary of In-Buffer Settings): Document
"fnanon" startup option.
* lisp/org-crypt.el (org-decrypt-entry): When decrypted subtree
contains headings with levels below the containing heading, demote
that subtree, so that originally encrypted text remains under the same
parent heading. This is useful when encrypted heading is promoted.
* lisp/ox-latex.el (org-latex--label): Consider :results property in
addition to :name property of the datum. For datums that are results
of evaluation, the label may not only come from #+name keyword, but
can also be duplicated from the generating src block.
(org-latex--wrap-label): Do not limit label to elements with #+name.
Rely on `org-latex--label' to return appropriate label (or nil).
Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/6d9db4be5d42236391d5c4e530250ee1@posteo.net
* lisp/org-capture.el (org-capture-set-target-location): Tighten
matching the template target location when the location value is not
properly formatted.
* lisp/org.el (org--confirm-resource-safe): Do not assume that
resource is safe when user replies "n" (do not download).
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/upj6uk$b7o$1@ciao.gmane.io
* lisp/ox-latex.el (org-latex-prefer-user-labels): make it a safe file
local variable for consistency with `org-latex-reference-command' and
`org-html-prefer-user-labels' being also safe file local variables.
* lisp/org-fold-core.el (org-fold-core-style): Set default value to
'overlays in newer Emacs versions. Newer Emacs does not have
performance issues with overlays and using text-properties there is
not beneficial due to numerous issues with most of Emacs code and
third-party packages that assume overlay-based folding.
* lisp/org-faces.el (org-table-row): New face.
* lisp/org.el (org-set-font-lock-defaults): Use ~org-table-row~ face
to fontify the whole table rows, including indentation and newlines.
* etc/ORG-NEWS (Org mode now fontifies whole table lines (including
newline) according to ~org-table~ face): Announce the change.
* lisp/ox-latex.el (org-latex-toc-command): specify clearer which
option settings use `org-latex-toc-command'. This shows also how
to specify a table of contents depth.
* lisp/org-table.el (org-table-header-set-header): Make sure that
Emacs finishes any queued redisplay before calculating window
boundaries. Do not make assumptions about the same character width of
table lines.
(org-table-row-get-visible-string): Refactor calculation of the visual
text representation. Inherit all the text properties - in particular,
composition. Collect non-intersecting overlays into text properties.
Reported-by: Ypo <ypuntot@gmail.com>
Link: https://orgmode.org/list/87a605oyht.fsf@localhost
This reverts commit 3f60acff77 and
subsequent relevant comments.
* lisp/ox-latex.el (org-latex-line-break-safe): Remove constant. The
\\[0pt] is actually not safe to use in some scenarios. We use a
different approach to avoid plain text [...] being interpreted as
LaTeX optional argument - we escape [ like {[}; that's what pandoc
does.
(org-latex-clock):
(org-latex-line-break):
(org-latex-plain-text):
(org-latex-planning):
(org-latex--org-table):
(org-latex--math-table):
(org-latex-table-row):
(org-latex-verse-block):
* testing/lisp/test-org-table.el (test-org-table/to-latex):
* testing/lisp/test-ox-latex.el (test-ox-latex/verse):
(test-ox-latex/longtable): Remove references to
`org-latex-line-break-safe'.
* etc/ORG-NEWS (=ox-latex=: ~org-latex-line-break-safe~ is removed):
Announce removal.
* lisp/org-compat.el (org-latex-line-break-safe): Make obsolete.
Link: https://orgmode.org/list/878r4jg37s.fsf@posteo.net
* lisp/ox-latex.el (org-latex-plain-text): Protect plain text starting
from [. It might be misinterpreted as optional command argument if
previous exported fragment ends with a command accepting such.
*
testing/lisp/test-ox-latex.el (text-ox-latex/protect-square-brackets):
Add new test.
Link: https://orgmode.org/list/87o7dju9vn.fsf@posteo.net
* lisp/org/ob-scheme.el (org-babel-scheme-get-repl): Introduce two
optional arguments: host and port. If these are not given, just run
Geiser as before. In the case when both are given, connect to the
remotely running Scheme process.
* lisp/org/ob-scheme (org-babel-scheme-execute-with-geiser,
org-babel-execute:scheme): Take these optional arguments into account.
* lisp/org/ob-scheme.el (org-babel-header-args:scheme): Define host
and port header arguments for completion.
TINYCHANGE
* lisp/org.el (org-todo): When title contains link, we cannot use
`org-fold-region' to unfold everything - this may cause unexpected tag
alignment when the link is revealed and font-locking is not yet
triggered. Instead of unfolding everything, just remove outline folds.
Reported-by: Peter Solodov <solodov@gmail.com>
Link: https://orgmode.org/list/413C89C3-25DB-425B-A367-FA683E7ADD05@gmail.com
* lisp/org-cycle.el (org-cycle-set-visibility-according-to-property):
Do not ignore :VISIBILITY: properties when parent also has
:VISIBILITY:.
*
testing/lisp/test-org-fold.el (test-org-fold/set-visibility-according-to-property):
Add new test.
Similar to how :VISIBILITY: overrides #+STARTUP folding settings,
child :VISIBILITY: should override parent :VISIBILITY:.
The previous version of the code was skipping child VISIBILITY
property to address
https://lists.gnu.org/r/emacs-orgmode/2019-01/msg00402.html
However, that problem in that bug report was not with child VISIBILITY
property, but rather with previous implementation detail that
`org-reveal' was called prior to setting VISIBILITY. That affected
parent headings as well and no longer a problem.
Reported-by: John Mathena <jmmathena@gmail.com>
Link: https://orgmode.org/list/87tucu99od.fsf@localhost
* lisp/org-agenda.el: Add `org-agenda-start-with-archives-mode'.
(org-agenda-mode): Set value of `org-agenda-archive-mode' according to
value of new variable `org-agenda-start-with-archives-mode'.
* doc/org-manual.org: Note new variable in the documentation of
`org-agenda-archives-mode'.
* etc/ORG-NEWS: Note change to add
`org-agenda-start-with-archives-mode'.
* lisp/org-src.el (org-src-preserve-indentation): Add that this
option is also honored by `org-indent-block'. Remove \\<org-mode-map>
since such forms serve for major mode documentation strings.
* lisp/org.el (org-update-parent-todo-statistics): Ignore text
matching statistics cookie that is inside verbatim environments or
otherwise not detected by parser. Leave a single exception for
headline properties for backwards compatibility.
* lisp/ob-python.el (org-babel-python-associate-session): New function
setting `python-shell-buffer-name' in *Org Src* buffer according to
source block's :session parameter. This function will be triggered by
`org-src-associate-babel-session'.
* etc/ORG-NEWS (ob-python now sets ~python-shell-buffer-name~ in Org
edit buffers): Announce the change.
Co-authored-by: Liu Hui <liuhui1610@gmail.com>
Link: https://orgmode.org/list/CAOQTW-MdC=jiGf+3bEVtfww+izSZix7csBJ+mZ4eZ2BQHDR42w@mail.gmail.com
* lisp/org.el (org-latex-default-packages-alist): Change to refine
font management depending on the latex compiler.
Differentiate between pdflatex and lualatex/xetex
packages for font management. lualatex/xetex should use
fontspec instead of fontenc/inputenc. When using
fontspec, you need to load amsmath before fontspec
and you don't need amssymb.
This commit adds functionality for ox-icalendar to set X-PUBLISHED-TTL
in the exported ICS, which advises a subscriber to the exported ICS
file to reload after the given time interval.
* lisp/ox-icalendar.el (org-icalendar-ttl): New option to set
X-PUBLISHED-TTL in exported ICS
(icalendar): Add ICAL-TTL export keyword
(org-icalendar--vcalendar): Add argument for TTL
(org-icalendar-template, org-icalendar-export-current-agenda,
org-icalendar--combine-files): Pass TTL to `org-icalendar--vcalendar'
Co-authored-by: Ihor Radchenko <yantar92@posteo.net>
Co-authored-by: Jack Kamm <jackkamm@gmail.com>
* lisp/org-compat.el (org-switch-to-buffer-other-window): Suppress
compiler warning - we are using obsolete macro instead obsolete
function. They will be removed together.
* lisp/ob-R.el (org-babel-R-associate-session): Set
`ess-gen-proc-buffer-name-function' to associate the right session
buffer if user requests session interaction from inside Org Src edit
buffer.
(org-babel-edit-prep:R): Remove in favor of
`org-babel-R-associate-session'.
* lisp/ob-julia.el (org-babel-julia-associate-session): Implement
analogous functionality.
(org-babel-edit-prep:julia): Remove in favor of
`org-babel-julia-associate-session'.
* etc/ORG-NEWS (~org-edit-special~ no longer force-starts session in R
and Julia source blocks): Document the change.
* lisp/org-src.el (org-src-associate-babel-session): Run
org-babel-<lang>-associate-session even when session is not yet
initiated.
Link: https://orgmode.org/list/87r0ir2ln8.fsf@gmail.com
* lisp/ob-tangle.el (org-babel-tangle): Throw an error when trying to
tangle into the org file we tangle from.
* etc/ORG-NEWS (It is no longer allowed to tangle into the same file
as Org source): Document the breaking change.
* testing/lisp/test-ob-tangle.el (ob-tangle/tangle-to-self): New test.
* lisp/ox-icalendar.el (org-icalendar-entry): Use `org-entry-get' to
account for both PROP and PROP+ in SUMMARY, LOCATION, and DESCRIPTION
properties. Use newline as accumulated value separator.
* etc/ORG-NEWS (iCalendar export now supports multiline =SUMMARY=,
=LOCATION=, and =DESCRIPTION= properties): Announce the breaking
change.
* doc/org-manual.org (iCalendar Export): Add an example in the manual.
Reported-by: Hanno Perrey <hanno@hoowl.se>
Link: https://orgmode.org/list/87o821dv7o.fsf@localhost
* lisp/org-attach.el (org-attach-store-link-p): Change the default
value.
* etc/ORG-NEWS (The default value of ~org-attach-store-link-p~ is now
~attached~): Announce the change.
* lisp/org-element.el (org-element-object-restrictions): Allow all but
citation, citation-reference, line-break, table-cell, link and
footnote-reference objects inside citations.
Reported-by: M. ‘quintus’ Gülker <post+orgmodeml@guelker.eu>
Link: https://orgmode.org/list/87tu425pla.fsf@guelker.eu
* lisp/org-fold-core.el (org-fold-core-region): When folding, when the
fold ends at a newline, copy 'face property from the beginning of the
fold, so that the trailing newline after ellipsis does not appear
with different face. This fixes :extend t in headlines, blocks, and
drawers not being honored when the headlines are folded.
* etc/ORG-NEWS (Folded lines can now extend their face beyond
ellipsis): Announce the change.
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65896
* lisp/org.el (org-startup-options): Add new startup options to set
`org-link-descriptive'.
(org-mode): Move #+startup keyword parsing before setting up link
visibility.
* doc/org-manual.org (Link Format):
(Summary of In-Buffer Settings): Document the new startup option.
* etc/ORG-NEWS (~org-link-descriptive~ can now be set per-buffer via
=#+STARTUP= options): Announce the new feature.
Link: https://orgmode.org/list/87bkst1nfl.fsf@ucl.ac.uk
* lisp/org.el (org-open-at-point-global): Match multiline links
spanning up to a paragraph.
Reported-by: Omar Antolín Camarena <omar@matem.unam.mx>
Link: https://orgmode.org/list/87o7df7psx.fsf@localhost
* lisp/ox-latex.el (org-latex-src-block-backend)
(org-latex-engraved-theme): Improve docstring; mention that
engrave-faces is a GNU ELPA package.
Improve two docstrings in ox-latex
6653ee66ca5ebd42322613a09d4c0d2e35af924b
Stefan Kangas
Sun Jan 14 14:52:17 2024 +0100
* lisp/org.el (org--get-outline-path-1): Remove comment keyword from
title when current heading is commented.
* testing/lisp/test-org.el (test-org/get-outline-path): Add test.
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Let-bind
`org-agenda-default-appointment-duration' to nil when formatting the
grid lines. Otherwise, `org-agenda-format-item' logic fails to
produce the expected result.
* testing/lisp/test-org-agenda.el (test-org-agenda/time-grid): Add new
test set covering the bug and several simpler cases.
* testing/examples/agenda-file2.org (two): New test file example.
Reported-by: Detlef Steuer <steuer@hsu-hh.de>
Link: https://orgmode.org/list/87edv5fv1w.fsf@localhost
* lisp/oc-basic.el (org-cite-basic-export-citation): Fix formatting
citation reference with brackets. When year is placed inside
brackets, put the reference suffix outside.
* lisp/ox-latex.el (org-latex-generate-engraved-preamble):
(org-latex-latex-environment): Use
`org-latex--caption-above-p' to query whether an element should have
its caption above.
Reported-by: Mads Bach Villadsen <mbvilladsen@pm.me>
Link: https://orgmode.org/list/m2zfx69uhb.fsf@pm.me
* lisp/ox.el (org-export-insert-image-links): Fix call to
`org-element-set-contents' - setting "nil" literally would put an
actual nil element into contents.
* lisp/ox-latex.el (org-latex--inline-image): Do not use float
environment unless the inline image is a single image inside
paragraph. The code is adapted with simplifications from
`org-html-standalone-image-p'.
* testing/lisp/test-ox-latex.el (test-ox-latex/inline-image): New
test.
Reported-by: Dr. Arne Babenhauserheide <arne_bab@web.de>
Link: https://orgmode.org/list/878rest3qv.fsf@localhost
* lisp/org.el (org-next-visible-heading): Really test for visibility;
not folding. Some folds may not be invisible - when
`org-link-descriptive' is nil, links are folded yet visible.
* testing/lisp/test-org.el (test-org/next-visible-heading): Add new
test case.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2bk9q7adw.fsf@me.com
* 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-table.el (org-table-make-reference): Comment out the code
that always returns nil, replacing it with explicit nil. This line is
certainly a fault in logic, but we do not know of any associated bugs.
So, just leave a FIXME to potential future refactoring and avoid the
compiler complaining about this code every time.
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress): Do not assume that all the timestamps have
length of exactly 12 (English). Use options argument for
`org-time-stamp-format' instead to drop brackets from the timestamp.
* lisp/org-fold-core.el (org-fold-core--fix-folded-region): Delay
revealing fragile regions to until the current command is executed.
(org-fold-core--region-delayed): New function to postpone folding to
the time when `post-command-hook' is executed.
(org-fold-core--region-delayed-list): New internal variable holding
delayed fold requests.
(org-fold-core--process-delayed): New function to be used to process
the delayed folds and cleanup `post-command-hook'.
*
testing/lisp/test-org-fold.el (test-org-fold/org-fold-reveal-broken-structure):
Update tests to account for the delayed unfolding.
Reported-by: Sebastian Miele <iota@whxvd.name>
Link: https://orgmode.org/list/875y04yq9s.fsf@localhost
* lisp/org-fold-core.el (org-fold-core--suppress-folding-fix):
(org-fold-core-suppress-folding-fix): New macro suppressing re-folding
checks.
(org-fold-core--fix-folded-region): Skip re-folding checks when
`org-fold-core--suppress-folding-fix' is non-nil.
* lisp/org.el (org-self-insert-command): Use
`org-fold-core-suppress-folding-fix' to bypass re-folding checks, but
not fragility checks.
*
testing/lisp/test-org-fold.el (test-org-fold/org-fold-reveal-broken-structure):
New test.
* lisp/org-pcomplete.el (org-parse-arguments): Parse text between [[*
and point as a single "argument" for pcomplete. This avoid weird
breakage when treating every space-separated text in the line as an
argument.
(pcomplete/org-mode/searchhead): Do not alter `pcomplete-stub' - it is
no longer necessary as `org-parse-arguments' now takes care about not
including * and ] into the stub.
Warning! pcomplete code is rather tricky and it is not always clear if
Org's approach is not overusing internals of pcomplete.
Reported-by: Ignacio Casso <ignaciocasso@hotmail.com>
Link: https://orgmode.org/list/87ils0lut8.fsf@localhost
* 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
* lisp/ob-R.el (org-babel-R-initiate-session):
* lisp/ob-julia.el (org-babel-julia-initiate-session): Do not use the
hack with renaming ESS buffer and instead indicate the session buffer
name to ESS appropriately through `ess-gen-proc-buffer-name-function'.
Link: https://orgmode.org/list/871qb21bp7.fsf@gmail.com
* lisp/org-src.el (org-edit-src-code): Make sure that
`org-coderef-label-format' and `org-src--babel-info' are set before
`org-src-mode-hook' is executed. Earlier,
`org-src-babel-configure-edit-buffer' that is by default present in
the hook would do nothing as it relies upon `org-src--babel-info'
being set.
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/org-agenda.el
(org-todo-list): Use `org-today' directly for `calendar-gregorian-from-absolute'.
(org-todo-list): Replace `date' with `today' (`date' is no longer used).
(org-todo-list): Replace `kwds' with `todo-keywords'.
(org-todo-list): Replace `rtn' with `todo-entries'.
(org-todo-list): Replace `rtnall' with `all-todo-entries'.
(org-todo-list): Replace some `and' with `when' and `cond'.
(org-todo-list): Some whitespace changes.
TINYCHANGE
* 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/org-protocol.el: Minor copy-edits to Commentary.
org-protocol: Minor copy-edits to Commentary
55555a6a0d1d76468f8327972b3cb067b9e35f24
Stefan Kangas
Sat Dec 30 17:53:53 2023 +0100
*
lisp/ob-python.el (org-babel-python--python-util-comint-end-of-output-p):
Backport python-util-comint-end-of-output-p for emacs28.
(org-babel-python-initiate-session-by-key): Use backported version of
python-util-comint-end-of-output-p.
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Wait
for first prompt for pre-existing python processes. Document behavior
for pre-existing python processes.
(org-babel-python-initiate-session): Document behavior for
pre-existing python processes.
*
testing/lisp/test-ob-python.el (test-ob-python/session-with-existing-inferior-python):
New test for working with existing python processes.
* 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/org-element.el (org-element-link-parser): Record information
whether link type: is implicit or explicitly provided in the input
text. The information is saved into new link object property
`:type-explicit-p'.
(org-element-link-interpreter): Take into account `:type-explicit-p'
when interpreting link object.
(org-element-cache-version): Bump AST version.
* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
Add new test.
Reported-by: Joseph Turner <joseph@ushin.org>
Link: https://orgmode.org/list/87o7e9ei3p.fsf@ushin.org
* lisp/org-macs.el (org-string-width): Add new optional argument
providing reference face to be used for relative width calculation.
Use `ceiling' when the total string width is a fraction of "a" width.
* lisp/org-table.el (org-table-blank-field):
(org-table-clean-line):
(org-table--shrink-field):
(org-table--align-field):
(org-table-align):
(org-table-justify-field-maybe): Use org-table face as reference for
width calculation.
When org-table face is not default, `org-string-width' may not return
correct width as " " and "-" in the table may not have the same width
as "a" with default face used as reference in `org-string-width'.
With this patch, the width calculation becomes more accurate, although
may still be off if the table faces are customized to be more
piece-mill.
Reported-by: ltmsyvag
Link: https://emacs-china.org/t/org-9-6-5-org/24484
* lisp/org-macs.el (org-assert-version): Record
`org--inhibit-version-check' during compile time inside
`org-assert-version'. This way, .elc files generated when compiling
built-in Org mode in Emacs git tree never trigger version mismatch
warning.
Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com
* lisp/org-element.el (org-element-with-buffer-copy):
* lisp/ox.el (org-export-with-buffer-copy): Make sure that keyword
arguments in the macro are not duplicated into BODY, which happens for
&rest body + &allow-other-keys in `cl-defmacro'.
Reported-by: João Távora <joaotavora@gmail.com>
Link: https://yhetil.org/emacs-devel/CALDnm53p7nXdnbA2PuH-VHL7EeGQUXYy3x_87hp3oj2pkyWS9Q@mail.gmail.com/
* lisp/org-macs.el (org-assert-version): Record
`org--inhibit-version-check' during compile time inside
`org-assert-version'. This way, .elc files generated when compiling
built-in Org mode in Emacs git tree never trigger version mismatch
warning.
Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com
This reverts commit 36f61a9c8b.
Because of complex dependencies, it is not easy to properly "require"
`org-element-with-buffer-copy' in oc.el. So, reverting for now.
lisp/org-agenda.el (org-agenda-goto-date): Check agenda type earlier.
Also remove redundant error.
When this function is run on a todo agenda the user is given the
undescriptive error "(wrong-type-argument listp "todo")" because we
attempt to parse the 'org-last-args text-property prematurely. With
this change users will get the much better error "Not allowed in
'todo'-type agenda buffer or component".
* lisp/org-macs.el (org-assert-version): Do not throw an error - it is
preventing Org loading and creating more breakage than the problem it
is trying to solve (the version mismatch is problematic occasionally,
while the error was thrown every single time). Document what to do
when version mismatch is encountered for Org mode built inside Emacs
git repository.
Link: https://yhetil.org/emacs-devel/83frzsccuy.fsf@gnu.org/T/#t
* lisp/ox-latex.el (org-latex-table-row): Use all the rows when
constructing header definition.
* testing/lisp/test-ox-latex.el (test-ox-latex/longtable): Add new
test.
Reported-by: Brett Presnell <presnell@member.fsf.org>
Link: https://orgmode.org/list/87mt9zywco.fsf@localhost
* lisp/org.el (org-image--align, org-image-align,
org-toggle-inline-images): Add the ability to left-align, center
or right-align inline image previews in the Emacs window. This is
controlled globally using the new user option `org-image-align'.
Alignment can be specified per image using the `#+ATTR.*'
affiliated keywords. The function `org-image--align' determines
the kind of alignment for its argument link.
* lisp/org-lint.el (org-lint-invalid-image-alignment): Add an
org-lint checker to catch invalid ":align" and ":center"
attributes in `#+attr_org' keywords.
* doc/org-manual.org: Document the new feature under the Images
section.
* lisp/org-element.el (org-element-plain-list-interpreter): Use
`org-element-with-buffer-copy' and make sure that we do not run user
hooks. User hooks are often not designed to work in temporary
buffers. The changed approach also follows similar code elsewhere in
Org code.
* lisp/oc-csl.el (org-cite-csl-latex-label-separator): Make first line
of the docstring full sentence. Fix double space between sentences.
(org-cite-csl--create-structure-params): re-fill.
(org-cite-csl--no-citelinks-p): Document the function arguments.
* lisp/org-persist.el (org-persist-gc-lock-file): New constant naming
the lock file to store active sessions in.
(org-persist-gc-lock-interval): New variable defining session lock
refresh frequency.
(org-persist-gc-lock-expiry): New variable defining which sessions are
considered expired.
(org-persist--refresh-gc-lock): New function refreshing session
timestamp in `org-persist-gc-lock-file'.
(org-persist--gc-orphan-p): New function checking whether orphan files
should be garbage collected.
(org-persist-gc): Use `org-persist--gc-orphan-p'.
(org-persist--refresh-gc-lock-timer): New variable holding timer
refreshing GC lock file. Run the timer every
`org-persist-gc-lock-interval'.
This patch prevents files created in the other running Emacs sessions
from being garbage-collected.
* lisp/org.el (org-sort-entries): Make sure that we extend sorted
region to the full subtree if it spans beyond end of region.
* testing/lisp/test-org.el (test-org/sort-entries): Add test.
* lisp/org-lint.el (org-lint-colon-in-name):
(colon-in-name): Remove the checker. It is no longer a problem after
b5cfc311d that allows referring to named elements with name containing
colon.
* testing/lisp/test-org-lint.el (test-org-lint/colon-in-name): Remove
test.