Commit Graph

20986 Commits

Author SHA1 Message Date
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
Sebastian Reuße 4b19029a72 Improve ‘org-sort-list’ test
* test-org-list.el (test-org-list/sort): Take case-sensitive
vs. insensitive sorting into account.
2018-03-13 09:09:58 +01:00
Sebastian Reuße 88bf8aef28 org-table-sort-lines: Fix case-sensitive sorting
* org-table.el (org-table-sort-lines): Fix case sensitive sorting,
improve docstring.
* test-org-table.el (test-org-table/sort-lines): Enforce C locale when
testing alphabetic sorting.

‘sort-subr’ ignores ‘sort-fold-case’ when a predicate is provided. To
correctly handle case-sensitivity, we now bake it into the predicate.

Since we are now sorting according to the user’s locale, WITH-CASE
will not make a difference in most instances, since most locales
always sort case-insensitively (cf. how GNU sort ignores the ‘-f’
switch).  We now mention this in the function docstring.

In order to meaningfully test case-sensitive sorting, we now enforce
the C locale in the respective unit test.
2018-03-13 09:09:54 +01:00
Sebastian Reuße 8e9518a3b0 Fix string-collate-lessp shim
* org-compat.el (org-string-collate-lessp): When shimming
string-collate-lessp, accept the same arguments as in the unshimmed
case.
2018-03-13 09:09:48 +01:00
Sebastian Reuße 89ec5e198b Fix org-table-sort-lines test
* test-org-table.el (test-org-table/sort-lines): Fix and improve
testcase.

Sorting and reversing «a C b» should result in «C b a», not in «b a
C».  This test did not fail previously only because
org-table-sort-lines had an issue whereby sorts were always
case-sensitive.
2018-03-13 09:09:41 +01:00
Sebastian Reuße 0d6ee386a1 Fix alphabetic string matching operators
* org.el (org-string<): Add.
(org-op-to-function): Use it.
(org-string> etc.): Use collated comparison.

Cf. commit 551d2f1fe.
2018-03-13 09:09:32 +01:00
Sebastian Reuße e64ff15f67 Fix alphabetic sorting for tables, plain lists
* org-table.el (org-table-sort-lines): Use collated sorting.
* org-list.el (org-sort-list): Use collated sorting.

Cf. commit 551d2f1fe.
2018-03-13 09:09:07 +01:00
Nicolas Goaziou 258996a9a6 manual: Fix capitalization of keys 2018-03-12 22:49:18 +01:00
Nicolas Goaziou 0de818964d Merge branch 'maint' 2018-03-11 19:22:25 +01:00
Nicolas Goaziou 2f587d496f org-capture: Prevent spurious blank line during capture
* lisp/org-capture.el (org-capture-place-entry): Prevent spurious
  blank line during capture.

Reported-by: Luke <mideniko1234-org@yahoo.co.uk>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00075.html>
2018-03-11 19:21:29 +01:00
Marc Ihm bb5e79e2e8 removed org-index.el in favor of melpa 2018-03-11 08:24:39 +01:00
Bastien 51b339105a Merge branch 'maint' 2018-03-10 22:38:59 +01:00
Bastien c0f423d434 orgguide.texi: Fix more links and references 2018-03-10 22:38:39 +01:00
Bastien e10b1f5de9 Merge branch 'master' of code.orgmode.org:bzg/org-mode 2018-03-10 22:29:54 +01:00
Bastien 69e674f518 Merge branch 'maint' 2018-03-10 22:29:38 +01:00
Bastien 50550c8405 orgguide.texi: Fix broken or obsolete links 2018-03-10 22:29:23 +01:00
Kyle Meyer 88e1e865a5 Merge branch 'maint' 2018-03-09 23:42:24 -05:00
Glenn Morris 04f06958ab Backport commit 16faff6a4 from Emacs
; * lisp/org/org-table.el: Replace obsolete alias in comment.
16faff6a46f28b4db2e9b91e52b27404303f3197
Glenn Morris
Fri Mar 9 12:43:21 2018 -0500
2018-03-09 23:41:47 -05:00
Kyle Meyer eeba7a5316 manual: Sync with org.texi 2018-03-07 22:08:47 -05:00
Kyle Meyer f74f55cc75 Merge branch 'maint' 2018-03-07 22:07:42 -05:00
Paul Eggert 9ac80ede5e Backport commit f2caf08ca from Emacs
; Spelling fixes
f2caf08ca625f64c7eeea8dfa8f65a5b1bac58e2
Paul Eggert
Sun Mar 4 17:10:34 2018 -0800
2018-03-07 22:07:25 -05:00
Bastien 824cc8e56a Delete spurious file 2018-03-06 18:42:51 +01:00
Nicolas Goaziou 5ad085f34c Merge branch 'maint' 2018-03-06 10:15:22 +01:00
Nicolas Goaziou 9449939ca0 org-clock: Fix face for clock overruns
* lisp/org-clock.el (org-clock-get-clock-string): Fix 6655429b8.

Reported-by: Luke <mideniko1234-org@yahoo.co.uk>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00078.html>
2018-03-06 10:13:12 +01:00
Bastien Guerry f7b120e566 Merge branch 'develop' of stardiviner/org-mode into master 2018-03-06 07:49:47 +00:00
stardiviner 49a8de4ffd
* ob-core.el (org-babel-result-to-file): relative file link result.
Respect option `org-link-file-path-type`.
2018-03-06 14:43:22 +08:00
Nicolas Goaziou 881da595dd manual.org: Fix typo
* contrib/manual.org (Agenda Files): Fix typo.

"iswitchb" refers here to the library name, not to the command.
2018-03-05 19:28:00 +01:00
Nicolas Goaziou aad62024c9 manual: Sync with org.texi 2018-03-05 19:26:43 +01:00