Commit Graph

21013 Commits

Author SHA1 Message Date
stardiviner 1a1e2286ba ob-js: support :session for skewer-mode REPL.
* lisp/ob-js.el (org-babel-js-cmd): Add "skewer-mode".
(org-babel-execute:js):
(org-babel-js-initiate-session): Handle skewer mode.
2018-03-25 22:38:02 +02:00
Marc Ihm d73a5e4137 Removed reference to org-index.el from README 2018-03-24 16:29:40 +01:00
Nicolas Goaziou d33e6eae51 org-macro: Refactoring
* lisp/org-macro.el (org-macro-initialize-templates): Refactor function.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Remove
  duplicate tests.  Add new test.
2018-03-23 23:40:56 +01:00
Nicolas Goaziou 28977b719c Merge branch 'maint' 2018-03-23 23:32:00 +01:00
Nicolas Goaziou 143a87e45c org-macro: Fix infloop when re-defining built-in macros
* lisp/org-macro.el (org-macro-initialize-templates): User-defined
  macros have higher precedence than built-in macros.

Reported-by: Eric S Fraga <esflists@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00413.html>
2018-03-23 23:30:06 +01:00
Kyle Meyer 2ddb26f95d Merge branch 'maint' 2018-03-22 09:26:49 -04:00
Kyle Meyer fa15abe6e8 Update version keyword
As of fffd300ef (Update version keyword, 2018-02-24), this should be
bumped with each release.
2018-03-22 09:18:32 -04:00
Bastien 3a4fd33e58 Merge branch 'maint' 2018-03-22 09:21:33 +01:00
Martin Kampas dd4e57b1d1 Extend match-sparse-tree test for tag hierarchies
* test-org.el (test-org/match-sparse-tree): Add new test.

Test commit 894ec00: Fix recursion stop condition when expanding tags.
2018-03-22 09:21:23 +01:00
Bastien 366d80a6f2 Merge branch 'maint' 2018-03-22 02:28:02 +01:00
Bastien a9139d9976 lisp/org-list.el: Enhance error message
* lisp/org-list.el (org-list-indent-item-generic): Use
`user-error' and enhance the error message.
2018-03-22 02:22:15 +01:00
Nicolas Goaziou 6713c2792f Merge branch 'maint' 2018-03-21 12:52:43 +01:00
Nicolas Goaziou b5a90a7ab5 Silence byte-compiler 2018-03-21 12:52:19 +01:00
Nicolas Goaziou 4a631383dd Remove unused regexp
* lisp/org.el (org-log-drawer-start-re):
(org-log-drawer-end-re)
(org-log-drawer-re): Remove variables.
2018-03-21 12:49:41 +01:00
Bastien f0958d559c Merge branch 'maint' 2018-03-21 02:13:21 +01:00
Martin Kampas 894ec00e9f org.el: Fix recursion stop condition when expanding tags
* lisp/org.el (org-expand-tags): Fix recursion stop condition.

See http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00228.html

TINYCHANGE
2018-03-21 02:12:42 +01:00
Bastien 27d0c469c0 Merge branch 'maint' 2018-03-21 01:58:25 +01:00
Bastien e28a5a66ad org.el: Enhance `org-tag-add-to-alist' and use it more
* lisp/org.el (org-tag-add-to-alist): Check against the car of
the ("tag") or ("tag" . ?k) element.
(org-global-tags-completion-table, org-make-tags-matcher)
(org-set-tags, org-change-tag-in-region)
(org-agenda-prepare-buffers): Use `org-tag-add-to-alist'.
2018-03-21 01:57:45 +01:00
Matt Lundin 393b98ae8e Include buffer tags in global tags completion
* lisp/org.el: (org-global-tags-completion-table): Return all tags,
  including tags in the buffer.

This fixes a bug that caused buffer tags to be excluded if user
configured tags either via `org-tag-alist' or the #+TAGS keyword.
2018-03-21 00:56:25 +01:00
Bastien a402419716 Merge branch 'maint' 2018-03-20 17:23:29 +01:00
Bastien b0cca9656d org.el: Fix bug when adding persistent tags
* lisp/org.el (org-tag-add-to-alist): New function.
(org-set-regexps-and-options): Use the new function to only
append persistent tags if they are not already in the tags
alist.
2018-03-20 17:23:18 +01:00
Bastien f18823b80a Merge branch 'maint' 2018-03-20 14:58:40 +01:00
Bastien b7f350f7ef org.el: Fix bug when building tags groups
* lisp/org.el (org-tag-alist-to-groups): Fix bug.
2018-03-20 14:58:20 +01:00
Bastien 8548dfa33f Merge branch 'maint' 2018-03-20 12:38:31 +01:00
Bastien b2d3dbabf7 org-capture.el: Fix docstring
* lisp/org-capture.el (org-capture-templates-contexts): Fix docstring.
2018-03-20 12:38:24 +01:00
Bastien a06b72bb9d Merge branch 'maint' 2018-03-20 10:01:52 +01:00
Bastien cb46679eb2 org.texi: Fix typo
* doc/org.texi (Emphasis and monospace): Fix typo.

Thanks to Li Deng for reporting this.
2018-03-20 10:01:17 +01:00
Nicolas Goaziou f6b74a5649 Remove `org-context-p'
* lisp/org.el (org-context-p): Remove function.

The function is not used anywhere, and is deprecated
`org-element-at-point'.
2018-03-20 09:34:26 +01:00
Sebastian Reuße 1af7f303d5 Guard against empty headings when sorting
* org.el (org-sort-entries): Guard against empty headings when sorting
alphabetically, numerically.

Due to how ‘org-complex-heading-regexp’ is defined, the title capture group
currently returns nil in empty headings, which we don’t want to pass on to
‘org-sort-remove-invisible’.
2018-03-20 09:25:14 +01:00
Sebastian Reuße 681f870b25 Extend org-sort-entries test
* test-org.el (test-org/sort-entries): Test with empty headings.
2018-03-20 09:18:01 +01:00
Nicolas Goaziou 55d807f348 Merge branch 'maint' 2018-03-20 00:02:26 +01:00
Vladimir Panteleev 02b1574ea9 ob-table: Mention passing ranges as lists in org-sbe's documentation
* ob-table.el (org-sbe): Add documentation note.
2018-03-20 00:01:13 +01:00
Vladimir Panteleev c9d617b322 ob-table: Fix org-sbe's handling of list arguments
* ob-table.el (org-sbe): Add an explicit case for handling list
arguments. This avoids doing the wrong thing (%s-formatting a list,
thus losing syntax like double-quotes). This enables passing org-table
ranges through org-sbe in a simple and correct manner.

* test-ob-table.el: Add test.
2018-03-20 00:01:09 +01:00
Vladimir Panteleev 5b59e16c9e ob-table: Fix org-sbe's handling of quotes in cell values
* ob-table.el (org-sbe): org-sbe did the wrong thing when given a
reference to a cell containing quotes or backslashes, because it would
simply wrap any $-prefixed value in quotes, without any escaping. Fix
this by using "%S" (instead of "\"%s\"").

* test-ob-table.el: Add test.
2018-03-20 00:01:05 +01:00
Nicolas Goaziou beeb4bf23f ox: Fix regression in INCLUDE keywords
* lisp/ox.el (org-export--prepare-file-contents): Activate Org mode in
  temporary buffer so all regexps are set.  Also, be more strict when
  updating links, i.e., do not bother if both includer and includee
  belong to the same directory, or if there's no includer at all.
  Eventually, only update links within lines specifications, if any.

* testing/lisp/test-ox.el (test-org/expand-include/links): Add tests.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00394.html>
2018-03-19 23:48:38 +01:00
Nicolas Goaziou 0de3f78c28 Merge branch 'maint' 2018-03-18 21:27:19 +01:00
Nicolas Goaziou e1f1acbbfb Improve docstring for `org-time-stamp-inactive'
* lisp/org.el (org-time-stamp-inactive): Improve docstring.
2018-03-18 21:26:42 +01:00
Nicolas Goaziou 5e51c92fce manual: Slightly re-organize `org-time-stamp' documentation 2018-03-18 21:21:51 +01:00
Nicolas Goaziou a23be068f6 ox: Add test for included files.
* testing/lisp/test-ox.el (test-org/expand-include/links): New test.
2018-03-18 16:13:06 +01:00
Daniel Gomez d81a1d088c Fix file links when using #+INCLUDE 2018-03-18 16:09:55 +01:00
Nicolas Goaziou 594b2dbae8 Merge branch 'maint' 2018-03-17 14:57:25 +01:00
Nicolas Goaziou ea4cb14883 Fix `org-set-tags-to'.
* lisp/org.el (org-set-tags-to): Do not throw an error on empty
  headlines.
* testing/lisp/test-org.el (test-org/set-tags): Move test.
(test-org/set-tags-to): New test.

Reported-by: Adrian Bradd <a.bradd@columbia.edu>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00210.html>
2018-03-17 14:56:49 +01:00
Nicolas Goaziou 5aaf3dfc7e Move `org-heading-delete-metadata' into "org-list.el"
* lisp/org.el (org-heading-delete-metadata): Move to...
* lisp/org-list.el (org-list--delete-metadata): ... here.  Refactor
  code.
(org-toggle-item): Use new function.

* testing/lisp/test-org-list.el (test-org-list/toggle-item): Add test.

At the moment, this function is only used internally in "org-list.el",
so it belongs there.

Also refrain from removing log or clock drawers, because they may not
contain all clocks or notes anyway. Besides, the information they
contain may still make sense in a plain list.
2018-03-17 11:49:16 +01:00
stardiviner 00938bc98b org-src: New option for `org-src-window-setup'.
org-src.el: (org-src-window-setup) support open edit src window below.

TINYCHANGE
2018-03-17 08:11:24 +01:00
Pierre Téchoueyres bd0b691716 ob-sql.el: Improve Oracle connection and usage for ob-sql.
* lisp/ob-sql.el (org-babel-sql-dbstring-oracle): Permit to omit host
and port to allow use of alias defined in Oracle's TNSNAMES files.
This now allow two way calling it :
<user>/<password>@<host>:<port>/<database ID>
or
<user>/<password>@<database alias>
2018-03-16 23:01:58 +01:00
stardiviner 6cf5fc0fc1 ob-clojure-litterate: Fix trigger functions.
* ob-clojure-literate.el (ob-clojure-literate-enable,
  ob-clojure-literate-disable): Put advice into
  ob-clojure-literate-mode trigger functions.
2018-03-14 17:03:33 +01:00
Pierre Téchoueyres 0edf344e2a ob-sql.el: Improve Oracle connection and usage for ob-sql.
* lisp/ob-sql.el (org-babel-sql-dbstring-oracle): Don't use empty
args.  This allows use of alias defined in Oracle's TNSNAMES files.
(org-babel-execute:sql): Don't feed lines with trailing spaces.  This
also improve speed for retrieving data.
2018-03-14 14:30:51 +01:00
Nicolas Goaziou bc7b24d0d0 ob-core: Silence byte-compiler 2018-03-13 09:29:50 +01:00
Nicolas Goaziou 96ae324ed1 org-compat: Silence byte-compiler
* lisp/org-compat.el (fboundp): Silence byte-compiler.
2018-03-13 09:28:24 +01:00
Nicolas Goaziou 409a62e5c9 Move some string functions to "org-macs.el"
* lisp/org.el (org-string<):
(org-string<=):
(org-string>=):
(org-string>):
(org-string<>): Move to...
* lisp/org-macs.el: ... here.
2018-03-13 09:26:53 +01:00