Commit Graph

26156 Commits

Author SHA1 Message Date
Ihor Radchenko 6d37d2a8e7
* mk/targets.mk(GITVERSION): Provide commit number for shallow clones
Fall back to using git describe --always when git describe fails in
Org repo.

See https://orgmode.org/list/87bkmve8qv.fsf@gmail.com
2023-02-10 16:18:51 +03:00
Ihor Radchenko 9e9669a271
Merge branch 'bugfix' 2023-02-10 14:43:41 +03:00
Ihor Radchenko af1bb1b06a
org-compat: Work around Emacs bug#60467
* lisp/org-compat.el (version<): Use stub version of
`combine-change-calls' when it does not exist yet in Emacs or when it
is known to have a critical bug.  Use `org-combine-change-calls'
instead of overwriting the macro system-wide.
* lisp/org-footnote.el (org-footnote-sort):
* lisp/org.el:
(org-demote-subtree):
(org-paste-subtree): Use the new macro name.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/87ilhq74j8.fsf@localhost
2023-02-10 14:37:09 +03:00
Alan Schmitt 666a61bcc8
lisp/ox-beamer.el: add labels to latex export
* ox-beamer.el (org-beamer-environments-default): add label escape to
some environments
(org-beamer--format-block): generate label string for label escape
(org-beamer-environments-extra): document label escape

A new escape %l is available to be used in `org-beamer-environments-*'
to insert the label of the current block, obtained using
`org-babel--get-label'
2023-02-10 13:55:18 +03:00
Aaron L. Zeng 739ccf6cbf
org--batch-store-agenda-views: Fix treatment of lambda functions
* org-agenda.el (org--batch-store-agenda-views): Fix treatment of
lambda functions used as custom agenda commands.
`org-agenda-custom-commands' entries may specify a custom function
instead of a symbol like `tags-todo'.  `org--batch-store-agenda-views'
behaved differently from `org-agenda' when that custom function was
defined as a lambda rather than a symbol, incorrectly treating the
lambda form as a list of agenda commands.  Instead, use the same test
as `org-agenda' does to determine whether the command is a series.

TINYCHANGE
2023-02-09 12:59:24 +03:00
Ihor Radchenko 5d548c34fa
org-manual.org: Clarify what `org-timestamp-up'/`org-timestamp-down' does
* doc/org-manual.org (Clocking commands): Fix and add missing findex
entries.  Explain that only clocks recorded during current Emacs
session are considered when adjusting neighboring timestamps.

Reported-by: Robert Nikander <robert.nikander@icloud.com>
Link: https://orgmode.org/list/830BAEAD-AA4C-4226-A93E-1329B41194D7@icloud.com
2023-02-09 12:55:50 +03:00
Ihor Radchenko 6cbbf4cdbf
org-link-abbrev-alist: Fix :safe predicate
* lisp/ol.el (org-link-abbrev-alist): Check every element in the
alist when considering :safe values.

Reported-by: Qiantan Hong <qthong@stanford.edu>
Link: https://orgmode.org/list/950326F5-F72D-4F51-A946-F37E96971B08@stanford.edu
2023-02-08 16:44:34 +03:00
Ihor Radchenko c8a5fef910
Preserve active region after structure edits
* lisp/org-list.el (org-list-indent-item-generic):
* lisp/org.el (org-do-promote):
(org-do-demote): Do not deactivate mark after edits.
(org-metadown):
(org-metaup): Do not deactivate mark and do not exchange point and
mark in region.
* etc/ORG-NEWS (Datetree structure headlines can now be complex):
Announce the change.
2023-02-04 16:49:54 +03:00
Ihor Radchenko b665f8de31
org-metaup, org-metadown: Move subtrees in active region
* lisp/org.el (org-metaup):
(org-metadown): When active region contains headings, move the
containing subtrees according to the selection.  Do not deactive
region.
* testing/lisp/test-org.el (test-org/move-subtree): Add test.
* etc/ORG-NEWS (~org-metaup~ and ~org-metadown~ now act on headings in
region): Announce the new features.
2023-02-04 16:49:30 +03:00
Ihor Radchenko 581df107b0
org-clock-sum: Fix Emacs 26 compatibility after 2e901ed23
* lisp/org-clock.el (org-clock-sum): Use backwards-compatible
`org-encode-time'.
2023-02-04 13:46:23 +03:00
Ihor Radchenko ec5d76bce1
Merge branch 'bugfix' 2023-02-03 18:01:47 +03:00
Ihor Radchenko 657cb58f10
org-set-modules: Fix when called before org-element is loaded
* lisp/org.el (org-set-modules): Add `require' needed to ensure that
`org-element-cache-reset' is available.
2023-02-03 17:57:38 +03:00
Ihor Radchenko 2e901ed236
org-clock-sum: Optimize performance
* lisp/org-clock.el (org-clock-sum): Do not re-parse the timestamps,
reusing already-parser element.
2023-02-03 15:10:45 +03:00
Ihor Radchenko 0522c1850b
org-read-property-value: Fix DEFAULT arg when values are not restricted
* lisp/org.el (org-read-property-value): Honor DEFAULT argument when
property can have arbitrary value.

Reported-by: Janek F <xerusx@pm.me>
Link: https://orgmode.org/list/hh0ohv2LgPq86aW2Kp4AFV1VZ3yLuZafFLFqWN_NCciQcy86rxDkcZryr7gyPXrNzjFdP8lhdC0GS4c_XQtVXjOKDD-lqkJjlswSGX7OWvo=@pm.me
2023-02-03 14:42:35 +03:00
Ihor Radchenko 562cba7aab
Merge branch 'bugfix' 2023-02-03 14:29:32 +03:00
Liu Hui 3e23b8976e
org-agenda: Fix `org-agenda-filter-by-category'
* lisp/org-agenda.el (org-agenda-filter-by-category): Use
`org-agenda-get-category' to get the category at current line.

Link: https://orgmode.org/list/CAOQTW-MHsnEak_Oj_iyKBsnm6_j4WzOgThM_58a__uu10KenbQ@mail.gmail.com
2023-02-03 14:28:22 +03:00
Ihor Radchenko a411192c11
Merge branch 'bugfix' 2023-02-03 14:21:11 +03:00
Ihor Radchenko f33d241082
org-manual: Fix typos
* doc/org-manual.org (Property Syntax):
(Bulk remote editing selected entries):
(The Export Dispatcher):
(Include Files):
(ODT export commands): Fix command names.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25527.22953.318527.300303@gargle.gargle.HOWL
2023-02-03 14:19:44 +03:00
Ihor Radchenko e455df4a07
org-persist: Improve commentary
* lisp/org-persist.el: Update top comment.
(org-persist--index-hash):
(org-persist--report-time): Update docstrings.
2023-02-02 23:32:00 +03:00
Pedro Andres Aranda Gutierrez 8ae8a8462f
org-clock-clocktable-language-setup: Fix Spanish translation
* lisp/org-clock.el (org-clock-clocktable-language-setup): Translate
leftover English string and use more accurate translation for clocked
time.
2023-02-02 14:01:53 +03:00
Ihor Radchenko c8d20d023f
Merge branch 'bugfix' 2023-02-01 15:04:38 +03:00
Ihor Radchenko b4a1133a18
org-babel-eval: Clarify the purpose of 4a751709b in code
* lisp/ob-eval.el (org-babel-eval): Add comment.
2023-02-01 15:03:50 +03:00
Matthew Trzcinski 81c03fb850
lisp/ob-eval.el: Append newline to source block query
* lisp/ob-eval.el (org-babel-eval): Newline facilitates working with
Windows cmdproxy.exe.

Reported-by: "Osher Jacob" <osherz5@gmail.com>
Link: https://list.orgmode.org/orgmode/CAGsxwFZ88cybALCVGgma=5gENMhUa0Rk6xNkBNS_HdsmBgYe6w@mail.gmail.com/
2023-02-01 14:58:30 +03:00
Andreas Gerler 2cf8430350
lisp/ob-sql.el: allow string in sql-connection-alist
* ob-sql.el (org-babel-find-db-connection-param): read
sql-connection-alist like sql.el/sql-connect and allow strings.

Signed-off-by: Andreas Gerler <baron@bundesbrandschatzamt.de>
2023-02-01 14:58:03 +03:00
Ihor Radchenko 9a00f6cd78
org-cite: Clarify how multiple bibliography sources are combined
* doc/org-manual.org (Citations): Clarify that all the global and
local bibliographies are used to search citation keys.

Link: https://orgmode.org/list/87fsc0gimd.fsf@uwaterloo.ca
2023-02-01 14:08:35 +03:00
Ihor Radchenko b363ec04a2
Merge branch 'bugfix' 2023-02-01 00:21:06 +03:00
Ihor Radchenko 32b64607ad
org-element-cache-map: Fix when inside indirect buffer
* lisp/org-element.el: Query cache variables from the base buffer.
They are only kept up-to-date there.
* testing/lisp/test-org.el (test-org/map-entries): Add test.

Reported-by: Hanno Perrey <hanno@hoowl.se>
Link: https://orgmode.org/list/87pmau4fi3.fsf@hoowl.se
2023-02-01 00:18:56 +03:00
Marco Wahl 0d01a198bc org-attach: Show Org Attach UI starting from top
* org-attach.el (org-attach): Move cursor to the top of the
UI-description buffer.

This matters when the buffer does not fit completely in the window for
display.  Without the change the user would see the bottom part.
2023-01-30 23:01:17 +01:00
Matthew Trzcinski 4a751709b5 lisp/ob-eval.el: Append newline to source block query
* lisp/ob-eval.el (org-babel-eval): Newline facilitates working with
Windows cmdproxy.exe.

Reported-by: "Osher Jacob" <osherz5@gmail.com>
Link: https://list.orgmode.org/orgmode/CAGsxwFZ88cybALCVGgma=5gENMhUa0Rk6xNkBNS_HdsmBgYe6w@mail.gmail.com/
2023-01-30 12:05:22 -05:00
Andreas Gerler 1f86003a5d
lisp/ob-sql.el: allow string in sql-connection-alist
* ob-sql.el (org-babel-find-db-connection-param): read
sql-connection-alist like sql.el/sql-connect and allow strings.

Signed-off-by: Andreas Gerler <baron@bundesbrandschatzamt.de>
2023-01-30 17:57:04 +01:00
Ihor Radchenko 0509a84786
Merge branch 'bugfix' 2023-01-30 12:06:49 +03:00
Ihor Radchenko c340e799f8
org-element-cache-map: Always continue after point set by FUNC
* lisp/org-element.el (org-element-cache-map): Never map over element
starting before the point manually moved (or set via
`org-element-cache-map-continue-from') by FUNC.
* testing/lisp/test-org.el (test-org/map-entries): Add tests.

Reported-by: Matthieu Caneill <matt@brokenwa.re>
Link: https://orgmode.org/list/Y9MKUzWWbErLFhmq@brokenwa.re
2023-01-30 12:05:29 +03:00
Jack Kamm aa48c80fe1 ob-python: Remove python-mode.el support
* lisp/ob-python.el (org-babel-python-mode): Moved to ob-compat.el,
and changed to a constant.
(org-babel-python-initiate-session-by-key): Remove code to support
python-mode.el.
(org-babel-python-send-string): Renamed from
`org-babel-python--send-string', turning it into a public function to
accommodate ob-python-mode-mode which advises this function. Also,
remove some code for python-mode.el.
(org-babel-python-evaluate-session): Update calls to renamed function
`org-babel-python-send-string'.
* lisp/ob-compat.el (org-babel-python-mode): Moved from ob-python.el,
and changed to a constant.
2023-01-27 11:30:51 -08:00
Ihor Radchenko 265e4a5747
Merge branch 'bugfix' 2023-01-27 13:35:28 +03:00
Ihor Radchenko c45a058928
org-follow-timestamp-link: Fix when org-agenda is not yet loaded
* lisp/org.el (org-follow-timestamp-link): Explicitly require
org-agenda.

Reported-by: Michael Maurer <maurer.michael@gmail.com>
Link: https://orgmode.org/list/CAH-0+bBaYEWLkQ3XVuuO+qiXDwQC+9JB0D2y9nti-a5uvNzEeA@mail.gmail.com
2023-01-27 13:34:22 +03:00
Ihor Radchenko 0c00590606
lisp/ob-scheme: Silence compiler
* lisp/ob-scheme.el (geiser-eval--error-msg): Declare external
function.
2023-01-27 13:19:12 +03:00
Ihor Radchenko 1810c625df
org-clock-x11idle-program-name: Prefer "xprintidle", when available
* lisp/org-clock.el (org-clock-x11idle-program-name): Change the
default value to "xprintidle" when its executable is available.
Fallback to previous default otherwise.  Update :package-version and
remove :version tags.
* etc/ORG-NEWS (New and changed options):
(~org-clock-x11idle-program-name~ now defaults to =xprintidle=, when available):
Document the change.

Link: https://orgmode.org/list/874jvkn1po.fsf@localhost
2023-01-27 13:16:14 +03:00
Ihor Radchenko 6001313b8f
Merge branch 'bugfix' 2023-01-26 12:21:17 +03:00
Arash Esbati 65ca7bc6a7
lisp/ox.el: Pacify compiler warning
* lisp/ox.el (org-export-to-buffer): Escape single quote in the
example given in docstring.
Add missing '.' after the abbreviation.
2023-01-26 12:18:49 +03:00
TEC 3e23682d37
ox: Fix non-renamed variable (f to file)
* lisp/ox.el (org-export-expand-include-keyword): In 2fecd96200 "f"
was renamed to "file", but one usage was missed, which is corrected
here.
2023-01-25 21:30:11 +08:00
Marc Nieper-Wißkirchen f35fb8ac2a
lisp/ob-scheme.el: Do not hide Scheme evaluation errors
* lisp/ob-eval.el (org-babel-eval-error-notify): Handle an exit code of nil.

* lisp/ob-scheme.el (org-babel-expand-body:scheme)
(org-babel-scheme-get-repl, org-babel-scheme-make-session-name)
(org-babel-scheme-execute-with-geiser)
(org-babel-scheme--table-or-string, org-babel-execute:scheme):
Display Scheme evaluation errors in an error buffer using
`org-babel-eval-error-notify'.

TINYCHANGE
2023-01-25 16:04:06 +03:00
Ihor Radchenko 1bcab6c04f
org-assert-version: Clarify that Org loading is aborted
* lisp/org-macs.el (org-assert-version): Explicitly state that Org
loading is aborted.  Some users otherwise assume that the warning can
be ignored.  Also, remove sentence about `load-path' as it is
explained later in the warning text.
2023-01-24 23:12:32 +03:00
Ihor Radchenko a6c882949e
Merge branch 'bugfix' 2023-01-24 21:20:30 +03:00
Ihor Radchenko 20ee7b85eb
fixup! org-fix-agenda-info: Fix Emacs <28 compatibility 2023-01-24 21:08:49 +03:00
Ihor Radchenko 7ad7796546
org-update-dblock: Add comment
* lisp/org.el (org-update-dblock): Clarify that `org-update-dblock' is
called for side effects.

Reported-by: Marcin Borkowski <mbork@mbork.pl>
Link: https://orgmode.org/list/87sfg1nfii.fsf@mbork.pl
2023-01-24 12:49:02 +03:00
Ihor Radchenko 1f9249eb6e
Merge branch 'bugfix' 2023-01-24 12:21:05 +03:00
Ihor Radchenko 5bbb97f3df
org-fix-agenda-info: Fix Emacs <28 compatibility
* lisp/org-agenda.el (org-fix-agenda-info): Do not use `string-pad'
that is only available since Emacs 28.  Instead, use the expression
used as default value of `calendar-iso-date-display-form'.

Reported-by: Aaron L. Zeng <me@bcc32.com>
Link: https://orgmode.org/list/20230124025259.1301063-1-me@bcc32.com
2023-01-24 12:16:19 +03:00
TEC 6b15897a56
ox: Remove unused let binding
* lisp/ox.el (org-export-parse-include-value): The current indentation
is used for expansion in `org-export--blindly-expand-include' (and
handled there).  It is not used during #+include keyword parsing.
2023-01-23 23:11:30 +08:00
TEC 2fecd96200
ox: Regain Emacs <28 compatibility with #+include
* lisp/ox.el (org-export-expand-include-keyword): Replace the (pred (not
FUN)) `pcase' form introduced in Emacs 28 with a simple `cond' statement.
2023-01-23 23:11:30 +08:00
Ihor Radchenko 77a1cfb9a4
org-html-src-block: Treat code blocks without LANG equally
* lisp/ox-html.el (org-html-src-block): Do not treat src blocks
without LANG as example blocks.  Instead, export them using "nil"
language.  This way, such src blocks will get captions, unlike example
blocks.

The new behavior is consistent with ox-latex and ox-ascii.

Reported-by: Johan Bolmsjö <org-mode@johan.bitmaster.se>
Link: https://orgmode.org/list/87zgb90win.fsf@localhost
2023-01-23 16:29:13 +03:00