Commit Graph

24225 Commits

Author SHA1 Message Date
Maxim Nikulin 507cf71de2 etc/ORG-NEWS: Suggest against disabling `electric-indent-mode'
* etc/ORG-NEWS (~org-adapt-indentation~ now defaults to =nil=):
Suggest against disabling `electric-indent-mode'.
2021-05-20 14:24:54 +02:00
Kyle Meyer cf30f71178 Merge branch 'km/from-emacs-master' 2021-05-19 19:24:39 -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
Bastien 3c241ab5fd Merge branch 'maint' 2021-05-19 14:27:24 +02:00
Bastien 6524301288 mk/server.mk: Complete and fix 9802877fb 2021-05-19 14:26:26 +02:00
Bastien d2e9d8b8f0 Merge branch 'maint' 2021-05-19 14:17:57 +02:00
Bastien ab9f2af34f lisp/org.el: Bump version number
* lisp/org.el: Bump version number.
2021-05-19 14:16:18 +02:00
Stefan Monnier 1a5a326f10 * lisp/org-timer.el (org-timer--run-countdown-timer): Use closures 2021-05-19 14:08:50 +02:00
Stefan Monnier 71c40314f5 * lisp/org-colview.el (org-columns-map): Use proper closures
Also prefer #' to quote function names.

(org-columns-map): Use derived-mode-p.
2021-05-19 14:08:21 +02:00
Stefan Monnier 038aff34db * lisp/org-clock.el (org-clock-get-table-data): Use proper closures
Also, prefer #' to quote function names
2021-05-19 14:08:18 +02:00
Jack Kamm 53fd5b774e ob-comint.el, ob-python.el: Async session evaluation
Adds functionality to ob-comint.el to implement async session eval on
a per-language basis.  Adds a reference implementation for ob-python.

* lisp/ob-comint.el (org-babel-comint-with-output): Remove comment.
(org-babel-comint-async-indicator, org-babel-comint-async-buffers,
org-babel-comint-async-file-callback,
org-babel-comint-async-chunk-callback,
org-babel-comint-async-dangling): Add buffer-local variables used for
async comint evaluation.
(org-babel-comint-use-async): Add function to determine whether block
should be evaluated asynchronously.
(org-babel-comint-async-filter): Add filter function to attach to
comint-output-filter-functions for babel async eval.
(org-babel-comint-async-register): Add function to setup buffer
variables and hooks for session eval.
(org-babel-comint-async-delete-dangling-and-eval): Add helper function
for async session eval.

* lisp/ob-python.el (org-babel-execute:python): Check for async header
argument.
(org-babel-python-evaluate): Check whether to use async evaluation.
(org-babel-python-async-indicator): Add constant for indicating the
start/end of async evaluations.
(org-babel-python-async-evaluate-session): Add function for Python
async eval.

*
testing/lisp/test-ob-python.el (test-ob-python/async-simple-session-output):
Unit test for Python async session eval.
(test-ob-python/async-named-output): Unit test that Python async eval
can replace named output.
(test-ob-python/async-output-drawer): Unit test that Python async eval
works with drawer results.
2021-05-18 09:13:28 -07:00
Nicolas Goaziou 6de34f2891 Move `org-file-url-p' to "org-macs.el", rename it to `org-url-p'
* lisp/org-macs.el (org-url-p): New function.
* lisp/org-compat.el (org-file-url-p): Make obsolete alias for
function above.
* lisp/org-lint.el (org-lint-non-existent-setupfile-parameter):
* lisp/org.el (org--collect-keywords-1):
(org-file-contents):
(org-edit-special): Use new function.
2021-05-18 16:31:39 +02:00
Bastien 0c85c8d7ed Merge branch 'maint' 2021-05-18 16:06:39 +02:00
Sébastien Miquel 857ae366b3 org.el (org-src--contents-for-write-back): Indent blank lines
* lisp/org.el (org-src--contents-for-write-back): Indent blank lines.
* lisp/org-src.el (org-return): Revert part of commit bfda3cc7df.
2021-05-18 16:06:27 +02:00
Bastien e80a0094bb Merge branch 'maint' 2021-05-17 07:20:32 +02:00
Bastien a34d71560b Revert "lisp/org-agenda.el: Let tags-todo searches include DONE keywords"
This reverts commit 823f9744e9.
2021-05-17 07:18:35 +02:00
Bastien 59c6e24606 Merge branch 'maint' 2021-05-17 00:54:23 +02:00
Bastien 823f9744e9 lisp/org-agenda.el: Let tags-todo searches include DONE keywords
* lisp/org-agenda.el (org-agenda, org-agenda-run-series): Don't
set the todo-only parameter to '(4) when calling `org-tags-view'.

Reported-by: Stig Brautaset <stig@brautaset.org>
Link: https://orgmode.org/list/m2ftazm3l1.fsf@brautaset.org/

This completes 2fb129b5c, as per Kyle's analysis here:
https://orgmode.org/list/87r1ufmw72.fsf@kyleam.com/
2021-05-17 00:49:32 +02:00
Bastien 59edcc27c4 Merge branch 'maint' 2021-05-17 00:17:06 +02:00
Bastien c670379adf Fix `org-agenda-todo' undo behavior when logging (not adding note)
* lisp/org.el (org-log-setup): New variable.
(org-auto-repeat-maybe): Check against `org-log-setup' if we are
currently logging.
(org-add-log-setup): Only use `post-command-hook' when logging a
note, otherwise use `org-log-setup'.
(org-add-log-note): Reset `org-log-setup' to nil.
(org-store-log-note): Remove useless code.

* lisp/org-agenda.el (org-agenda-bulk-action): Check
`org-log-setup' instead of `post-command-hook'.

This is a more correct fix that supersedes the previous attempt with
08a47b09 for the same problem.

Reported-by: Warren Lynn <wrn.lynn@gmail.com>
Link: https://orgmode.org/list/87v98a8mes.fsf@gnu.org/
2021-05-17 00:14:31 +02:00
Bastien b2be3dd0e0 Merge branch 'maint' 2021-05-16 21:53:05 +02:00
Sébastien Miquel a9af1faaa1 org-src.el (org-edit-src-exit): Fix write-back-buf not getting killed
* lisp/org.el (org-edit-src-exit): Fix write-back-buf not getting
killed
2021-05-16 21:52:15 +02:00
Bastien e4943d0bfa lisp/org.el: Fix some indentation issues 2021-05-16 21:47:59 +02:00
Nicholas Savage 8cf704e3fe lisp/org.el: Fix org-update-statistics-cookies error
* lisp/org.el (org-update-statistics-cookies): Replace
usage of `org-map-entries' with `org-map-region' to prevent bug where
an error was thrown if the current buffer had not yet been saved to disk.

Formatted from a patch proposal by mail@kisaragi-hiu.com
Reported-by: mail@kisaragi-hiu.com
2021-05-16 21:41:32 +02:00
Bastien e738211f73 Merge branch 'maint' 2021-05-16 14:11:08 +02:00
Sébastien Miquel d65ae82f4b lisp/org-src.el: Continue the previous fix (d02ad1f2)
* lisp/org-src.el (org-src--contents-for-write-back): Shorten the
first line of the docstring.
(org-edit-src-exit): Conditionnally kill the write-back buffer.
2021-05-16 14:10:04 +02:00
Bastien aac4a2d597 Merge branch 'maint' 2021-05-16 14:02:07 +02:00
Sébastien Miquel d02ad1f207 lisp/org-src.el: Use `replace-buffer-contents'
* lisp/org-src.el (org-src--contents-for-write-back): Use a write
back buffer.

* lisp/org-src.el (org-edit-src-exit, org-edit-src-save): Use
`replace-buffer-contents'.

Reported-by: "Sébastien Miquel" <sebastien.miquel@posteo.eu>
Link: https://orgmode.org/list/603f9c4e-c621-7592-5b20-a7354c11d5d2@posteo.eu/
2021-05-16 14:01:57 +02:00
Bastien 70d98b56b2 Merge branch 'master' of code.orgmode.org:bzg/org-mode 2021-05-16 10:37:10 +02:00
Bastien 4362b93018 Merge branch 'maint' 2021-05-16 10:36:42 +02:00
Bastien 9802877fbe doc/Makefile: Use the .info extension for org.info and orgguide.info
* doc/Makefile (install): Use the .info extension when generating
info files (org.info and orgguide.info).
2021-05-16 10:36:02 +02:00
Nicolas Goaziou 53b5af21fd Merge branch 'maint' 2021-05-16 10:16:50 +02:00
Nicolas Goaziou 8846ea71fa element: Fix drawer parsing
* lisp/org-element.el (org-element-drawer-parser): A single ":END:"
line should not be recognized as a drawer.
* testing/lisp/test-org-element.el (test-org-element/drawer-parser):
Add test.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-05/msg00819.html>
2021-05-16 10:14:54 +02:00
Bastien fdd70728a8 Merge branch 'master' of code.orgmode.org:bzg/org-mode 2021-05-16 10:03:08 +02:00
Bastien 336efd6dd9 lisp/*: Use version number when obsoleting
* lisp/org-compat.el:
* lisp/org-agenda.el:
* lisp/org-macs.el:
* lisp/org.el:
* lisp/ob-sqlite.el: Use version number when obsoleting.
2021-05-16 09:54:28 +02:00
Bastien b4133552e1 lisp/ol.el: Enhance message when the link has already been stored
* lisp/ol.el (org-store-link): Enhance message when the link has
already been stored.
2021-05-16 09:54:28 +02:00
Bastien f4b881eb03 lisp/org.el: Explicit the docstrings of org-priority-highest/lowest
* lisp/org.el (org-priority-highest, org-priority-lowest): Make
the docstring more explicit.
2021-05-16 09:54:28 +02:00
Nicolas Goaziou f63cbd36c5 lisp/org.el: Fix bug in `org-sort-remove-invisible'
* lisp/org.el (org-sort-remove-invisible): Rewrite using
`org-element-interpret-data' to clean invisible parts more
rigorously.

Link: https://orgmode.org/list/87a6qg1rjx.fsf@posteo.net/
2021-05-16 09:54:28 +02:00
Bastien b91e934a59 lisp/org.el: Minor enhancement to `org-priority'
* lisp/org.el (org-priority): When the set of numeric priorities
only comprises single digits, ask for a single char event.
2021-05-16 09:54:28 +02:00
Bastien c77066dd7f etc/ORG-NEWS: Add a news entry about ditaa.jar not being bundled 2021-05-16 09:54:28 +02:00
Bastien cbc450d03c lisp/org-list.el: Fix bug wrt updating statistics
* lisp/org-list.el (org-update-checkbox-count): Don't update
statistics when toggling a checkbox witin a heading that has
COOKIE_DATA set to "todo".

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
Link: https://orgmode.org/list/CALn3zohYfoyDm6w-AYWsVRSbOCndBPZQyb+YvHcaEby3JEhWMw@mail.gmail.com
2021-05-16 09:54:28 +02:00
Nicolas Goaziou ef495b76ec ox-html: Fix typography in a docstring
* lisp/ox-html.el (org-html-link-org-files-as-html): Replace org-mode
with Org mode and org-mode file with Org file.
2021-05-16 09:54:28 +02:00
Bastien e444181ee3 lisp/*: Use version number when obsoleting
* lisp/org-compat.el:
* lisp/org-agenda.el:
* lisp/org-macs.el:
* lisp/org.el:
* lisp/ob-sqlite.el: Use version number when obsoleting.
2021-05-16 08:57:08 +02:00
Bastien c50c92bc45 lisp/ol.el: Enhance message when the link has already been stored
* lisp/ol.el (org-store-link): Enhance message when the link has
already been stored.
2021-05-16 08:28:53 +02:00
Bastien 60fccc752e lisp/org.el: Explicit the docstrings of org-priority-highest/lowest
* lisp/org.el (org-priority-highest, org-priority-lowest): Make
the docstring more explicit.
2021-05-16 08:02:29 +02:00
Bastien e8116dece1 Merge branch 'maint' 2021-05-16 07:48:58 +02:00
Nicolas Goaziou 589962b730 lisp/org.el: Fix bug in `org-sort-remove-invisible'
* lisp/org.el (org-sort-remove-invisible): Rewrite using
`org-element-interpret-data' to clean invisible parts more
rigorously.

Link: https://orgmode.org/list/87a6qg1rjx.fsf@posteo.net/
2021-05-16 07:48:01 +02:00