0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 22:32:51 +00:00
Commit graph

18421 commits

Author SHA1 Message Date
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 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 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 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
Timothy 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
Timothy 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
Timothy 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
Kyle Meyer e84077ded3 Merge branch 'bugfix' 2023-01-22 21:46:52 -05:00
Kyle Meyer e37e9b692e org-persist: Silence recent byte-compiler warning
* lisp/org-persist.el: Bind pp-use-max-width to silence byte-compiler
warning about unused lexical variable.

Note that loading pp.el upfront rather than relying on the pp function
being autoloaded would also eliminate the warning, but that would only
work on Emacs 29 or later because earlier versions do not have the
pp-use-max-width option.
2023-01-22 21:45:57 -05:00
Kyle Meyer 6ae5430962 Merge branch 'km/from-emacs-29' into bugfix 2023-01-22 21:33:37 -05:00
Dmitry Gutov ebaf1c9c04 Backport commit 347933377 from Emacs
* lisp/ob-ruby.el: Fix outdated comments.

lisp/org/ob-ruby.el: Fix outdated comments.
34793337783489297313c67d4a56682514877597
Dmitry Gutov
Fri Jan 20 23:32:21 2023 +0200
2023-01-22 21:33:13 -05:00
Stefan Kangas 0ab9bc138f Backport commit 920a7d38e from Emacs
; Fix typos
920a7d38e96134289393b7bfcc3a7b88be73925b
Stefan Kangas
Sun Jan 15 02:14:19 2023 +0100

[km] These were likely not typos but intended as an abbreviation for
     "if and only if".  However, using "if" works fine in these spots,
     so let's just go along with the change.  (These may end up being
     reverted on Emacs's side; see emacs-devel
     <83a62k72lx.fsf@gnu.org>, 01-15.)
2023-01-22 21:33:13 -05:00
Timothy a9ee43a124
ox: Fix parsing of example #+includes
* lisp/ox.el (org-export-parse-include-value): Since the example
environment regexp does not contain a capture group, we can not assume
we can call `replace-match' on the first capture group.  Before doing
so, check that the capture group indeed exists.
2023-01-22 20:14:23 +03:00
Timothy f0dfbf0c39
ox-latex: Erase compile buffer at the start
* lisp/ox-latex.el (org-latex-compile): Before running the compile
command, erase the log buffer to ensure that stale/old logging is
cleared.
2023-01-22 18:18:43 +03:00
Timothy b84018633e
ox-latex: Split org-latex-compile into two funs
* lisp/ox-latex.el (org-latex-compile): Split off the postprocessing in
`org-latex-compile' into a new function,
`org-latex-compile--postprocess'.
2023-01-22 18:18:43 +03:00
Timothy 18d2f871c2
org: Split org-format-latex into two functions
* lisp/org.el (org-place-formula-image, org-format-latex): Extract the
overlay placement component of `org-format-latex' into a new function
`org-place-formula-image`.
2023-01-22 18:18:42 +03:00
Timothy d0c87c762a
ox-latex: Do not hardcode fallback compiler
* lisp/ox-latex.el (org-latex-compile): Instead of hardcoding "pdflatex"
as the fallback compiler, use `org-latex-compiler'.
2023-01-22 18:18:41 +03:00