Commit Graph

22887 Commits

Author SHA1 Message Date
Tom Gillespie 44d08f35cb testing/org-test.el: Ensure font-lock is set in temp text
* testing/org-test.el (org-test-with-temp-text): Ensure
font-lock is set.

TINYCHANGE
2020-02-12 09:37:04 +01:00
Bastien 76ac192c4f Fix previous commit 2020-02-12 09:36:04 +01:00
Bastien 04e9d848ed Fix org-attach dispatch enhancement 2020-02-12 09:24:33 +01:00
Bastien d614c89f5d Merge branch 'maint' 2020-02-12 09:16:49 +01:00
Bastien c964cf79bc org-element.el: Fix bug about short captions
* lisp/org-element.el
(org-element--collect-affiliated-keywords): Save match data when
setting the main value for keywords.

This fixes a bug about defining short captions.  Thanks to Anthony
Cowley for reporting this and suggesting this fix.
2020-02-12 09:14:30 +01:00
Bastien 5d21fbbcf3 doc/org-manual.org: Fix typo
Thanks to Colin Baxter for reporting this.
2020-02-12 09:10:12 +01:00
stardiviner 7cd9ad8f75 Allow postgres as an alias for postgresql
* lisp/ob-sql.el (org-babel-edit-prep:sql): New function to
set SQL product.
(org-babel-execute:sql): Make "postgres" an alias for
"postgresql".

TINYCHANGE
2020-02-12 09:03:44 +01:00
Bastien eaa220f6a7 Small code enhancement
* doc/org-manual.org (Checkboxes): Minor update.

* lisp/org-list.el (org-at-radio-list-p): Respect the
attributes #+ATTR_* syntax.
2020-02-12 08:40:46 +01:00
Bastien 4028cc731b Use "#+attr_org: :radio" before lists to enable radio buttons
* doc/org-manual.org (Checkboxes): Document the use of
"#+attr_org".

* lisp/org.el (org-ctrl-c-ctrl-c): When the list at point is
preceded by "#+attr_org: :radio" use `org-toggle-radio-button'
instead of `org-toggle-checkbox'.

* lisp/org-list.el (org-at-radio-list-p): New defsubst.
(org-toggle-checkbox): Use it.

* etc/ORG-NEWS: Document the use of "#+attr_org".
2020-02-12 01:51:46 +01:00
Bastien 561feb128d Add `org-toggle-radio-button' and related minor mode
* doc/org-manual.org (Checkboxes): Document the new minor mode
and command.

* lisp/org-keys.el (org-mode-map): Bind C-c C-x C-r to
`org-toggle-radio-button'.

* lisp/org-list.el (org-list-checkbox-radio-mode): New minor
mode to let C-c C-c call `org-toggle-radio-button' instead of
`org-toggle-checkbox'.
(org-toggle-radio-button): New command.

* lisp/org.el (org-ctrl-c-ctrl-c): Use `org-toggle-radio-button'.

* etc/ORG-NEWS: Document the new minor mode and command.

Thanks to Phil Sainty for sharing this idea and links to similar
implementations.
2020-02-11 23:55:53 +01:00
Bastien 8f59e01aa8 Fix code typo in commit 0c72a1c4 2020-02-11 23:52:17 +01:00
Bastien fe46c02afa Fix code typo in commit 2508dfa6 2020-02-11 23:52:00 +01:00
Bastien 99f5f0ce1e org-table.el: Don't run table header mode with a timer
* lisp/org-table.el (org-table-header-set-header): Don't run
with a timer.
2020-02-11 21:42:54 +01:00
Nicolas Goaziou fa707c4cf1 Merge branch 'maint' 2020-02-11 19:11:37 +01:00
Nicolas Goaziou b4daf54591 test-ox: Fix comment.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Fix
comment.

This is a followup to 1af8c5a0df.
2020-02-11 19:11:11 +01:00
Nicolas Goaziou a70fff50d0 Merge branch 'maint' 2020-02-11 19:02:53 +01:00
Nicolas Goaziou 1af8c5a0df ox: Fix extra character deletion after link
* lisp/ox.el (org-export--update-included-link): Account
for :post-blank property when inserting back the link.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Add
test.

Fixes bug#39173.
2020-02-11 18:59:52 +01:00
Bastien 78ec8da52a org-capture.el: Conditionally throw an error on missing annotation
* lisp/org-capture.el (org-capture-fill-template): Throw a
user error when :immediate-finish is `t' and when the %a
template could not be expanded.

Thanks to Leo Gaspard for this idea.
2020-02-11 14:45:19 +01:00
Bastien 20ab65482a Merge branch 'maint' 2020-02-11 14:40:17 +01:00
Bastien 713c8d5aba ob-core.el: Respect `org-babel-tangle-uncomment-comments'
* lisp/ob-core.el (org-babel-expand-noweb-references): Respect
`org-babel-tangle-uncomment-comments'.

Thanks to Immanuel Litzroth for reporting this.
2020-02-11 14:35:30 +01:00
Bastien 9447287521 Merge branch 'maint' 2020-02-11 12:28:40 +01:00
Brian Carlson 5acf4d4692 ox-latex.el: Fix the display of checkbox items
* lisp/ox-latex.el (org-latex-item): Fix the display of
checkbox items.

TINYCHANGE
2020-02-11 12:28:02 +01:00
Bastien e01b335ee3 ob-scheme.el: Fix interpreter output sometimes being nil
* lisp/ob-scheme.el (org-babel-scheme-execute-with-geiser):
Fix interpreter output sometimes being nil.

Thanks to Vladimir Nikishkin for reporting this and proposing a
similar fix.
2020-02-11 12:19:34 +01:00
Bastien efd754e474 Fix 68fa5e589 2020-02-11 12:03:38 +01:00
Bastien 0d4e364635 Merge branch 'maint' 2020-02-11 10:43:36 +01:00
Bastien 749c08c263 testing/lisp/test-ob-lilypond.el: Delete test
The test does not work and prevented a bug to be detected.
2020-02-11 10:42:49 +01:00
Bastien 0330efc865 Merge branch 'maint' 2020-02-11 10:08:14 +01:00
Bastien 95ff24dfc4 org.el: Fix bug occurring when setting effort value
* lisp/org.el (org-refresh-property)
(org-refresh-category-properties): Tiny docstring or comment
fixes.
(org-set-effort): Fail early when the effort value is wrong.

Thanks to Firmin Martin for reporting this.
2020-02-11 10:06:13 +01:00
Bastien 68fa5e589f ox-html.el: Enhance Javascript scripts display of the license
* lisp/ox-html.el (org-html-scripts)
(org-html-infojs-template): Enhance the display of the
licenses for Javascript scripts.

Thanks to Arne Babenhauserheide for suggesting this.
2020-02-11 09:45:48 +01:00
Bastien 85363d4867 etc/ORG-NEWS: Allowed empty HTML extension 2020-02-11 09:34:17 +01:00
Bastien 3ce509b855 ox-html.el: Build HTML links correctly
* lisp/ox-html.el (org-html-link): Add the possibility to use
an empty HTML extension, building HTML links to accordingly.
2020-02-11 09:30:57 +01:00
Bastien 0c72a1c413 ox-html.el: No trailing dot when HTML extension is empty
* lisp/ox-html.el (org-html-export-to-html)
(org-html-publish-to-html): Don't add a trailing dot when HTML
extension is empty.
2020-02-11 09:26:20 +01:00
Bastien d0cc865623 Rearrange etc/ORG-NEWS 2020-02-11 09:02:19 +01:00
Bastien 968117b19d Merge branch 'maint' 2020-02-11 08:51:43 +01:00
Bastien 52320f942b lisp/ob-lilypond.el: Fix initialization bug
* lisp/ob-lilypond.el (org-babel-lilypond-commands): Fix the :set
function.

Thanks to Victor A. Stoichita for reporting this.
2020-02-11 08:51:30 +01:00
Bastien e83b2b50df Merge branch 'maint' 2020-02-11 07:54:47 +01:00
Bastien f7175e4878 org.el: Fix bug about cycling
* lisp/org.el (org-cycle-internal-local): Handle
`org-cycle-include-plain-lists'.

Thanks to Bruce Tulloch for reporting this.
This fixes a bug introduced in commit c2aebcee.
2020-02-11 07:54:36 +01:00
Bastien 2508dfa644 Factor out org-scroll and use it in ox.el, org-agenda/attach.el
* lisp/ox.el (org-export--dispatch-ui): Update message in the
header line to promote the use of C-v and M-v while SPC and
DEL are still allowed for backward compatibility reasons.

* lisp/org-macs.el (org-scroll): New function.

* lisp/org-attach.el (org-attach): Use `org-scroll'.

* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Allow C-v, M-v, C-n and C-p to scroll.

This change adverize C-v, M-v, C-n and C-p as the default keys
for scrolling the window, while SPC and DEL are still available
in the export dispatch window.

In particular, don't use SPC as a way to scroll the window in
the agenda commands dispatch window, as this key might be used
for a custom agenda command.
2020-02-11 01:04:28 +01:00
Bastien 185e184e15 ox.el: Remove obsolete comment
* lisp/ox.el: Remove obsolete comment.
2020-02-11 01:00:05 +01:00
Bastien 23fa7b9796 etc/ORG-NEWS: Delete an obsolete change
* etc/ORG-NEWS: Delete an obsolete change.
2020-02-10 23:25:54 +01:00
Bastien ceb8086301 Small refactoring
* lisp/org-macs.el (org-scroll): New function.

* lisp/ox.el (org-export--dispatch-action):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Use the new function.
2020-02-10 23:22:51 +01:00
Bastien d9b586ce34 etc/ORG-NEWS: Document a change
* etc/ORG-NEWS: Document the ability to scroll up and down in the
agenda commands dispatch window.
2020-02-10 23:21:34 +01:00
Marco Wahl 1c6336652b org: Tiny refactoring
* lisp/org.el (org-redisplay-inline-images): Save one line
of code.  Also make the docstring more precise.
2020-02-10 13:10:08 +01:00
Bastien 63ca986bea Fix e3b79ad2b 2020-02-10 08:48:55 +01:00
Bastien e4be72d14b org.el: Fix typo in docstring
* lisp/org.el (org-startup-truncated): Fix typo in docstring.
2020-02-10 00:33:54 +01:00
Bastien 2096c9c76f org.el: Tiny code cleanup
* lisp/org.el (org-fixup-indentation): Remove redundant
`save-excursion'.
2020-02-09 18:25:35 +01:00
Bastien 97269bc6fa Merge branch 'maint' 2020-02-09 17:48:41 +01:00
Bastien a0f3bbd3c2 Revert "org.el: Fix `org-indent-region' bug in source block"
This reverts commit 321b119c44.
2020-02-09 17:48:19 +01:00
Bastien e3b79ad2bf Allow a new value for `org-adapt-indentation'
* doc/org-manual.org (Hard indentation): Add a footnote
mentioning the new value for `org-adapt-indentation'

* etc/ORG-NEWS: Mention the new value for
`org-adapt-indentation'.

* lisp/org.el (org-logbook-drawer-re): New constant.
(org-adapt-indentation): Allow 'headline-data as a new value
to only adapt indentation for headline data.
(org-fixup-indentation, org--get-expected-indentation): Handle
`org-adapt-indentation' set to 'headline-data.

* lisp/org-indent.el (org-indent-mode)
(org-indent-add-properties): Handle `org-adapt-indentation'
set to 'headline-data.

* lisp/org-clock.el (org-clock-in): Call `org-indent-line'
after clock timestamp insertion.
2020-02-09 17:30:42 +01:00
Bastien a62751a6a5 Add `org-clock-toggle-auto-clockout'
* doc/org-manual.org: Document the new command.

* lisp/org-clock.el (org-clock-toggle-auto-clockout): New
command.
2020-02-09 11:17:42 +01:00