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

16885 commits

Author SHA1 Message Date
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
TEC f72a658bd0
org-plot: Use consistent method to find table
* lisp/org-plot.el (org-plot/gnuplot): Table information is obtained
using (org-plot/goto-nearest-table), however it was not used when
fetching data from the table.  It is more sensible to use the same
method.  This also now allows a #+plot statement to be placed before
a #+RESULTS line and a table.
2021-05-23 04:06:49 +08:00
Nicolas Goaziou 52b09799cf Merge branch 'maint' 2021-05-21 18:30:23 +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 dce8b3f254 Merge branch 'maint' 2021-05-20 15:45:45 +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
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 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 4362b93018 Merge branch 'maint' 2021-05-16 10:36:42 +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 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 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
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
Bastien c7be27d505 Merge remote-tracking branch 'savannah/bugfix' 2021-05-15 16:25:09 +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
Juan Manuel Macías df9b509a6c lisp/org-attach-git.el: New option `org-attach-git-dir'
* lisp/org-attach-git.el (org-attach-git-dir): New option to allow
using the attachment directory of the current node as a Git
repository, if correctly initialized.
(org-attach-git-use-annex, org-attach-git-annex-get-maybe)
(org-attach-git-commit): Use the new option.

* etc/ORG-NEWS: Announce the new option.

Link: https://orgmode.org/list/87y2g8rj7s.fsf@posteo.net/
2021-05-15 16:13:49 +02:00
Juan Manuel Macías 91373e15c8 ox-latex.el: Support specific attributes for verse block
* lisp/ox-latex.el (org-latex-verse-block): Support verse-specific
attributes.

* doc/org-manual.org (Verse blocks in LaTeX export): New section.

Link: https://orgmode.org/list/874kfdn0k5.fsf@posteo.net/
2021-05-15 16:13:49 +02:00
Thomas S. Dye ee40458d00 lisp/ox-latex.el: Allow arbitrary float environments
* lisp/ox-latex.el (org-latex--inline-image)
(org-latex--decorate-table): Recognize arbitrary :float value.

* etc/ORG-NEWS: Announce new :float capability.

LaTeX users are able to define arbitrary float types.
This patch makes them accessible from Org mode.
2021-05-15 16:13:49 +02:00
Ihor Radchenko 72894cde6f 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 16:13:49 +02:00
Bastien 81c7a2dee8 lisp/org-agenda.el: Use "09:00" instead of " 9:00"
* lisp/org-agenda.el (org-get-time-of-day): Use "09:00" instead
of " 9:00" when displaying as a string.

This makes the string more readable, especially for users reading
the agenda with a screen reader.

Reported-by: Sébastien Hinderer
2021-05-15 16:13:49 +02:00
Bastien c6d11502e0 Fix code typo in 06c064e9 (take 2) 2021-05-15 16:13:49 +02:00
Bastien e53572e130 Fix code typo in 06c064e9 2021-05-15 16:13:49 +02:00
Adam Spiers 33027f992d New command `org-refile-reverse' bound to C-c C-M-w
* lisp/org-refile.el (org-refile-reverse): New command.

* lisp/org-keys.el (org-mode-map): Bind C-c C-M-w to
`org-refile-reverse'.

* doc/org-manual.org (Refile and Copy): Document
`org-refile-reverse'.

* etc/ORG-NEWS (New command ~org-refile-reverse~ (=C-c C-M-w=)):
Announce the new command.

Link: https://orgmode.org/list/20200830001047.21362-1-orgmode@adamspiers.org/
2021-05-15 16:13:49 +02:00
Ihor Radchenko 8f39743ce6 Use cache in org-up-heading-safe
* lisp/org.el (org-up-heading-safe): Use buffer-local cache to store
positions of parent headings.  The cache is invalidated when buffer
text is changed, according to `buffer-chars-modified-tick'.
(org--up-heading-cache):  Buffer-local hash-table storing the cache.
(org--up-heading-cache-tick):  The buffer modification state for
currently active `org--up-heading-cache'.

The optimisation is critical when running agenda or org-entry-get
queries using property/tag inheritance.  In such scenarios
`org-up-heading-safe' can be called thousands of times.  For example,
building todo agenda on large number of headings lead to the following
benchmark results:

Benchmark:

1. (elp-instrument-function #'org-up-heading-safe)
2. Run agenda
3. (elp-results) ;; function, # calls, total time, avg time

Without cache:
org-up-heading-safe  27555       8.4234025759  0.0003056941

With cache, first run:
org-up-heading-safe  23227       0.5300747539  2.282...e-05

With cache, second run on unchanged buffer:
org-up-heading-safe  23227       0.1447754880  6.233...e-06

The final speedup is 1-2 orders of magnitude (~15-56 times).
2021-05-15 16:13:49 +02:00
Bastien 24473b5e08 lisp/org.el: Use "[BUG]" instead of "Bug:" for bug reports
* lisp/org.el (org-submit-bug-report): Use "[BUG]" as the subject
prefix.
2021-05-15 16:13:49 +02:00
Bastien bfda3cc7df 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 16:13:49 +02:00
Bastien 99d873b9c3 lisp/org.el: Fix indenting of planning line
* lisp/org.el (org-indent-line): Fix indenting of planning line.
2021-05-15 16:13:49 +02:00
Ihor Radchenko 7dcb1afb69 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 16:13:49 +02:00
satotake f00ad09e25 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 16:13:49 +02:00
Bastien 8531bb615c lisp/org.el: Minor aesthetic clean-up 2021-05-15 16:13:49 +02:00
Samim Pezeshki 90a9ee1741 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 16:13:49 +02:00
Bastien 5a0f6c9f75 lisp/ox-md.el: Mark some arguments as unused
* lisp/ox-md.el (org-md-latex-environment)
(org-md-latex-fragment): Mark some arguments as unused.
2021-05-15 16:13:49 +02:00
Bastien dd88356d3a 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 16:13:49 +02:00
Bastien fa3c9c8b69 lisp/org-id.el: Small enhancements
* lisp/org-id.el (org-id-locations-load, org-id-add-location):
Update messages.
(org-id-hash-to-alist, org-id-paste-tracker, org-id-find-id-file):
Docstring minor enhancements.
(org-id-new): Tiny refactoring.
2021-05-15 16:13:49 +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
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
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 0e39bf839a 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-14 21:24:52 +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 dcb6013fb6 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-12 06:37:54 +02:00
Bastien 88fbe21a88 Add Luc Pellissier as maintainer for two ob-* files
* lisp/ob-coq.el: Add a maintainer.

* lisp/ob-asymptote.el: Ditto.
2021-05-12 06:30:22 +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 9a7207404c Merge branch 'maint' 2021-05-10 18:02:32 +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
Timothy 981f25031d
ox-md: Use TeX-style $ math wrapping
* lisp/ox-md.el (org-md-latex-environment, org-md-latex-fragment):
These two new filters wrap LaTeX maths in $ / $$ TeX-style notation.
While ox-md endeavours to adhere to the original Markdown specification,
and not any particular variant, the original specification does not deal
with LaTeX fragments at all, and so this change does not reduce how
faithfully the original specification is followed.
There is a major upside to this though. Of the many Markdown variants
that have emerged, those that support LaTeX very often exclusively
support TeX style notation.  This change thus improves the utility of
the Markdown export for many use cases, and deviates no more from the
original specification that the current method.
2021-05-10 04:11:00 +08:00
Nicolas Goaziou 6f1ea80bbd Merge branch 'maint' 2021-05-09 21:51:17 +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
TEC 2ae308342a
org-plot: Fix calling at start of #+plot line
* lisp/org-plot.el (org-plot/gnuplot): When called with point at the
start of the #+plot: line, the behaviour of `org-table-begin' (called in
`org-table-to-lisp') caused no table to be detected.  To work around
this, when the point is at the zeroth column, it is temporarily shifted
one character to the right.
2021-05-09 23:49:46 +08:00
TEC 7dd667af67
org-plot: Use labels with 2d histogram plot
* lisp/org-plot.el (org-plot/preset-plot-types): When the :with
parameter is histograms, use text indices as the x-values.
2021-05-09 23:49:37 +08:00
Boruch Baum 5d2ccdae7f ol-w3m: handle w3m-image link information
* ol-w3m.el (org-w3m-copy-for-org-mode)
(org-w3m-get-next-link-start, org-w3m-get-prev-link-start):
Account for w3m-img links.
(org-w3m-get-anchor-start, org-w3m-get-prev-link-start)
(org-w3m-no-prev-link-p): Unused function notes.
(org-w3m-get-image-end): New function, for w3m-img links.

Related to Emacs bug #47088.
2021-05-08 07:31:50 -04:00
Bastien 348ecd8789 lisp/ob-awk.el: Add Tyler Smith as the maintainer 2021-05-08 09:40:23 +02:00
Bastien da2938d352 Merge branch 'maint' 2021-05-08 09:37:36 +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
Stefan Kangas f1b9119954 lisp/org.el: Make `org-load-hook' obsolete
* lisp/org.el (org-load-hook): Make obsolete in favor of
`with-eval-after-load'.
2021-05-08 09:33:37 +02:00
Bastien 0f2ece647b Update Carsten's email address in some files 2021-05-07 16:50:57 +02:00
Tom Gillespie cbc1f96c41 lisp/ob-calc.el: Add Tom Gillespie as the maintainer
* lisp/ob-calc.el: Add Tom Gillespie as the maintainer.
2021-05-07 09:31:36 +02:00
Bastien eb3de47d25 Merge branch 'maint' 2021-05-06 14:40:38 +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 f95a5cbacb Merge branch 'maint' 2021-05-06 13:51:52 +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
Sébastien Miquel 6e5b39acd1 ob-tangle.el: Fix single block tangle
lisp/ob-tangle.el (org-babel-tangle-single-block): Fix the result when
`only-this-block' is `t' to match what is expected by
`org-babel-tangle'.
(org-babel-effective-tangled-filename): Extract the
computation of filename of tangled src block.
(org-babel-tangle-collect-blocks): Use `org-babel-effective-tangled-filename'.
2021-05-06 13:37:18 +02:00
Atlas48 bfc3d18b04 lisp/org-entities.el (org-entities): Add the Turkic dotted and dotless 'i'
* lisp/org-entities.el (org-entities): Add the Turkic dotted and
dotless 'i'.

TINYCHANGE
2021-05-06 13:10:18 +02:00
Nicolas Goaziou 62c90bef35 compat: Add `org-string-distance'
* lisp/ob-core.el (org-babel-edit-distance): Rename function
`org-string-distance' and move it to "org-compat.el".
(org-babel-check-src-block): Use `org-string-distance' instead.
* lisp/org-compat.el: Add `org-string-distance' for a future
deprecation in favor of `string-distance'.
2021-05-05 17:54:36 +02:00