Commit Graph

25786 Commits

Author SHA1 Message Date
Ihor Radchenko 9ef449224b
org-manual: Fix the location of "date tree" index entry
* doc/org-manual.org (Using capture):
(Template elements): Move the index reference to more appropriate
location.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25406.43056.751008.896240@gargle.gargle.HOWL
2022-10-07 12:01:10 +08:00
Stefan Kangas 0b67b9f64f
Improve documentation of org-kill-line
* lisp/org.el (org-special-ctrl-k): Doc fix; clarify what is being
killed and improve wording.  Add command substitutions.
(org-kill-line): Doc fix; mention user options that this command
relies on.
2022-10-07 11:47:45 +08:00
Stefan Kangas e28e3aaabb
Improve documentation of org-agenda-skip-*
* doc/org-manual.org (Special Agenda Views): Improve indexing.
* lisp/org-agenda.el (org-agenda-skip-function)
(org-agenda-skip-entry-if, org-agenda-skip-subtree-if): Expand
docstrings.
(org-agenda-skip-if): Doc fix; clarify wording.
2022-10-07 11:47:44 +08:00
Stefan Kangas 101280aa66
Add crossreference to org-stuck-projects docstring
* lisp/org-agenda.el (org-stuck-projects): Add Info manual reference
to docstring.
2022-10-07 11:47:43 +08:00
Liu Hui edf5afc1d8
Fix filter preset problem for sticky agenda
* lisp/org-agenda.el (org-agenda-local-vars):
(org-agenda-filters-preset): Add a new variable
`org-agenda-filters-preset' for storing per-buffer filter presets.
(org-agenda):
(org-agenda-filter-any):
(org-agenda-prepare):
(org-agenda-finalize):
(org-agenda-redo):
(org-agenda-filter-by-tag):
(org-agenda-filter-make-matcher):
(org-agenda-set-mode-name):
(org-agenda-reapply-filters): Use `org-agenda-filters-preset' for
getting and setting per-buffer filter presets, rather than modifying
the global symbol property.  Change `org-lprops' from symbol property
to per-buffer text property.  Delete unused `last-args' symbol
property.
* testing/lisp/test-org-agenda.el (test-org-agenda/sticky-agenda-filter-preset):
(test-org-agenda/redo-setting): Add tests.
2022-10-07 11:43:32 +08:00
Ihor Radchenko 580f286140
doc/org-manual.org: Fix typo
* doc/org-manual.org (Using the Mapping API): Fix incorrect
description of the return value of `org-map-entries'.  The return
value is a list, not alist.

Reported-by: Ignacio Casso <ignaciocasso@hotmail.com>
Link: https://orgmode.org/list/PAXPR06MB7760636DC6C66FB22B27E692C62F9@PAXPR06MB7760.eurprd06.prod.outlook.com
2022-10-06 19:10:21 +08:00
Ihor Radchenko f0b7dfb3a0
org-table: Repair table before inserting rows/columns
* lisp/org-table.el (org-table-insert-column):
(org-table-insert-row): Repair the table as needed before inserting.
The internal insertion logic assumes that the table is valid.  The
rapair checks are copied from `org-table-insert-hline'.

Reported-by: Mauro Aranda <maurooaranda@gmail.com>
Link: https://orgmode.org/list/87o8csah5t.fsf@localhost
2022-10-06 16:22:57 +08:00
Ihor Radchenko 224708323e
org-clock: Do not assume that clock is always inside capture buffer
* lisp/org-capture.el (org-capture): Store the clock marker in `org-capture-clock-was-started'.
(org-capture-clock-was-started): Document that the variable holds
clock marker.
(org-capture-finalize): Check the stored value of the clock marker
when deciding if the currently running clock has been started by
capture.

Reported-by: Bernt Hansen <bernt@norang.ca>
Link: https://orgmode.org/list/878rza7c0w.fsf@localhost
2022-10-06 16:00:59 +08:00
Ihor Radchenko 5adde9f3fe
* doc/org-manual.org (Handling Links): Remove incorrect footnote
The timestamps are, in fact, not removed in the link.

Reported-by: Ypo <ypuntot@gmail.com>
Link: https://list.orgmode.org/d7823d10-db69-e52b-8469-4beeb5996915@gmail.com/
2022-10-05 17:53:37 +08:00
Ihor Radchenko 2c8bd0cc9b
org-fill-element: Respect region selection when filling src-block
* lisp/org.el (org-fill-element): When region is not active, run
`fill-paragraph' at point inside src block.  When region is active and
within src block boundaries, run `fill-paragraph' preserving the
region.  When region is active and crosses src block boundaries, fill
the whole src block.

Reported-by: Fabio Natali <me@fabionatali.com>
Fixes: https://orgmode.org/list/201b44de-1f97-1b23-1767-970ee00f259c@posteo.eu
2022-10-05 13:20:58 +08:00
Ihor Radchenko ceb99b8600
org-table-fix-formulas: Ensure shifting columns after removing invalid
* lisp/org-table.el (org-table-fix-formulas): Search from the
beginning of table formula when shifting moved column numbers.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87r1gaw0av.fsf@mat.ucm.es
2022-10-05 13:13:36 +08:00
Ihor Radchenko e305755b1a
org-element: Parse malformed clock lines as paragraphs
* lisp/org-element.el (org-element-clock-line-re): Update the regexp
matching the actual required clock line structure.
(org-element--set-regexps): Use `org-element-clock-line-re'.

Link: https://orgmode.org/list/87h7571bpb.fsf@localhost
2022-10-05 12:51:46 +08:00
Kyle Meyer 1f8cc85542 org-agenda: Replace 29.1 version keywords with package-version
* lisp/org-agenda.el (org-agenda-block-separator):
(org-agenda-time-grid):
(org-agenda-current-time-string): Replace version keyword with
package-version keyword.

Prefer package-version so that the help buffer shows

  This variable was introduced, or its default value was changed, in
  version 9.6 of the Org package that is part of Emacs 29.1.

rather than

  This variable was introduced, or its default value was changed, in
  version 29.1 of Emacs.
2022-10-04 21:07:19 -04:00
Kyle Meyer 95a4c59bfe compat: Add compatibility wrapper for format-prompt
* lisp/org-compat.el (org-format-prompt): New compatibility
function.
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-refile.el (org-refile-get-location): Use org-format-prompt.

Prefer a wrapper to inlining compatibility kludges.

This is a follow-up to the port of Emacs's 664094222.
2022-10-04 18:38:25 -04:00
Kyle Meyer 07b6a0e044 compat: Use org- wrapper for string-equal-ignore-case compatibility
* lisp/org-compat.el (org-string-equal-ignore-case): New compatibility
function.
(org-mode-flyspell-verify):
* lisp/ob-core.el (org-babel-results-keyword):
(org-babel-insert-result):
* lisp/org-lint.el (org-lint-duplicate-custom-id):
* lisp/ox.el (org-export-resolve-radio-link):
Use org-string-equal-ignore-case.

Prefer an explicit org- wrapper to isolate the kludge and avoid any
confusion about where it is defined.

This is a follow-up to the port of Emacs's 70341cab3.
2022-10-04 18:38:25 -04:00
Kyle Meyer 75d63533d3 compat: Move string-equal-ignore-case to correct section
Emacs's 70341cab3 put this in the "Emacs < 24.4 compatibility" section
(which no longer exists in main), but string-equal-ignore-case is new
to Emacs 29.
2022-10-04 18:38:25 -04:00
Kyle Meyer 98e168b489 compat: Add compatibility wrapper for string-clean-whitespace
* lisp/org-compat.el (org-string-clean-whitespace): New compatibility
function.
* lisp/ox.el (org-export-resolve-radio-link): Use
org-string-clean-whitespace.

This is a follow-up to the port of Emacs's 70341cab3.
2022-10-04 18:38:25 -04:00
Kyle Meyer 0e0fe76ae4 ox-icalendar: Fix time zone construct from recently ported commit
* lisp/ox-icalendar.el (org-icalendar--combine-files): Correct typo in
format-time-string specifier.

This is a follow-up to the port of Emacs's e0ca8f791.
2022-10-04 18:38:25 -04:00
Kyle Meyer 6dd736ab35 ol-eshell: Make recently ported change compatible with Emacs < 29
* lisp/ol-eshell.el (org-eshell-open): Inline action if
display-comint-buffer-action isn't bound.

This is a follow-up to the port of Emacs's 18b680cfd.
2022-10-04 18:38:25 -04:00
Kyle Meyer abc34b458f org-mouse: Make recently ported change compatible with Emacs < 29
* lisp/org-mouse.el (org-mouse-show-context-menu): Conditionally
restore old code path, falling back to double-click-time if
mouse-double-click-time isn't available.

This is a follow-up to the port of Emacs's 2fba71cf1.
2022-10-04 18:38:25 -04:00
Kyle Meyer 42c418693f Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
Kyle Meyer aeb934b598 Merge branch 'km/from-emacs-28' 2022-10-04 18:36:31 -04:00
Kyle Meyer 631d4eb6af org-macs: Move org-current-text-indentation to silence byte-compiler
Move org-current-text-indentation upstream of first use to avoid 'make
single' (and the Emacs repo) reporting

  org-macs.el:1106:11: Warning: macro ‘org-current-text-indentation’ defined too
      late
2022-10-04 18:36:19 -04:00
Lars Ingebrigtsen 9b62bcc9c6 Backport commit 8dacd8cd9 from Emacs
* lisp/org/org-macro.el (vc-exec-after): Update declaration.

Add a new command vc-pull-and-push
8dacd8cd914fdbe0f6f17ca57915611d48e9124d
Lars Ingebrigtsen
Sat Sep 24 15:19:03 2022 +0200
2022-10-04 17:18:04 -04:00
Stefan Kangas c2c8e66e5d Backport commit b7e867b84 from Emacs
Make point-at-eol and point-at-bol obsolete
b7e867b841f47dcff3aeaef9b5608a237386ce70
Stefan Kangas
Tue Aug 23 04:54:57 2022 +0200

[ km: This was independently covered on the main branch with
  e73c5b7d0.  I'm applying it here too for bookkeeping/traceability
  purposes. ]
2022-10-04 17:18:04 -04:00
Lars Ingebrigtsen 9c2bc2877f Backport commit 06d716147 from Emacs
Fix some no-X build warnings
06d7161476255c77defa119fffa842b7abaa0dcb
Lars Ingebrigtsen
Mon Aug 22 19:22:33 2022 +0200
2022-10-04 17:18:04 -04:00
Lars Ingebrigtsen add8552b1d Backport commit 48aacbf29 from Emacs
* lisp/oc-basic.el (org-cite-basic--set-keymap): Adjust
buffer-substring generalized variable usage.

Make many seldom-used generalized variables obsolete
48aacbf292fbe8d4be7761f83bf87de93497df27
Lars Ingebrigtsen
Sun Aug 21 22:12:43 2022 +0200

[ km: This was independently covered on the main branch with
  a526ea6a3.  I'm applying it here too for bookkeeping/traceability
  purposes. ]
2022-10-04 17:18:04 -04:00
Stefan Kangas e58217ff1f Backport commit 57259773b from Emacs
; * lisp/org/org.el: Delete unnecessary declarations.
57259773b4f0b992e38843859a8b93d82317ded3
Stefan Kangas
Sun Aug 14 23:46:33 2022 +0200
2022-10-04 17:18:04 -04:00
Stefan Kangas 25e638f726 Backport commit 1137219c9 from Emacs
Make compat alias image-refresh obsolete
1137219c97dda512a309ce4bfad5abde0d2be206
Stefan Kangas
Tue Aug 9 14:04:39 2022 +0200

[ km: This was independently covered on the main branch with
  e73c5b7d0.  I'm applying it here too for bookkeeping/traceability
  purposes. ]
2022-10-04 17:18:04 -04:00
Peder O. Klingenberg 2ac8c44f04 Backport commit b335e1a04 from Emacs
* lisp/org.el (eq): Fix load of compiled or compressed
org-loaddefs (bug#56982).

* lisp/org/org.el: Fix load of compiled or compressed org-loaddefs
b335e1a0469105bb55b9741ae3106dc0a6023ce2
Peder O. Klingenberg
Thu Aug 4 20:27:56 2022 +0200
2022-10-04 17:18:04 -04:00
Stefan Kangas 883f87c3e7 Backport commit 4d64c39fa from Emacs
; * lisp/org/ob-lilypond.el: Add FIXME.
4d64c39fad481f2dc125aa4d207ab191bf697529
Stefan Kangas
Thu Aug 4 14:48:44 2022 +0200
2022-10-04 17:18:04 -04:00
Lars Ingebrigtsen 1bbd86310a Backport commit 4c1bc8315 from Emacs
* lisp/ob-core.el (org-src-sha): Avoid triggering the
`register-definition-prefixes' in doc strings (bug#56968).

Fix up some prefix registration problems in doc strings
4c1bc8315d8e677e4eeb2760d7a5ab7b7553359b
Lars Ingebrigtsen
Thu Aug 4 11:03:10 2022 +0200
2022-10-04 17:18:04 -04:00
Lars Ingebrigtsen e9df837d8a Backport commit 0a6e2b3bf from Emacs
* lisp/ox.el (org-export-to-file): Fix quoting of #' in doc strings.

Fix quoting of #' in some doc strings
0a6e2b3bfce8b5ae9e713e0668cb3cf5609073e2
Lars Ingebrigtsen
Wed Aug 3 13:14:32 2022 +0200
2022-10-04 17:18:04 -04:00
Lars Ingebrigtsen 19c3969e75 Backport commit 2682ea1b3 from Emacs
* lisp/org.el (org-dynamic-block-define): Autoload because
it's referred to in org-loaddefs.el.

Fix org.el byte-compile warning in org-loaddefs.el
2682ea1b3a9524eb54efac41b3221b514374c232
Lars Ingebrigtsen
Sun Jul 31 11:43:48 2022 +0200
2022-10-04 17:18:04 -04:00
Stefan Kangas e7059f7dbe Backport commit 22a5f0223 from Emacs
* lisp/org.el (org-file-apps):
Doc fixes; don't mention XEmacs specific library EFS.

Doc fixes: don't mention EFS
22a5f022344af8c0c0a9eddc2ac5ad36392d0cef
Stefan Kangas
Thu Jul 28 10:48:38 2022 +0200
2022-10-04 17:18:04 -04:00
Sam Steingold e614a763ca Backport commit 70341cab3 from Emacs
* lisp/ob-core.el (org-babel-results-keyword):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(org-babel-insert-result): Likewise.
* lisp/org-compat.el (string-equal-ignore-case):
  Define unless defined already.
(org-mode-flyspell-verify): Use `string-equal-ignore-case'.
* lisp/org-lint.el (org-lint-duplicate-custom-id): Likewise.
* lisp/ox.el (org-export-resolve-radio-link): Use
  `string-equal-ignore-case' and `string-clean-whitespace'.

string-equal-ignore-case: new function
70341cab3eb26e2f49bbc13d6bca247ab9403abc
Sam Steingold
Tue Jul 26 13:49:28 2022 -0400

[ km: Note that string-clean-whitespace also requires a compatibility
  kludge and the string-equal-ignore-case kludge was added to the
  wrong org-compat section.  These will be addressed in a follow-up
  commit. ]
2022-10-04 17:17:22 -04:00
Mattias Engdegård 1adbaca75a Backport commit 563bf2fae from Emacs
; * lisp/org/ol.el (org-link--decode-compound): `lsh` -> `ash`
563bf2fae5ec238172f1f16c81e51b9aadd77017
Mattias Engdegård
Wed Jul 20 13:51:55 2022 +0200
2022-10-04 17:10:50 -04:00
Stefan Kangas 07ca33e603 Backport commit 2a05479c2 from Emacs
; Fix typos: prefer American spelling
2a05479c221d4a13b15ed731e4eb1c0de99e97ed
Stefan Kangas
Thu Jul 14 12:13:31 2022 +0200
2022-10-04 17:10:50 -04:00
Stefan Kangas 69ba7a20be Backport commit 2a8d08360 from Emacs
The w3 package was removed from GNU ELPA in 2020 as it doesn't run on
a recent Emacs, and development had stopped over a decade before that.
If anyone wants to revive the w3 package, they should look this all
over, but it doesn't make sense for us to maintain this support code.
Ref: https://debbugs.gnu.org/25395

* lisp/ol.el (org-store-link): Remove w3 support code and related
documentation and comments.  (Bug#56435)
* doc/org-manual.org (Handling Links): Don't mention W3.

Drop support for the dead third-party w3 package
2a8d083607e7e0fe9358f1f6526dbd8aa928af61
Stefan Kangas
Sat Jul 9 17:27:49 2022 +0200
2022-10-04 17:10:50 -04:00
Stefan Kangas 675ec6771f Backport commit 9230953f2 from Emacs
; Fix typos.
9230953f23c432699347bb3eeadebd82e4cbbfaa
Stefan Kangas
Sat Jul 2 10:20:23 2022 +0200
2022-10-04 17:10:50 -04:00
Ihor Radchenko c77692e8fb Backport commit f94e93a6e from Emacs
* lisp/oc.el (org-cite-list-citations): Avoid quadratic complexity.
Pre-calculate list of all footnote definitions and cache the footnote
label search hits.  Do not make `org-element-map' accumulate unused
result.

org-cite-list-citations: Cache footnote-definition searches
f94e93a6eec92d834a6b545d8d4b68280b0993b0
Ihor Radchenko
Thu Jun 16 10:55:05 2022 +0300

[ km: This ported commit comes from main's b061e7b61.  I'm applying it
  here too for bookkeeping/traceability purposes.  ]
2022-10-04 17:10:50 -04:00
Ihor Radchenko 0da6c49f75 Backport commit 4f37a3b29 from Emacs
* lisp/org-element.el (org-element-map): Do not call `(plist-get info
:ignore-list)' on every iteration.

org-element-map: Avoid repetitive `plist-get' call
4f37a3b299bcec71a0e9bdd84b7b226494006fe4
Ihor Radchenko
Thu Jun 16 10:54:14 2022 +0300

[ km: This ported commit comes from main's 37a447ae0.  I'm applying it
  here too for bookkeeping/traceability purposes.  ]
2022-10-04 17:10:50 -04:00
Ihor Radchenko 8ac9203d5c Backport commit 979308b4c from Emacs
* lisp/ox.el (org-export-data): Use temporary buffer to collect export
data instead of `mapconcat'.  Using buffer puts less load on garbage
collector.

org-export-data: Concatenate strings in temporary buffer for performance
979308b4cad2b573606ed71a1689a47a9e7a9e98
Ihor Radchenko
Thu Jun 16 10:53:51 2022 +0300

[ km: This ported commit comes from main's a158b263a and was reverted
  in 811deae32.  I'm applying it here too for bookkeeping/traceability
  purposes, but these changes will be discarded when merged with
  main. ]
2022-10-04 17:10:50 -04:00
Ihor Radchenko 4ae72c6174 Backport commit 0f7ceb480 from Emacs
* lisp/ox.el (org-export-as): Use `buffer-chars-modified-tick' and
avoid extra invocations of `org-set-regexps-and-options' and
`org-update-radio-target-regexp' when the buffer is not changed.
Also, disable folding checks.  Folding is irrelevant inside export
buffer.

org-export-as: Do not update buffer settings when not modified
0f7ceb4803cabcb3c406fa7c27ccb7625096058e
Ihor Radchenko
Thu Jun 16 10:53:16 2022 +0300

[ km: This ported commit comes from main's 076dd92ac.  I'm applying it
  here too for bookkeeping/traceability purposes.  ]
2022-10-04 17:10:50 -04:00
Ihor Radchenko 4f8ea50604 Backport commit d21412df0 from Emacs
* lisp/ox.el (org-export-resolve-id-link): Pre-cache all the ids in
the parse tree for faster lookup.

org-export-resolve-id-link: Pre-cache all the ids in the parse tree
d21412df06b99b551e67d39c097d95e8a284de73
Ihor Radchenko
Thu Jun 16 10:52:54 2022 +0300

[ km: This ported commit comes from main's 84c89ea7c.  I'm applying it
  here too for bookkeeping/traceability purposes.  ]
2022-10-04 17:10:50 -04:00
Ihor Radchenko 07c5d066aa Backport commit 3236dedc2 from Emacs
* lisp/ox.el (org-export-resolve-fuzzy-link): Before matching LINK,
pre-process and cache all the non-nil search cells in the parse tree.
When matching, use the pre-processed info.  Fix the :test function for
the cache hash table.

org-export-resolve-fuzyy-link: Pre-cache all possible search cells
3236dedc2de5975afde877f7460bd012da89a98d
Ihor Radchenko
Thu Jun 16 10:52:36 2022 +0300

[ km: This ported commit comes from main's 792cd4b0a.  I'm applying it
  here too for bookkeeping/traceability purposes.  ]
2022-10-04 17:10:50 -04:00
Ihor Radchenko 303c89350e Backport commit 5b3d4e7bf from Emacs
* lisp/ox.el (org-export-get-footnote-definition): Pre-process parse
tree once to filter out all non-footnote elements.  This speeds up
subsequent footnote definition searches.

org-export-get-footnote-definition: Pre-cache references in parse tree
5b3d4e7bf0b6a1eb576e1c6e6592028e3589f792
Ihor Radchenko
Thu Jun 16 10:52:17 2022 +0300

[ km: This ported commit comes from main's f51c28671.  I'm applying it
  here too for bookkeeping/traceability purposes.  ]
2022-10-04 17:10:50 -04:00
Stefan Kangas 5a81ec0018 Backport commit 253374f81 from Emacs
* lisp/org-clock.el (org-clock-select-task): Remove XEmacs
compat code.

Remove some XEmacs compat code from org-mode
253374f81a13109b73afc8e319ca1fea72f68c72
Stefan Kangas
Sat May 14 15:55:20 2022 +0200
2022-10-04 17:10:50 -04:00
Stefan Kangas e74ea551bf Backport commit cc8b6101f from Emacs
* lisp/ol-eww.el (org-eww-copy-for-org-mode):
* lisp/ol-w3m.el (org-w3m-copy-for-org-mode):
* lisp/org-refile.el (org-refile):
* lisp/org.el (org-change-tag-in-region): Remove XEmacs compat
code.

Remove some XEmacs compat code from org-mode
cc8b6101f4479a80a6af7f9d80c6f9d774a85f40
Stefan Kangas
Fri May 13 23:17:16 2022 +0200
2022-10-04 17:10:50 -04:00
Stefan Kangas c06dc10f39 Backport commit 2fba71cf1 from Emacs
* lisp/org-mouse.el (org-mouse-show-context-menu): Use
'mouse-double-click-time' instead of 'double-click-time'.

Fix handling double-click-time nil or t
2fba71cf1fadc9d681e6be250d152cc156bf6a00
Stefan Kangas
Mon May 2 12:03:08 2022 +0200

[ km: Note that mouse-double-click-time isn't available until Emacs
  29; a follow-up commit will add a compatibility kludge. ]
2022-10-04 17:10:04 -04:00