Commit Graph

24225 Commits

Author SHA1 Message Date
Bastien 402bd498ab Merge branch 'maint' 2021-05-15 13:51:15 +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 dc45e84a06 Merge branch 'maint' 2021-05-15 13:49:57 +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 b923a23221 Merge branch 'maint' 2021-05-15 11:01:16 +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
Bastien e2cf4369d6 Merge branch 'maint' 2021-05-15 10:33:34 +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
Bastien b2c5028e5b lisp/org.el: Minor aesthetic clean-up 2021-05-15 10:25:40 +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
Bastien 5a1a1ebdeb Merge branch 'maint' 2021-05-15 10:13:07 +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 f98e3ef65a 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 10:02:09 +02:00
Bastien c6d4c9344c Merge branch 'maint' 2021-05-15 09:58:06 +02:00
Bastien 78e39d58d4 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 09:57:45 +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 3581f3730f CONTRIBUTE: Small enhancements 2021-05-14 21:24:52 +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 34bbb03cca CONTRIBUTE: Small enhancements 2021-05-14 05:15:20 +02:00
Bastien cb8e50ed15 Merge branch 'maint' 2021-05-13 15:00:29 +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 27621a5b03 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:33:13 +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 8f03cd7290 Merge branch 'maint' 2021-05-11 09:40:46 +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 97d9460945 Merge branch 'maint' 2021-05-07 07:18:16 +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 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
Bastien bee8e3adf8 Merge branch 'maint' 2021-05-06 12:13:04 +02:00
Bastien 15200c25d5 doc/org-manual.org: Small rephrasing
* doc/org-manual.org (Features Overview): Small rephrasing.

Reported-by: Ian Nehera <delta29@shaw.ca>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47738
2021-05-06 12:10:25 +02:00