Commit Graph

24056 Commits

Author SHA1 Message Date
TEC ec6d1df9bc lisp/ox.el (org-export-to-file): Don't load the major mode
* lisp/ox.el (org-export-to-file): Don't load the major mode.

Prior to this, when `org-export-to-file' was called it activated the
major mode for that file type based on `auto-mode-alist'.  This can be
mildly annoying in various ways as loading the major mode (1) makes
the export take longer, (2) can produce unwanted "noise" while
initialising, namely warnings and errors related to the mode itself,
(3) can produce spurious files like an .auctex-auto folder.  By
locally binding `auto-mode-alist' to nil, all of these undesirable
behaviours can be avoided.

Link: https://orgmode.org/list/87lfa3fips.fsf@gmail.com/
2021-05-03 19:23:39 +02:00
Bastien 832b3951e8 Merge branch 'maint' 2021-05-03 19:11:47 +02:00
Mingkai Dong dfdd5cd0cd lisp/ox-html.el: Finish the headline numbering part by a full stop
* lisp/ox-html.el (org-html-headline): Finish the numbering part
with a full stop, to be consistent with the TOC numbers.

TINYCHANGE

Link: https://orgmode.org/list/2F46C11A-B2CD-445C-A811-CB05A043FE46@dong.mk
2021-05-03 19:10:52 +02:00
Bastien d48276b894 Replace `org-speed-commands-user' by `org-speed-commands'
* etc/ORG-NEWS: Announce `org-speed-commands'.

* doc/org-manual.org (Speed Keys): Document `org-speed-commands'
instead of `org-speed-commands-user'.

* lisp/org-compat.el (org-speed-commands-user): Make an obsolete
variable.

* lisp/org-keys.el (org-speed-commands-user): Remove.
(org-speed-commands): Rename from `org-speed-commands-default' and
make a defcustom.  Add the docstring of `org-speed-commands-user'.
(org-speed-command-help): Throw a message about obsolete option
`org-speed-commands-user' when set in the user configuration.
(org-speed-command-activate): Update docstring.

Link: https://orgmode.org/list/87eeep3c1u.fsf@bzg.fr/
2021-05-03 16:30:04 +02:00
Bastien 5e534aecaa Merge branch 'maint' 2021-05-03 16:25:55 +02:00
Bastien de93bf02bf lisp/org.el: More fixes to `org-indent-line'
* lisp/org.el (org-indent-line): Fixes indentation.
(org--get-expected-indentation): Don't handle the 'headline-data
value for `org-adapt-indentation' here, it is taken care upstream
in `org-indent-line'.
2021-05-03 16:25:24 +02:00
Bastien 546d35a564 README: Add a section "Join the GNU Project" 2021-05-03 16:13:31 +02:00
Bastien 2f200f50d6 Merge branch 'maint' 2021-05-03 15:59:53 +02:00
Nicholas Savage 238a80d3ad org-colview.el (org-columns): Replace org-map-entries with org-scan-tags
* lisp/org-colview.el (org-columns): Replace call to `org-map-entries'
to build cache with `org-scan-tags'.

Simplifies `org-columns' to call `org-scan-tags' instead of
`org-map-entries'.  This is to fix a bug where an unexpected non-existent
agenda file error was thrown if the buffer that `org-columns' was called
on was not yet saved to disk.  This also simplifies `org-columns' and
prevents unnecessary agenda preparation functions from running.
2021-05-03 15:59:39 +02:00
Eric S Fraga 479a3da22e org-manual.org: describe external reference for :var header
* org-manual.org: the description of the :var header argument for
working with source code has been expanded to mention the possibility
of having an external reference, a reference to an element in another
file.
2021-05-03 15:00:14 +02:00
Bastien 4ca4b45a93 lisp/ob-groovy.el: Fix link
* lisp/ob-groovy.el: Fix link to the official website.
2021-05-03 14:59:44 +02:00
Bastien e80be06236 etc/ORG-NEWS: Announce that contrib/ lives in a separate repository 2021-05-03 13:15:16 +02:00
Bastien 678cb68f78 doc/*: Update references to the old contrib/ directory
* doc/org-manual.org (Installing Org's contributed packages)
(Feedback, External Links, TODO dependencies)
(Capturing column view, Exporting, Add-on Packages)
(List of Contributions, Footnotes): Update references to the old
contrib/ directory.

* doc/org-guide.org (Installation): Ditto.
2021-05-03 13:12:36 +02:00
Bastien 096cacfdbf lisp/org-clock.el: Point to the new location of x11idle.c
* lisp/org-clock.el (org-clock-x11idle-program-name): Update
docstring to point to the new location of the x11idle.c program.
2021-05-03 13:10:03 +02:00
Bastien e12ee7d166 README*: Remove references to contrib/
* README_ELPA: Remove references to contrib/.

* README (Contents of this distribution): Ditto.
2021-05-03 13:09:16 +02:00
Bastien 0555665bb9 Remove the contrib/ directory
The files have been moved to a new repository:
https://git.sr.ht/~bzg/org-contrib
2021-05-03 11:26:00 +02:00
Bastien 3520c5b9a5 CONTRIBUTE: Announce the move of contrib/ to a new repository 2021-05-03 11:25:22 +02:00
Bastien 670f45e0ee Merge branch 'maint' 2021-05-03 10:05:32 +02:00
Bastien ba9e531016 lisp/org.el: Fix another indentation case
* lisp/org.el (org-indent-line): With `org-adapt-indentation' set
to 'headline-data, don't indent after a headline, a planning line
or a drawer.

Reported-by: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Link: https://orgmode.org/list/878s4wu9oe.fsf@gmail.com/T/#m658a98441dcce099a569ca5b228778aad5d102f3
2021-05-03 10:04:57 +02:00
Bastien d33c935ee7 Merge branch 'maint' 2021-05-03 10:01:25 +02:00
Bastien 445be13972 lisp/org.el: Fix indentation again
* lisp/org.el (org-indent-line): Take care of checking at the
beginning of the line.

Reported-by: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Link: https://orgmode.org/list/878s4wu9oe.fsf@gmail.com/T/#m658a98441dcce099a569ca5b228778aad5d102f3
2021-05-03 09:59:54 +02:00
Bastien f3cdc5b211 Merge branch 'maint' 2021-05-03 08:57:17 +02:00
Bastien e7fc34ecf4 lisp/org.el: Update docstring of `org-return-and-maybe-indent'
* lisp/org.el (org-return-and-maybe-indent): Update docstring to
reflect the current behavior.
2021-05-03 08:56:47 +02:00
Bastien a31aeeebec Merge branch 'maint' 2021-05-03 08:47:46 +02:00
Bastien c3917c3a0b lisp/org.el (org-indent-line): Fix another bug
* lisp/org.el (org-indent-line): When `org-adapt-indentation' is
'headline-data, prevent indentation for any first non-empty line
after the headline, not just the one right after the headline.
2021-05-03 08:46:37 +02:00
Bastien c9be80ceb0 Add Nicolas as the maintainer for a few ox-*.el files
* lisp/ox.el:
* lisp/ox-texinfo.el:
* lisp/ox-publish.el:
* lisp/ox-org.el:
* lisp/ox-md.el:
* lisp/ox-icalendar.el:
* lisp/ox-beamer.el:
* lisp/ox-ascii.el: Add Nicolas as the maintainer.
2021-05-03 06:41:56 +02:00
Bastien 945c019176 lisp/org.el: Fix indentation when `org-adapt-indentation' is 'headline-data
* lisp/org.el (org--get-expected-indentation): Fix indentation of
non-headllines with `org-adapt-indentation' set to 'headline-data.
(org-indent-line): When `org-adapt-indentation' is 'headline-data,
don't indent when point is at the first line after a headline.
Update the docstring to make it explicit that indenting relatively
to current level only happens when `org-adapt-indentation' is set
to `t'.
2021-05-03 06:35:33 +02:00
Bastien c7331f859d lisp/org.el: Fix indentation when `org-adapt-indentation' is 'headline-data
* lisp/org.el (org--get-expected-indentation): Fix indentation of
non-headllines with `org-adapt-indentation' set to 'headline-data.
(org-indent-line): When `org-adapt-indentation' is 'headline-data,
don't indent when point is at the first line after a headline.
Update the docstring to make it explicit that indenting relatively
to current level only happens when `org-adapt-indentation' is set
to `t'.
2021-05-03 06:23:03 +02:00
Jeremie Juste 9014577df2 test-ob-R.el: add tests for how NA values are printed
* testing/lisp/test-ob-R.el (ert-deftest test-ob-r/NA-blank): new test
for :results value. Make sure that NA values in R data.frames are
empty string instead of nil previously

see https://orgmode.org/list/87pn1dufm2.fsf@gmail.com/
2021-05-03 00:29:09 +02:00
Jeremie Juste c0338142b7 test-ob-R.el: add tests for output with substrings matching prompt
* testing/lisp/test-ob-R.el (test-ob-r/output-with-<>): new test for output
  angle brackets
 (test-ob-R/output-nonprinted): New test for output results that aren't
explicitly printed.  (Here all the lines are expected to be printed
not just the last one)

Patch suggested by Jack Kamm:
https://orgmode.org/list/87h7slgbi5.fsf@gmail.com/
2021-05-03 00:18:33 +02:00
Jeremie Juste ac8c009e00 lisp/ob-R.el: Fix session output with substrings matching prompts
* lisp/ob-R.el (org-babel-R-evaluate-session): New implementation for session output
results, that concat "^" to comint-prompt-regexp to avoid prompt
confusion with R.

Patch suggested by Jack Kamm:
https://orgmode.org/list/87h7slgbi5.fsf@gmail.com/
2021-05-03 00:15:09 +02:00
Bastien 884a3454fc Merge branch 'maint' 2021-05-02 19:30:31 +02:00
Ihor Radchenko 4c76962814 lisp/org.el: Don't fontify headlines with "::" as description items
* lisp/org.el (org-set-font-lock-defaults): Avoid fontifying headlines
with "::" as description list items.

Lists can start with "*", but "*" must not be at the beginning of
line.  Old regexp did not require whitespace before "*" in description
list items.

Reported-by: Ypo <ypuntot@gmail.com>
Link: https://orgmode.org/list/5adcfcda-35de-8281-a1ff-18d1c95bbde6@gmail.com/
2021-05-02 19:29:23 +02:00
Nicholas Savage 562e325c75 lisp/org-colview.el: Update org-columns to respect global-visual-line-mode
* lisp/org-colview.el (org-columns): Prevent enabling `truncate-lines'
when `global-visual-line-mode' is enabled.

This fixes a bug where `org-columns' overlays were disabling wrapping
of lines when `global-visual-line-mode` was already activated, and so
therefore expectation was that the lines would continue wrapping.
This is because `org-columns' was setting truncate-lines to t, when
global-visual-line-mode requires it to be set to nil. The interaction
between the two caused the wrapping not to occur.
2021-05-02 19:21:44 +02:00
Nicholas Savage cb0ef12801 lisp/org-colview.el: Update org-columns to respect global-visual-line-mode
* lisp/org-colview.el (org-columns): Prevent enabling `truncate-lines'
when `global-visual-line-mode' is enabled.

This fixes a bug where `org-columns' overlays were disabling wrapping
of lines when `global-visual-line-mode` was already activated, and so
therefore expectation was that the lines would continue wrapping.
This is because `org-columns' was setting truncate-lines to t, when
global-visual-line-mode requires it to be set to nil. The interaction
between the two caused the wrapping not to occur.
2021-05-02 19:21:26 +02:00
Nicolas Goaziou 3e497bec35 Merge branch 'maint' 2021-05-02 17:51:15 +02:00
Nicolas Goaziou ab82d6ae25 ox-ascii: Fix title when 2 width char is used
* lisp/ox-ascii.el (org-ascii-template--document-title): Find width of
title with `string-width' instead of counting characters.

Fixes: #48148

Reported-by: Shingo Tanaka <shingo.fg8@gmail.com>
2021-05-02 17:48:47 +02:00
Bastien 379e22bfcc Merge branch 'maint' 2021-05-02 11:06:46 +02:00
Ihor Radchenko 0e7153e63d org-test: Fix wrong-numbre-of-arguments error on master+native-comp
* testing/org-test.el (org-test-at-time): Use correct number of
arguments in 'decode-time cl-letf binding. `decode-time' accepts up to
3 arguments on master.

The wrong-numbre-of-arguments error is raised on Emacs master
configured with native-comp support when running make test on Org mode
master.  Native-comp modifies function calls with optional arguments
in the way that omitted arguments are still provided as `nil'.  For
example, `decode-time' called as (decode-time time) in lisp source may
be compiled into (decode-time time nil nil) call by native-compiler.
If redefined `decode-time' does not accept 3 arguments, it result in
error.

See Emacs bug#48133.
2021-05-02 11:06:32 +02:00
Bastien c67413a7b6 Merge branch 'maint' 2021-05-02 08:50:18 +02:00
Bastien 5584ffc6c4 lisp/org.el (org--backward-paragraph-once): Handle corner case
* lisp/org.el (org--backward-paragraph-once): Don't throw an error
when at the first headline after a single empty line.
2021-05-02 08:49:53 +02:00
Bastien d3b6cdbf37 etc/ORG-NEWS: Use https instead of http when available 2021-05-02 07:59:07 +02:00
Bastien feacffe865 Merge branch 'maint' 2021-05-02 07:10:46 +02:00
Bastien 5021bada95 lisp/org.el: Fix bug when unfolding a subtree
* lisp/org.el (org-cycle-internal-local): Use 'tree instead of
'canonical when setting the visibility of the subtree to unfold.

Reported-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
Link: https://orgmode.org/list/CAELBRWLakDCbawmMdS5Qi0qh5FC2ixF82xNfCg75wMjmze6pbA@mail.gmail.com/
2021-05-02 07:09:55 +02:00
Bastien c7824f9cf8 Merge branch 'maint' 2021-05-02 05:46:57 +02:00
Bastien eedbe286ef lisp/org-table.el: Fix bug with `org-table-wrap-region'
* lisp/org-table.el (org-table-copy-region): Only display a
message when called interactively.
(org-table-wrap-region): Prevent `org-table-cut-region' from
losing track of the region beginning.

Reported-by: Marko Schuetz-Schmuck <marko.schutz@upr.edu>
Link: https://orgmode.org/list/875z84fnwv.fsf@tpad-m.i-did-not-set--mail-host-address--so-tickle-me/
2021-05-02 05:44:46 +02:00
Sébastien Miquel a2cb9b853d ob-tangle.el: Improve tangling
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Group
collected blocks by tangled file name.
(org-babel-tangle): Avoid quadratic behavior in number of blocks and
set modes before writing to file.
* testing/lisp/test-ob-tangle.el (ob-tangle/block-order): Update test.
2021-05-01 22:30:42 +02:00
Bastien f84033b088 Merge branch 'maint' 2021-05-01 22:26:06 +02:00
Bastien ccd513a3c5 lisp/org.el: Don't let `visual-line-mode' override Org's keybindings
* lisp/org.el (org-mode): Don't let `visual-line-mode' override
Org's keybindings for C-a, C-e and C-k.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87a6zkv3m2.fsf@gmail.com/
2021-05-01 22:24:57 +02:00
Kyle Meyer 2d965df01a Merge branch 'maint' 2021-05-01 15:49:24 -04:00