Commit Graph

23586 Commits

Author SHA1 Message Date
Stefan Kangas b2da9ea3b6 Backport commit 0da8118dc from Emacs
* lisp/org.el (org-revert-all-org-buffers): Use command substitution.

Use command substitution instead of raw keys in more places
0da8118dcbf3c54dd6ecc9c0e3314a56ca82ec51
Stefan Kangas
Fri Sep 24 21:26:08 2021 +0200
2021-09-26 22:49:55 -04:00
Lars Ingebrigtsen 63a5af9e8e Backport commit 85e9e5f61 from Emacs
* lisp/ox-html.el (org-html-htmlize-output-type):
* lisp/org-agenda.el (org-agenda-do-in-region): Don't quote t and nil.

Don't quote nil and t in doc strings and comments
85e9e5f616fb0fd0819a04006d6d2a0fb6d93ad7
Lars Ingebrigtsen
Tue Sep 21 22:11:43 2021 +0200
2021-09-26 22:49:55 -04:00
Lars Ingebrigtsen d9fcd078ff Backport commit 43c1ee90c from Emacs
* lisp/org-agenda.el (org-search-view): Don't use `format' on
strings that have no % format directives in them.

Don't use `format' on strings without % format directives
43c1ee90cb3333dc2643e58cf607399b0abebf43
Lars Ingebrigtsen
Tue Sep 21 17:52:53 2021 +0200
2021-09-26 22:49:54 -04:00
Stefan Kangas 7aeadf2504 Backport commit 3f9f3ba43 from Emacs
* lisp/org-timer.el (org-timer-set-timer):
* lisp/ox.el (org-export-dispatch-last-position): Use command
substitution for 'universal-argument' instead of raw "C-u".

Docfix: use command substitution for 'universal-argument'
3f9f3ba4370bd4d0f33392befb35328327d73b1e
Stefan Kangas
Thu Sep 16 20:05:48 2021 +0200
2021-09-18 01:40:56 -04:00
Stefan Kangas b4ce4d6d82 Backport commit 25ebb9374 from Emacs
; More minor docfixes found by checkdoc
25ebb9374bdadf66153727831fc7ff131c8cf299
Stefan Kangas
Tue Sep 14 07:57:14 2021 +0200
2021-09-18 01:39:24 -04:00
Eli Zaretskii d2deb188a6 Backport commit ff4de1bd8 from Emacs
* lisp/org.el:
* lisp/org-list.el (org-list-to-generic):
* lisp/org-compat.el: In comments, quote 'like this'.

Fix quoting style in Lisp comments
ff4de1bd88b8be4a7071884910ff601eb10fbad5
Eli Zaretskii
Sun Sep 12 19:51:06 2021 +0300
2021-09-12 23:34:08 -04:00
Stefan Kangas 9961abf75a Backport commit fc4b956c7 from Emacs
; Fix symbol quoting typos
fc4b956c7cb2fba8ed2a18865a7686c6cfa5d030
Stefan Kangas
Sun Sep 12 18:36:49 2021 +0200
2021-09-12 23:34:07 -04:00
Lars Ingebrigtsen 0f7fcc9de0 Backport commit 6a3920c07 from Emacs
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Using `error' here will trigger users with `debug-on-error' so use
`user-error' instead (bug#49920).  It would probably be preferable
to rewrite this to not use the error system to do control flow.

Make `q' in `org-agenda' work even with `debug-on-error' set
6a3920c07eaae58408dd27e7db22bff7ad4d1f80
Lars Ingebrigtsen
Sat Aug 7 12:55:39 2021 +0200
2021-08-08 18:06:30 -04:00
Stephen Berman bb572a3e8c Backport commit 19f2f2699 from Emacs
* lisp/org-compat.el (org--setup-calendar-bindings): Fix logic
in test of 'org-agenda-diary-file' (bug#48199).

Prevent Org mode from mistakenly changing Calendar keymap
19f2f2699499d87186c6f580e4ec79205d59c096
Stephen Berman
Fri Jun 25 11:11:43 2021 +0200
2021-06-27 23:32:23 -04:00
Kyle Meyer afb948e578 Backport commit f1f351def from Emacs
* etc/schema/od-schema-v1.2-os.rnc: Delete.

* etc/schema/OpenDocument-schema-v1.3.rnc:
* etc/schema/OpenDocument-schema-v1.3+libreoffice.rnc:
Copy from Emacs tree.

* etc/schema/schemas.xml: Incorporate changes from Emacs's f1f351def.

This is not a typical port because Org's schemas.xml is a subset of
Emacs's.  The changes here follow what's proposed in
<https://orgmode.org/list/87o8d07mpr.fsf@kyleam.com>, with the
addition of copying OpenDocument-schema-v1.3+libreoffice.rnc (which I
overlooked when writing that message).
2021-06-27 23:30:22 -04:00
Stefan Monnier ca300ada21 Backport commit 09ed51b9c from Emacs
* lisp/org-timer.el (org-timer--run-countdown-timer): Use closures.

lisp/org/org-timer.el (org-timer--run-countdown-timer): Use closures
09ed51b9c89390059ccae30c0ae5dc39bc20523b
Stefan Monnier
Tue May 18 19:54:38 2021 -0400

[km: This was independently applied to master with 1a5a326f1.]
2021-05-19 19:22:44 -04:00
Stefan Monnier 64689d9bb7 Backport commit 5746fd57a from Emacs
* lisp/org-mouse.el: Make use of lexical scoping.
(org-mouse-todo-menu): Simplify by eta-reduction.
(org-mouse-popup-global-menu): Remove redundant `eval`.
(org-mouse-keyword-menu, org-mouse-keyword-replace-menu)
(org-mouse-tag-menu, org-mouse-match-closure): Use proper closures.

lisp/org/org-mouse.el: Make use of lexical scoping
5746fd57ab7c9d27bcc6220f2b9faaba2982deba
Stefan Monnier
Tue May 18 19:51:26 2021 -0400
2021-05-19 19:22:32 -04:00
Stefan Monnier 08d7b359b8 Backport commit 4e240bf09 from Emacs
* lisp/org-colview.el (org-columns-map): Use proper closures
(org-columns-map): Use derived-mode-p.

lisp/org/org-colview.el (org-columns-map): Use proper closures
4e240bf09678a41055e46fb16a798541d58d372e
Stefan Monnier
Tue May 18 19:36:54 2021 -0400

[km: This was independently applied to master in 71c40314f.]
2021-05-19 19:22:23 -04:00
Stefan Monnier a8134b2c58 Backport commit af68b4956 from Emacs
* lisp/org-clock.el (org-clock-get-table-data): Use proper closures.

lisp/org/org-clock.el (org-clock-get-table-data): Use proper closures
af68b49565671821361d089ae9a68af32d760e2c
Stefan Monnier
Tue May 18 19:32:35 2021 -0400

[km: This was independently applied to master in 038aff34d.]
2021-05-19 19:22:09 -04:00
Stefan Kangas e3f0ac7348 Backport commit 0a4dc7083 from Emacs
; Normalize and add missing first and last lines
0a4dc70830f5e8286b47120cabc750cca07a75c1
Stefan Kangas
Mon Apr 19 12:21:01 2021 +0200
2021-04-19 20:07:28 -04:00
Stefan Monnier 8c29cbdef7 Backport commit c45bfd3c4 from Emacs
* lisp/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/org.el (org-cdlatex-mode):
* lisp/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org-src.el (org-src-mode):
* lisp/org-list.el (org-list-checkbox-radio-mode):
* lisp/org-indent.el (org-indent-mode):
* lisp/org-capture.el (org-capture-mode):
Avoid old-style positional args to `define-minor-mode`.

* lisp/**/*.el: Avoid positional args to `define-minor-mode`
c45bfd3c4abbfa585c9199f4866b6b8046945117
Stefan Monnier
Sun Apr 11 23:47:14 2021 -0400
2021-04-18 02:11:35 -04:00
Basil L. Contovounesios f10773675d Backport commit 331ddd803 from Emacs
* lisp/org-macs.el (org--string-from-props): Pacify warnings
about unknown functions in non-GUI bilds.

Address some --without-x byte-compilation warnings
331ddd803a72056d0f0c70e5a677e0d4a6300584
Basil L. Contovounesios
Fri Mar 26 17:35:34 2021 +0000
2021-03-27 02:18:35 -04:00
Stefan Kangas b7c26e9036 Backport commit 8b07994e2 from Emacs
Convert many more links to use HTTPS
8b07994e201e478df8a3431cbae5187b4cde1791
Stefan Kangas
Wed Mar 24 10:20:18 2021 +0100
2021-03-25 00:56:53 -04:00
Mattias Engdegård f771d205cc Backport commit a0854f939 from Emacs
; Fix typos in doc strings
a0854f939ce3a1de2c8cbc5e38b106a8df4480f6
Mattias Engdegård
Fri Mar 12 12:12:14 2021 +0100
2021-03-14 17:57:07 -04:00
Stefan Monnier a85b4cc5c6 Backport commit 7d0dc3183 from Emacs
* lisp/ob-lilypond.el (org-babel-lilypond-compile-lilyfile):
Remove always-nil variable `arg-2`.

* lisp/ol-gnus.el (org-gnus-store-link):
Remove always-nil variables `newsgroup` and `xarchive`.

* lisp/ol.el (org-store-link):
Remove always-nil variable `description`.

* lisp/org-clock.el (org-clock-special-range):
Remove always-nil variables `m1` and `m`.

* lisp/org-crypt.el (org--matcher-tags-todo-only): Declare var.

* lisp/org-protocol.el (org-protocol-open-source):
Remove always-nil variable `result`.

* lisp/ox-odt.el (org-odt-format-label):
Remove always-nil variable `short-caption`.
(org-odt-link--inline-formula):
Remove always-nil variables `width` and `height`.

* lisp/ox.el (org-export--missing-definitions):
Remove always-nil variable `seen`.

* lisp/: Delete some always-nil variables
7d0dc31833d471a6f86e947d3165d3fd1452a184
Stefan Monnier
Thu Mar 11 13:07:37 2021 -0500
2021-03-14 17:54:17 -04:00
Glenn Morris 2da3b0ebc3 Backport commit 18e1455c8 from Emacs
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo-batch):
Overwrite existing output.

Make generation of texi from org overwrite output
18e1455c8ae851791a047dc56eef972cc24e5b6c
Glenn Morris
Sun Feb 28 15:13:07 2021 -0800
2021-03-09 22:12:02 -05:00
Stefan Kangas 7922d161c0 Backport commit b34d39170 from Emacs
* lisp/org.el: Don't require easymenu in Emacs 28 or later.

Minor fixes after preloading easymenu
b34d39170b67a7a285f7c8c2ea1b4128b531aad9
Stefan Kangas
Sat Feb 27 20:04:41 2021 +0100
2021-02-28 17:24:25 -05:00
Stefan Kangas f9a414eb83 Backport commit 2c639a35a from Emacs
* lisp/org.el: Don't require overlay; that's only needed in XEmacs.

Don't require overlay; that's only needed in XEmacs
2c639a35a6d71d190bea896bbeb14b279e8d8384
Stefan Kangas
Sat Feb 27 18:23:12 2021 +0100
2021-02-28 17:24:25 -05:00
Glenn Morris 6382dbc950 Backport commit fddd63f8b from Emacs
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo-batch): New
function.

Distribute the real source for some doc/misc manuals (bug#45143)
fddd63f8b854f6bfa91403f69ba694ccb54197bc
Glenn Morris
Fri Feb 26 19:36:09 2021 -0800
2021-02-28 17:24:25 -05:00
Stefan Monnier 63da3ccfb4 Backport commit 8d5dfafab from Emacs
While at it, I enabled lexical-binding in the affected files.

* lisp/org-agenda.el (org-let, org-let2): Move from org-macs and
use `declare`.

* lisp/org-macs.el (org-let, org-let2): Move these functions that are
inherently harmful to your karma to the only package that uses them.
(org-scroll): Use `pcase` to avoid `eval` and use more readable syntax
for those integers standing for events.

* lisp/org-element.el (org-element-map): Use `declare`.

Prefer `declare` over a `put` of `list-indent-function`.
8d5dfafab7dc40d4b74dc0b56d1b314fd8cac390
Stefan Monnier
Mon Feb 22 11:54:17 2021 -0500
2021-02-28 17:24:24 -05:00
Mattias Engdegård da1ebabfab Backport commit de15ca7d0 from Emacs
Fix typos
de15ca7d0065c5f77c88a90f4f14569886be3617
Mattias Engdegård
Thu Feb 18 16:50:55 2021 +0100
2021-02-21 23:08:10 -05:00
Stefan Monnier 7dd1cfb6ca Backport commit f8dbefbaa from Emacs
* lisp/ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Use `declare`.

* lisp/ob-core.el (org-babel-map-src-blocks): Use `declare`.
(org-babel-result-cond): Simplify edebug spec.

* lisp/org-clock.el (org-with-clock-position, org-with-clock):
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry):
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`.

Use `declare` instead of `def-edebug-spec` in most places
f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792
Stefan Monnier
Fri Feb 12 16:08:01 2021 -0500
2021-02-14 17:38:07 -05:00
Stefan Kangas b7b52aa888 Backport commit ce35760b1 from Emacs
; Minor license statement fixes
ce35760b19315b634e62e2c64988018189dcdbdc
Stefan Kangas
Mon Feb 8 09:10:57 2021 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas 4aa4ae8cf0 Backport commit bbe88cd82 from Emacs
* lisp/org-table.el (org-table-edit-field):
* lisp/org.el (org-restart-font-lock): Assume font-lock-mode variable
is not void; it is preloaded.

Assume font-lock-mode variable is not void
bbe88cd82e4bbfd76df06223614ab74d1022c119
Stefan Kangas
Fri Feb 5 01:15:02 2021 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas d8e8a97a14 Backport commit a8caa6690 from Emacs
* doc/org-manual.org (Link Abbreviations):
* lisp/org/ol.el (org-link-shell-confirm-function)
(org-link-elisp-confirm-function):
* lisp/org/org.el (org-highlight-links): Avoid recommending Google.

Avoid recommending Google
a8caa66906b157c9c2b4c4dc1c447b6a9e747c5e
Stefan Kangas
Thu Jan 28 19:36:12 2021 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas a633d9aea6 Backport commit dd662fc97 from Emacs
* lisp/ob-sql.el (org-babel-sql-dbstring-vertica):
* lisp/ol-bbdb.el (org-bbdb-date-list): Fix doc strings to not exceed
80-column limits.  (Bug#44858)

Fix some over-wide docstrings
dd662fc972a75df71cdaa25a2d763d1592df1eb8
Stefan Kangas
Wed Dec 30 12:44:19 2020 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas 263d3852f6 Backport commit 34a73666d from Emacs
* lisp/org-agenda.el (org-agenda-filter-by-category): Shorten doc
strings to not exceed 80-column limits.  (Bug#44858)

Shorten some over-wide docstrings in functions and macros
34a73666d9559d948815a53b63dc36cc878d5aff
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas d904f9e5da Backport commit f88a7897a from Emacs
* lisp/ob-R.el (org-babel-R-write-object-command):
* lisp/org-attach.el (org-attach-after-change-hook):
* lisp/org.el (org-stamp-time-of-day-regexp): Shorten doc strings to
not exceed 80-column limits.  (Bug#44858)

Shorten over-wide docstrings in variables
f88a7897a80ee9129bdc444cafff32d026c4b6d8
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Stefan Kangas ce22aa15fd Backport commit 5ab5c3898 from Emacs
* lisp/org-indent.el
(org-indent-mode-turns-off-org-adapt-indentation)
(org-indent-mode-turns-on-hiding-stars):
* lisp/org-protocol.el (org-protocol-project-alist): Shorten doc
strings to not exceed 80-column limits.  (Bug#44858)

Shorten over-wide docstrings in defcustoms
5ab5c3898778406103e7183bf41c7d018077092b
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Eli Zaretskii ec52bfef54 Backport commit 64d97212f from Emacs
* lisp/org-ctags.el (org-ctags-open-link-functions): Fix doc strings
to not exceed 80-column limits.  (Bug#44858)

Fix over-wide doc strings
64d97212f42bc0305560a0ae2cc2f16a3a851117
Eli Zaretskii
Sat Dec 19 13:18:11 2020 +0200
2021-02-14 17:38:07 -05:00
Mattias Engdegård 4c934424d6 Backport commit 46394dff7 from Emacs
* lisp/ob-core.el (org-babel--string-to-number): Put hyphen last in
alternative.
* lisp/org-agenda.el (org-agenda-filter): Escape '+' correctly.

Follow good regexp practice
46394dff7f01e7fe4af06a6c344e151af5c3eef4
Mattias Engdegård
Fri Dec 18 14:35:09 2020 +0100
2021-02-14 17:38:04 -05:00
Kyle Meyer 61336f80dc mk/targets.mk: Add version fallback for tag-less repos
* mk/targets.mk (ORGVERSION, GITVERSION): Get version from lisp/org.el
header if it can't be retrieved from git-describe.

As of elpa.git's ee03829f90 (Finalize the new master branch,
2020-12-14), org-release and org-git-version are empty strings in
https://elpa.gnu.org/packages/org-*.tar files.  This is because the
new setup executes `make autoloads info' in an elpa.git worktree with
an Org branch checked out, but elpa.git of course doesn't have Org's
release tags.

Maintaining the org.el version header has been a point of contention
in the past [1], but the header has been there for a while now.  Use
it to avoid the above elpa.git issue.  In the case of the master
branch, the org-release value generated in a tag-less repo will have a
different version than the one from a regular repo because org.el's
version header has a "-dev" suffix, but that's still better than an
empty version.

[1] For example: https://orgmode.org/list/87zj1uhix6.fsf@gmx.us/

Reported-by: Pierre Langlois <pierre.langlois@gmx.com>
Ref: https://orgmode.org/list/87y2hi9qev.fsf@gmx.com
2021-02-05 01:20:09 -05:00
Alan Light 862048d4cb ob-sql.el: Respect the value of sql-postgres-program
* ob-sql.el (org-babel-execute:sql): Use `sql-postgres-program' as
postgresql executable (instead of psql) when defined.  psql will be
the default.

[km: tweaked commit message, added bound-and-true-p guard]

TINYCHANGE
2021-02-03 23:08:21 -05:00
Kyle Meyer e879596159 footnote: Silence byte-compiler under 'make single' 2021-02-03 23:07:33 -05:00
Stefan Kangas 2ed1c20ff7 Remove Emacs 21 compat code for bookmark-after-jump-hook
* lisp/org-compat.el (bookmark-after-jump-hook): Remove Emacs 21
compat code.
2021-02-03 01:26:51 -05:00
Kyle Meyer 3e64d3475d capture: Fix handling of time range for :time-prompt
* lisp/org-capture.el (org-capture-set-target-location): Bind
org-end-time-was-given around the org-read-date call to get a return
value that uses the start time rather than doing custom adjustment of
the return value.

If org-capture-set-target-location detects that the answer to
org-read-date has a time range, it strips the end time from the answer
and calls org-read-date-analyze again.  (org-read-date already calls
it underneath.)  The regexp it uses, however, can easily match a date,
leading to a bogus result.

org-read-date-analyze is already capable of processing the time range
in a way that matches org-capture-set-target-location's intent: when
org-end-time-was-given is bound, org-read-date-analyze splits off the
end value of the range and stores it in org-end-time-was-given.  Drop
the custom logic and let org-read-date-analyze handle the range.

Reported-by: Richard Lawrence <richard.lawrence@berkeley.edu>
Ref: https://orgmode.org/list/87h7obh4ct.fsf@aquinas
2021-02-01 23:18:03 -05:00
Basile Pesin 0abd4a44cb ox-latex.el: Use [Objective]Caml dialect
* ox-latex.el (org-latex-listings-langs): Change the binding for
  `ocaml' to "[Objective]Caml"

The "[Objective]Caml" dialect syntax highlighting is different from the
"Caml" one (reflecting the added features of OCaml compared to
Caml-light).

TINYCHANGE
2021-01-24 23:05:53 -05:00
Stefan Kangas a50a42ceae Use lexical-binding cookie in some trivial files
* mk/org-fixup.el (org-make-org-version): Add lexical-binding cookie
to autogenerated files.
* lisp/org-install.el: Use lexical-binding.
2021-01-24 22:36:30 -05:00
Tara Lorenz 13e98e2a13 ox-latex.el: fix interpretation of org-latex-pdf-process
* ox-latex.el (org-latex-export-to-pdf):  The documentation for
`org-latex-pdf-process' states that "%bib" will be expanded into the
current binding of `org-latex-bibtex-compiler'.  However, the
`org-latex-export-to-pdf', where the expansion takes place, expects
"%bibtex" instead.  This fix will accept "%bib" as well as "%bibtex"
as markers for `org-latex-bib-compiler'.

This fixes a regression from f6187deca (ox-latex: Small refactor,
2015-09-13).

TINYCHANGE
2021-01-24 22:16:45 -05:00
Kyle Meyer b99beaad18 org-macs: Add basic tests for org-matcher-time
* testing/lisp/test-org-macs.el (test-org-matcher-time): Add tests.

This includes of a test for the missing hour modifier added in the
previous commit.
2021-01-24 22:16:45 -05:00
Daniel Gröber aeb9f036ff org-macs: Allow specifying relative time in hours
* lisp/org-macs.el (org-matcher-time): Handle hour ("h") time stamp
modifier.
* doc/org-manual.org (The date/time prompt): Document hour modifier.

This adds support for date expressions such as +12h to
org-matcher-time. The regexp this function uses to parse such relative
expressions already includes the "h" character but doesn't actually
handle that case.

AFAICT org-mode commit ec921a2a68 ("Support hourly repeat cookies")
neglected to add support here.

TINYCHANGE
2021-01-24 22:16:45 -05:00
tbanelwebmin@free.fr 9e8215f4a5 ob-C.el: Fix missing C, C++ declaration
* lisp/ob-C.el (org-babel-C-utility-header-to-C): Add declaration of
  strcmp() for C and C++.

* testing/examples/ob-C-test.org (Simple tests): Remove a spurious \n
  new line.
2021-01-14 21:20:00 +01:00
TRS-80 1806abdc39 org-footnote: Fix inserting new footnote mangling drawers
* org-footnote.el (org-footnote-create-definition): Replace
  `forward-line' with `org-end-of-meta-data' to skip over any
  properties and/or drawers that may be present on the
  `org-footnote-section' heading (default "Footnotes").

TINYCHANGE
2021-01-14 00:16:40 -05:00
Christian Garbs d02c0218ef testing/lisp/test-org-archive.el: Fix test
* testing/lisp/test-org-archive.el
(test-org-archive/datetree): Fix test for locales that don't use
English weekday names.
2021-01-14 00:15:34 -05:00
Kyle Meyer 33de2bd8ef org-compat: Take in obsolete org-copy
* lisp/org-compat.el (org-copy): Move from org-refile.el.
* lisp/org-refile.el (org-copy): Move to org-compat.el.

Suggested-by: Marco Wahl <marcowahlsoft@gmail.com>
Ref: https://orgmode.org/list/87o8i2cpb2.fsf@gmail.com
2021-01-07 00:14:27 -05:00