Commit Graph

23705 Commits

Author SHA1 Message Date
Bastien bea172ae99 mk/default.mk: Use the Emacs manual css 2021-09-25 11:36:39 +02:00
Bastien 268a4330ad mk/server.mk: Use a new path
This prepares the migration out of the current orgmode.org server.
2021-09-25 11:19:26 +02:00
Bastien 4be129f543 doc/Makefile: Clean up *.info files too
Continue 9802877fb by cleaning up *.info files and removing
duplicate *.html pattern.
2021-09-12 18:05:37 +02:00
Nicolas Goaziou dcc3a84a98 keys: Re-instate some RET bindings
* lisp/org-keys.el (org-mode-map): Re-instate S-RET and M-S-RET, which
are not translated from S-<return> and M-S-<return>, unlike
M-<return>/M-RET.

This is a followup to ee652a47df.

Reported-by: Kévin Le Gouguec <kevin.legouguec@gmail.com>
2021-07-31 10:55:01 +02:00
Amin Bandali 1ee52c5eb6 Backport commit 348b2aed0 from Emacs
Update IRC-related references to point to Libera.Chat
348b2aed0c8c3630be4c15c8e70acf7ea9c023af
Amin Bandali
Sat Jul 3 23:39:18 2021 -0400
2021-07-11 22:40:57 -04:00
Nicolas Goaziou ee652a47df org-keys: Remove fancy RET keybindings
There is no such binding as "S-RET", and "ESC ..." is translated to
"M-..." in both GUI and TUI. Finally, "M-<return>" is translated to
"M-RET" so we shouldn't use the former.
2021-07-02 16:01:05 +02:00
Nicolas Goaziou 565361eb69 org-keys: Do not bind <tab>, ever
Fixes: `org-mode-map` binds `<tab>` which is unnecessary and harmful,
since it takes precendence over bindings of TAB even in keymaps with
higher precedence.

Reported-by: Daniel Mendler <mail@daniel-mendler.de>
2021-07-01 12:11:28 +02:00
Ingo Lohmar 80374642e2 agenda: Fix timestamp agenda setting global agenda name
* lisp/org.el (org-follow-timestamp-link): Do not set global agenda name.

The tmp value for the agenda buffer name is used in `org-agenda-list'
to set `org-agenda-buffer-name'.  Wrap the call in a let-binding for
this symbol (like the agenda dispatcher does), since otherwise it
inadvertently sets the global value.
2021-06-30 22:02:57 +02:00
Nicolas Goaziou c09356548f agenda: Fix `org-get-time-of-day' on empty string
* lisp/org-agenda.el (org-get-time-of-day): Ensure S is not empty
before calling `get-text-property'.

This regression was introduced in aba1f2066.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-06/msg00385.html>

Reported-by: Ihor Radchenko <yantar92@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-06/msg00385.html>
2021-06-20 18:07:01 +02:00
Nicolas Goaziou 15badb32b7 agenda: Fix org-duration-to-minutes error (take 4)
* lisp/org-agenda.el (org-get-time-of-day): Fix regexp.

This is a followup to aba1f20661.
2021-06-18 14:12:08 +02:00
Nicolas Goaziou aba1f20661 agenda: Fix org-duration-to-minutes error (take 3)
* lisp/org-agenda.el (org-agenda-format-item): Call
`org-get-time-of-day' twice. Once to get proper time information, and
a second time to format it.
(org-get-time-of-day): Remove an optional argument.  Extend the one
left, and document it.  Rewrite function.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<https://orgmode.org/list/87lf84408r.fsf@ucl.ac.uk/>
2021-06-17 19:23:36 +02:00
Nicolas Goaziou 093c94e31b texinfo: Fix off-by-one error
* lisp/ox-texinfo.el (org-texinfo--menu-entries): Fix off-by-one
error.

This is a follow-up to f99f26306c.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
<http://lists.gnu.org/r/emacs-orgmode/2021-05/msg01290.html>
2021-06-02 17:21:15 +02:00
Bhavin Gandhi 37f69bf86d org-refile: Fix double slashes in the refile targets
* org-refile.el (org-refile-get-location): When we generate the `tbl'
variable, we add extra slash depending on the value of
`org-refile-use-outline-path'.  This patch updates some locations which
add another extra slash assuming the target did not have it.

`org-refile--get-location' does lookup for entries with and without
slash, so it was not causing any issues before.  It works as it is now
as well.

Thanks to Gustavo Barros for a very detailed bug report.

TINYCHANGE
2021-05-25 02:13:43 +02:00
Sun Lin 21eb69c413 org-agenda-files: Work with relative file paths
* lisp/org.el (org-agenda-files): Make sure org-agenda-files work with relative
file paths.

TINYCHANGE
2021-05-21 18:30:06 +02:00
Nicolas Goaziou 13c78a5900 footnote: Allow new footnotes in empty cells
* lisp/org-footnote.el (org-footnote--allow-reference-p): allow
inserting new footnotes in empty cells.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add
tests.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
<http://lists.gnu.org/r/emacs-orgmode/2021-05/msg00940.html>
2021-05-20 15:44:27 +02:00
Bastien 6524301288 mk/server.mk: Complete and fix 9802877fb 2021-05-19 14:26:26 +02:00
Bastien ab9f2af34f lisp/org.el: Bump version number
* lisp/org.el: Bump version number.
2021-05-19 14:16:18 +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 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 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 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
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
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
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
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 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 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
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
Bastien e860fbf22a 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-15 22:03:47 +02:00
mosquito-magnet 307e722dd9 org-agenda.el: Fix clocking issues regex
* org-agenda.el (org-agenda-show-clocking-issues): Fix regex
to prevent false-positive clocking issue detection.

Regex was missing a grouping to restrict the alternative \| to the
literal parentheses.

TINYCHANGE
2021-05-15 16:18:58 +02:00
Ihor Radchenko 4da4b3aa66 Allow moving inlinetasks using org-metaup/down
* lisp/org.el (org-metaup, org-metadown): Use
`org-drag-elementbackward'/`org-drag-element-forward' to move
inlinetasks.
2021-05-15 15:06:01 +02:00
Kévin Le Gouguec 4764a2fbf9 Set org-adapt-indentation explicitly in some tests
* testing/lisp/test-org.el (test-org/indent-line)
(test-org/indent-region): Make sure `org-adapt-indentation' is
consistent with expected results.
2021-05-15 14:45:23 +02:00
Kévin Le Gouguec d85f4158e2 Set org-adapt-indentation explicitly in some tests
* testing/lisp/test-org.el (test-org/with-electric-indent)
(test-org/without-electric-indent): Make sure
`org-adapt-indentation' is consistent with expected results.
2021-05-15 14:45:21 +02:00
Bastien ed5e28939b Fix code typo in 06c064e9 (take 2) 2021-05-15 14:26:56 +02:00
Bastien 77213acb8f Fix code typo in 06c064e9 2021-05-15 14:17:38 +02:00
Ihor Radchenko 6ab5299e5b Fix test-org-element/cache "Preserve local structures when re-parenting."
* testing/lisp/test-org-element.el (test-org-element/cache): Add
spaces to make the "abcd" table a single table.  The old version uses
example org text with two tables and was passing because of another
bug in org-element-cache.  Testing the old version with
org-element-use-cache set to nil would yield error, while it should
not.
2021-05-15 13:51:02 +02:00
Bastien 4ce78810ac lisp/org.el: Don't let RET indent in source code blocks
* lisp/org.el (org-return): Don't try to indent in source code
blocks.

Reported-by: Nathaniel W Griswold <nate@manicmind.earth>
Link: https://orgmode.org/list/5DCBAF63-0E88-44AC-B892-1260F37E7E00@manicmind.earth/
2021-05-15 13:48:40 +02:00
Bastien d37e8a14b7 lisp/org.el: Fix indenting of planning line
* lisp/org.el (org-indent-line): Fix indenting of planning line.
2021-05-15 11:00:49 +02:00
Ihor Radchenko f313b81841 Improve org-link-plain-re
* lisp/ol.el (org-link-make-regexps): Allow URLs with up to two
levels of nested brackets.

* lisp/org.el (org-link-plain-re): Update docstring.

* testing/lisp/test-ol.el: Add tests for the plain link regular
expression.

(org-link-plain-re): Update docstring.  Now,

Now, URLs like [1] can be matched.  The new regexp is based on [2].
The docstring of `org-link-plain-re'  explicitly mentions that the
regexp must contain groups for the link type and the path.

[1] https://doi.org/10.1016/0160-791x(79)90023-x
[2] https://daringfireball.net/2010/07/improved_regex_for_matching_urls
2021-05-15 10:33:23 +02:00
satotake d285831af3 org-refile.el: Fix the case of emtpy buffer name
* lisp/org-refile.el (org-refile-get-targets): Ensure that the
arguments of `file-name-nondirectory' and `file-truename' are not nil.

This prevents errors from being raised when calling `org-refile' in a
buffer that is not visiting a file.

TINYCHANGE
2021-05-15 10:19:19 +02:00
Samim Pezeshki 06c064e97c lisp/org-agenda.el: Fix bug in `org-agenda-highlight-todo'
* lisp/org-agenda.el (org-agenda-highlight-todo): Skip formatting
the to-do keyword when `org-agenda-todo-keyword-format' is the
empty string.

TINYCHANGE
2021-05-15 10:11:36 +02:00
Bastien 8544f555ac lisp/org-inlinetask.el: Silent the byte-compiler
* lisp/org-inlinetask.el (org-inlinetask-promote)
(org-inlinetask-demote): Fix calls to `looking-back'.
2021-05-15 09:55:12 +02:00
Bastien 8b18405857 Throw user errors when trying to drag inline tasks
* lisp/org.el (org-metaup, org-metadown): Throw a user error
explaining that dragging inline tasks is not supported.

* lisp/org-inlinetask.el (org-inlinetask-insert-task)
(org-inlinetask-promote, org-inlinetask-demote): Fix bug when
demoting/promoting inline tasks at the end of the buffer and
throw user errors instead of errors.

Based on an initial patch by Carsten.

Reported-by: Christian Hemminghaus <chrhemmi@gmail.com>
Link: https://orgmode.org/list/CAE47VC=yhObXs3jexLUkf53cNzcOWUkTMqpF8QK4Dcg98QijyQ@mail.gmail.com/
2021-05-13 14:56:18 +02:00
Nicolas Goaziou c26f8d2cc5 agenda: Fix org-duration-to-minutes error (take 2)
* lisp/org.el (org-stamp-time-of-day-regexp): Limit match group 2 to
first time.
* lisp/org-agenda.el (org-agenda-format-item): Compute duration before
formatting time with `org-get-time-of-day'.
2021-05-11 09:39:08 +02:00
Nicolas Goaziou 6107c2b15b Revert "agenda: Fix "org-duration-to-minutes: Invalid duration format" error"
This reverts commit bc857bfc62.

The "fix" breaks elsewhere, as reported below.

Reported-by: Daniel Ortmann <daniel.ortmann@oracle.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-05/msg00592.html>
2021-05-10 18:00:58 +02:00
Nicolas Goaziou bc857bfc62 agenda: Fix "org-duration-to-minutes: Invalid duration format" error
* lisp/org-agenda.el (org-agenda-format-item): Compute duration with
`org-duration-to-minutes' before normalizing input.

Reported-by: Stephen Eglen <sje30@cam.ac.uk>
<http://lists.gnu.org/r/emacs-orgmode/2021-05/msg00584.html>
2021-05-09 21:49:23 +02:00
Bastien 2956c86c20 lisp/ox-html.el (org-html-scripts): Fix missing curly bracket
* lisp/ox-html.el (org-html-scripts): Fix missing curly bracket.

Reported-by: Sebastian Berntsson <sebastian@ilait.se>
Link: https://orgmode.org/list/21ac82d9-91a5-fbdf-c22c-302f28d58ebe@ilait.se/
2021-05-08 09:37:11 +02:00
Bastien 4d26075039 doc/org-manual.org (Features Overview): Fix typo
* doc/org-manual.org (Features Overview): Fix typo.

Reported-by: Ian Nehera <delta29@shaw.ca>
2021-05-07 07:17:48 +02:00
Bastien b4b35fc92d lisp/ol.el: Fix bug when storing links
* lisp/ol.el (org-store-link): Don' store two links when an a
radio link within a headline that contains a CUSTOM_ID property.

Reported-by: Fr Ml <fr_ml@t-online.de>
Link: https://orgmode.org/list/aadb23f3-c0fe-19aa-be79-50e51d16c41a@t-online.de/
2021-05-06 14:39:14 +02:00
Bastien 3f39608857 lisp/org.el: Fix inserting a heading before the first entry
* lisp/org.el (org-insert-heading): When inserting a headline
before the first one, insert a blank line after the inserted
heading if the previous call to `org--blank-before-heading-p'
returned `t'.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87y2cxoybz.fsf@gmail.com/
2021-05-06 13:50:21 +02:00