Commit Graph

14582 Commits

Author SHA1 Message Date
Nicolas Goaziou 20b5d8aaec ob-js: Fix `indium-run-node' call.
* lisp/ob-js.el (org-babel-execute:js): `indium-run-node' expects
  a command to run.
2018-04-02 23:45:29 +02:00
stardiviner 174e9d1ec9 Fix org-babel-js-initiate-session
* ob-js.el (org-babel-js-initiate-session): Add required optional
 second argument.
2018-04-02 20:42:42 +02:00
stardiviner f57df8fc74 ob-shell: Add zsh and fish shells.
* ob-shell.el (org-babel-shell-names) add "zsh" and "fish".
2018-04-02 20:42:16 +02:00
Nicolas Goaziou e462125cfc org-table: Improve shrinking on right-aligned and centered columns
* lisp/org-table.el (org-table--make-shrinking-overlay): New function.
(org-table--shrink-field): Use new function.
(org-table--shrink-columns): Update function.
* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
  Update test.
2018-04-02 20:30:40 +02:00
Nicolas Goaziou 834f6d100b org-tempo: Require `org' 2018-03-31 08:51:10 +02:00
Nicolas Goaziou 83f4627679 Change default value for scientific notation related variables
* lisp/ox-latex.el (org-latex-table-scientific-notation):
* lisp/ox-texinfo.el (org-texinfo-table-scientific-notation): Change
  default value to nil.

Reported-by: Günter Lichtenberg <mail@guenterlichtenberg.de>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00527.html>
2018-03-30 22:20:30 +02:00
Kyle Meyer 052fc2226b Merge branch 'maint' 2018-03-27 18:22:29 -04:00
Rasmus ab488dc438 org.el: Fix whitespace issue blocking upstream commit 2018-03-27 18:21:31 -04:00
Nicolas Goaziou 30b7fba2ae Merge branch 'maint' 2018-03-26 23:27:07 +02:00
Nicolas Goaziou 1b3cc4e463 Update version 2018-03-26 23:24:00 +02:00
Nicolas Goaziou 842a5ba6d3 org-agenda: Fix temporary delays
* lisp/org-agenda.el (org-agenda-get-scheduled): Ignore "--Xd" delays
  after first repeat.

Reported-by: hhkg@protonmail.com
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00481.html>
2018-03-26 23:22:38 +02:00
Kyle Meyer be8f76cbe9 Merge branch 'maint' 2018-03-26 00:07:03 -04:00
Glenn Morris b45c1ff4d4 Backport commit a6a821d29 from Emacs
* lisp/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.

Avoids type mismatch when relevant library is not present/loaded.

a6a821d29bda3e45fb26289e6119359ea3b91ebb
Glenn Morris
Thu Mar 22 14:37:45 2018 -0400
2018-03-26 00:01:40 -04:00
Nicolas Goaziou 9aaa035e88 Merge branch 'maint' 2018-03-25 22:56:01 +02:00
Nicolas Goaziou 8c9ebc81f0 Revert "ob-table: Fix org-sbe's handling of quotes in cell values"
This reverts commit 5b59e16c9e.
2018-03-25 22:55:24 +02:00
Nicolas Goaziou 9e70db6bab Revert "ob-table: Fix org-sbe's handling of list arguments"
This reverts commit c9d617b322.
2018-03-25 22:55:14 +02:00
Nicolas Goaziou 6261bbd20b Revert "ob-table: Mention passing ranges as lists in org-sbe's documentation"
This reverts commit 02b1574ea9.
2018-03-25 22:54:56 +02:00
stardiviner 6bb4134cdd ob-js: Small refactoring.
* lisp/ob-js.el (org-babel-prep-session:js): Replace `mapc' + `lambda'
  with `dolist'.
2018-03-25 22:47:27 +02:00
stardiviner 5ee6c45953 ob-js: support :session for js-comint REPL.
* lisp/ob-js.el (org-babel-js-cmd): Add js-comint.
(org-babel-js-initiate-session): Add support for js-comint.
2018-03-25 22:47:03 +02:00
stardiviner b4e2fed77e ob-js: support :session for Indium Node REPL.
* lisp/ob-js.el (org-babel-js-cmd): Add "indium".
(org-babel-execute:js): Handle Indium REPL.
2018-03-25 22:41:05 +02:00
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
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 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
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
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
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
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 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 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 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
Bastien 69e674f518 Merge branch 'maint' 2018-03-10 22:29:38 +01: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 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
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
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 b420c8e290 ob-core: Fix last commit
* lisp/ob-core.el (org-babel-execute-src-block): Fix thinko in commit
  122bf2997.
2018-03-05 14:34:28 +01:00
Bastien 69c5b6c999 Remove headings' metadata when turning them into list items
* lisp/org-list.el (org-toggle-item): Delete headings'
metadata before turning them into list items.

* lisp/org.el (org-log-drawer-start-re): New variable.
(org-log-drawer-end-re, org-log-drawer-re): New constants.
(org-heading-delete-metadata): New function.
(org-setting-tags): Fix comment.
2018-03-05 10:57:43 +01:00
Bastien 902148a967 Merge branch 'maint' 2018-03-04 21:22:32 +01:00
Bastien 74f6ed1eb0 org-clock.el: Strip bracket links from the heading
* lisp/org-clock.el (org-clock--mode-line-heading): Strip
links from the heading.

This restores the previous behavior before commit 66554298.

Thanks to Matt Lundin for reporting this.
2018-03-04 21:21:00 +01:00
Nicolas Goaziou d97ae53059 Merge branch 'maint' 2018-03-03 23:33:59 +01:00
Nicolas Goaziou cb0954d8de org-gnus: Fix `org-gnus-store-link'
* lisp/org-gnus.el (org-gnus-store-link): Fix storing link from an
  article when point in the summary buffer does not match the article.

Reported-by: Kevin Brubeck Unhammer <unhammer@fsfe.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-03/msg00037.html>
2018-03-03 23:33:17 +01:00
Nicolas Goaziou 122bf29974 ob-core: Tiny refactoring
* lisp/ob-core.el (org-babel-execute-src-block): Tiny refactoring.
  Keep lines under 80 columns.
2018-03-03 10:07:21 +01:00
Nicolas Goaziou 3fab011755 org-element: Better indentation for `org-element-adopt-elements'
* lisp/org-element.el (org-element-adopt-elements): Define a better
  indentation rule.
2018-03-03 10:00:06 +01:00
Bastien Guerry 0c96d5066f Merge branch 'develop' of stardiviner/org-mode into master 2018-03-02 08:52:42 +00:00
stardiviner 39bd69b08d
* ob-core.el: (org-babel-execute-src-block) handle :results graphics :file case.
Don't write result to file if result is graphics.
2018-03-02 14:22:52 +08:00
Nicolas Goaziou a1659053d5 Merge branch 'maint' 2018-03-01 10:56:01 +01:00
Nicolas Goaziou 428ab7942a org-agenda: Obey to "++" prefix when bulk rescheduling/resetting deadline
* lisp/org-agenda.el (org-agenda-bulk-action): When date starts with
  "++", shift every marked entry.

Reported-by: Michael Hoffman <gmane4-hoffman@sneakemail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2018-03/msg00001.html>
2018-03-01 10:53:35 +01:00
Nicolas Goaziou d87148057e Update .dir-locals
* .dir-locals.el (org-mode): Update default values.
* lisp/org-list.el (org-list-description-max-indent): Add :safe
  keyword.
2018-02-27 19:17:18 +01:00
Nicolas Goaziou 2c93a0b2d7 org-tempo: Fix TAB behaviour
* lisp/org-tempo.el (org-tempo-complete-tag): Use a different trick to
  handle failed completions.

Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00164.html>
2018-02-27 02:02:56 +01:00
Alex Branham f521400a08 New face for upcoming deadlines in agenda
* lisp/org-faces.el (org-upcoming-distant-deadline-face): New face.
2018-02-27 01:44:49 +01:00
Nicolas Goaziou 6a56ae53f2 `org-mark-ring-push' also populates Emacs mark ring
* lisp/org.el (org-mark-ring-push): Also populate Emacs mark ring.

Fixes: Bug#23745
2018-02-27 01:02:22 +01:00
Nicolas Goaziou 8ebf4b7274 Change `org-paste-subtree' behavior
* lisp/org.el (org-paste-subtree): Never split a section. Instead
  always insert tree before the headline after point.  Use `org-yank'
  to split the section.
* testing/lisp/test-org.el (test-org/paste-subtree): New test.
2018-02-27 00:03:31 +01:00
Nicolas Goaziou e445894c0d Merge branch 'maint' 2018-02-26 12:16:34 +01:00
Nicolas Goaziou a0104599dc Fix `org-paste-subtree'
* lisp/org.el (org-paste-subtree): Use `org-outline-regexp-bol'.

The function cannot detect the proper level when a headline around
point contains spurious white spaces after the stars.
2018-02-26 12:14:24 +01:00
Nicolas Goaziou 5e8fa13610 Re-instate `C-c C-x m' binding
Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00322.html>
2018-02-24 23:03:28 +01:00
Nicolas Goaziou 1b259f95aa Merge branch 'maint' 2018-02-24 22:38:27 +01:00
Nicolas Goaziou fffd300efd Update version keyword 2018-02-24 22:36:54 +01:00
Nicolas Goaziou 6ef5d2497c Revert "org-agenda: Fix lprops when recreating sticky agendas"
This reverts commit b306aa2245.
2018-02-24 22:36:29 +01:00
Nicolas Goaziou 6e10c268de Merge branch 'maint' 2018-02-24 22:01:32 +01:00
Nicolas Goaziou 65d6d3b043 org-capture: Silence byte-compiler 2018-02-24 22:01:04 +01:00
Nicolas Goaziou be93bacfa1 Merge branch 'maint' 2018-02-24 21:59:23 +01:00
Nick Dokos 84a3d03dff Replace dash by underscore in temp file names.
* org-babel-groovy-evaluate: replace '-' by '_' in temp file names.

Apparently, the JVM uses file names in the construction of names of internal
objects and dashes are illegal in that context. See

   https://stackoverflow.com/questions/48893994/groovy-in-org-mode-babel

for an example.
2018-02-24 21:39:50 +01:00
Nicolas Goaziou f3c20eb912 Merge branch 'maint' 2018-02-22 14:38:35 +01:00
Nicolas Dudebout db90aadd38 org-agenda: make log and clockreport modes local
* lisp/org-agenda.el (org-agenda-mode): Only set `org-agenda-show-log'
  and `org-agenda-clock-report-mode' to their default values when
  constructing an agenda buffer, and not when redoing it.
* lisp/org-agenda.el (org-agenda-log-mode,
  org-agenda-clockreport-mode): Do not set the global default value
  `org-agenda-start-with-log-mode' (respectively
  `org-agenda-start-with-clockreport-mode') with the current value of
  `org-agenda-log-mode' (respectively `org-agenda-clockreport-mode'),
  which, with sticky agendas is even buffer local.

`org-agenda-show-log' indicates if the the current agenda buffer has
log-mode enabled.  When building a new agenda buffer, it gets its
value from `org-agenda-start-with-log-mode'.  It is is semantically a
buffer local variable: when creating a new agenda buffer you expect it
to be set to the value in `org-agenda-start-with-log-mode'.  However,
2e9c2d71 while fixing an issue with sticky agendas rendered the
variable `org-agenda-log-mode' effectively global: toggling log mode
in a given agenda buffer modifies the global default for all agenda
buffers.  The same reasoning holds for clockreport mode.

This change ensures that a log or clockreport mode change made in one
agenda buffer does not propagate to other agenda buffers, existing or
new.  The change is however preserved on org-agenda-redo in the
initial agenda buffer, whether using sticky agendas or not.

TINYCHANGE
2018-02-22 14:37:45 +01:00
Nicolas Goaziou 79b36b6a8d Merge branch 'maint' 2018-02-21 15:04:37 +01:00
Nicolas Goaziou 6655429b8d org-capture: Refresh clock mode line when finalizing capture
* lisp/org-capture.el (org-capture-finalize): Refresh clock mode line.
* lisp/org-clock.el (org-clock--mode-line-heading): New function.
(org-clock-get-clock-string): Small refactoring.
(org-clock-update-mode-line): Add optional argument. Use new function.
(org-clock-in): Use new function.
2018-02-21 15:02:33 +01:00
Kyle Meyer 47908228e7 Merge branch 'maint' 2018-02-18 16:33:04 -05:00
Glenn Morris ec8590d5e2 Backport commit 69107f347 from Emacs
; Fix doc typos related to indefinite articles
69107f347b3ac7f51cd22333f57393fd735915f2
Glenn Morris
Fri Feb 16 17:33:57 2018 -0500
2018-02-18 16:32:41 -05:00
Glenn Morris 4ddfc6bd69 Backport commit 66a4e651f from Emacs
; Fix doc typos related to indefinite articles
66a4e651f3cf38c320d1a9d5ae6f88dcc641792b
Glenn Morris
Fri Feb 16 15:16:15 2018 -0500
2018-02-18 16:32:41 -05:00
Nicolas Goaziou bbcf2f939c Merge branch 'maint' 2018-02-15 15:04:59 +01:00
Nicolas Goaziou 1562d4e293 ox-publish: Fix last commit
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' instead of
`expand-file-name'.

Do not preserve symbolic links when a unique identifier is needed,
e.g., when storing or retrieving file properties from cache.
2018-02-15 14:51:26 +01:00
Nicolas Goaziou 58da7d4d17 org-table: Fix shrunk columns on hlines
* lisp/org-table.el (org-table--shrunk-field): Fix function when on
  a hline.
* testing/lisp/test-org-table.el (test-org-table/shrunk-columns): Add
  tests.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00231.html>
2018-02-14 18:48:48 +01:00
Nicolas Goaziou af824a9b39 Merge branch 'maint' 2018-02-14 18:00:38 +01:00
Nicolas Goaziou 1a5151c51d org-clock: Fix default clocktable properties priority
* lisp/org-clock.el (org-clock-report): Improve docstring.  Refactor
  code.  Ensure user-defined properties have precedence over automatic
  ones.

Reported-by: Tyler Smith <tyler@plantarum.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00215.html>
2018-02-14 17:57:21 +01:00
Nicolas Goaziou 61c8903c87 Fix failing tests
* lisp/org-compat.el (org-string-collate-lessp): Reinstate function,
  inadvertently removed in last merge with maint branch.
2018-02-13 14:17:00 +01:00
Nicolas Goaziou 2a7a4a65ad Merge branch 'maint' 2018-02-13 14:10:28 +01:00
Nicolas Goaziou 7c21dfc771 ox-publish: Follow symlink directories
* lisp/org-compat.el (directory-files-recursively): Remove
  compatibility function, no longer needed.
* lisp/ox-publish.el (org-publish--expand-file-name):
(org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Preserve symlinks in file name.
(org-publish-get-base-files): Follow symlink directories.
(org-publish-get-project-from-filename): Preserve symlinks in file
name.  Do not use `file-in-directory-p', which ignores symlinks.

Reported-by: Michel Damiens <michel.damiens@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00186.html>
2018-02-13 14:06:56 +01:00
Sebastian Reuße 551d2f1fe7 Fix alphabetic sorting for headlines, tags
* org.el (org-sort-entries): Use collated sorting.
(org-tags-sort-function): Use collated sorting.
(org-string-collate-greaterp): Add helper-function to use as defcustom
option, since there is no ‘string-collate-greaterp’ in Emacs.

* org-compat.el (org-string-collate-lessp): Add proxy to fall-back on
string-lessp when string-collate-lessp is missing (Emacs ≤ 24).

* test-org.el (test-org/string-collate-lessp): Add test.
(test-org/sort-entries): Add regression test for non-ASCII inputs.

‘org-sort-entries’ and ‘org-tags-sort-function’ advertise alphabetic
sorting, but actually sort based only on character code.  This
produces non-alphabetic orderings of strings in non-ASCII locales.

E. g., German Umlauts “Ä Ü Ö” are alphabetically sorted as if they
were “A U O”, whereas sorting based on character-code will place them
after “Z”, which is unexpected.
2018-02-12 14:57:54 +01:00
Kaushal Modi b505a5b6ad Merge branch 'maint' 2018-02-11 15:29:57 -05:00
Kaushal Modi fe7619cd18 Do not auto-fill when point is in Org property drawer
* lisp/org.el (org-return): Set auto-fill-function to nil when point
  is in an Org property drawer.
* testing/lisp/test-org.el (test-org/return): Add test.

<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00102.html>
2018-02-11 15:19:49 -05:00
Nicolas Goaziou da78ccc690 org-tempo: Do not activate Org Tempo in export output buffers and agenda
* lisp/org-tempo.el (b): Do not activate Org Tempo in export output
  buffers and agenda.
2018-02-11 12:06:42 +01:00
Nicolas Goaziou 6791fd29d3 org-tempo: Fix obnoxious `ding' when expanding templates
* lisp/org-tempo.el (org-tempo-complete-tag): New function.

Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00080.html>
2018-02-11 12:03:15 +01:00
Nicolas Goaziou 6cb6ddc671 org-macs.el: Tiny re-ordering 2018-02-11 11:45:07 +01:00
Nicolas Goaziou f487fccbec org-macs: Use `define-key' instead of `org-defkey'
* lisp/org-macs.el (org-completing-read): Use `define-key' instead of
  `org-defkey'.

For bootstrapping reasons, "org-macs.el" isn't expected to require
functions from "org.el". Besides, minibuffer isn't supposed to depend
of `org-disputed-keys' either.
2018-02-11 11:40:21 +01:00
Nicolas Goaziou 013941de86 `org-save-outline-visibility' preserve outline, blocks and drawers
* lisp/org-macs.el (org-save-outline-visibility): Also preserve blocks
  and drawers visibility.  Re-implement without helper functions.
  (org-outline-overlay-data):
  (org-set-outline-overlay-data): Remove functions.
2018-02-11 11:37:50 +01:00
Nicolas Goaziou 2956408f75 Move `org-flag-region' to "org-macs.el"
* lisp/org.el (org-flag-region): Move function...
* lisp/org-macs.el (org-flag-region): ... here.
2018-02-11 11:27:53 +01:00
Nicolas Goaziou b73f7c013d ox-ascii: Use angle brackets for external links
* lisp/ox-ascii.el (org-ascii--describe-links):
(org-ascii-link): Use angle brackets for external links.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00105.html>
2018-02-10 14:16:37 +01:00
Nicolas Goaziou da26490208 org-colview: Fix typo in docstring
* lisp/org-colview.el (org-columns-summary-types): Fix typo.
2018-02-10 14:03:59 +01:00
Matt Lundin c72304b95e Fix S-<return> and M-S-<return> keybindings for GUI
This prevents these key combinations from being translated to M-RET in
window systems. These bindings already have extra keys defined for
TTY.
2018-02-10 13:53:11 +01:00
Nicolas Goaziou 3558e6e835 Merge branch 'maint' 2018-02-05 15:37:15 +01:00
Tim Landscheidt 61a885a399 Make manual and URL links in docstrings clickable 2018-02-05 15:27:12 +01:00
Marco Wahl 33cbd80850 org-agenda: Remove superfluous messages at bulk marking 2018-02-05 10:41:49 +01:00
Nicolas Goaziou cdacaa5e87 Merge branch 'maint' 2018-02-04 23:33:41 +01:00
Jose Robins e6f891e7aa org-clock.el: Add an autoload entry for the function org-clock-sum-today
* lisp/org-clock.el: When the org-mode is called for the very first time
any functionality that requires the org-clock-sum-today used to fail.
(e.g. a column that calculates CLOCKSUM_T)

TINYCHANGE
2018-02-04 23:32:59 +01:00
Nicolas Goaziou f500d7c7f6 org-element: Fix example and src block interpreter.
* lisp/org-element.el (org-element-example-block-interpreter):
(org-element-src-block-interpreter): Correctly handle indentation.
* testing/lisp/test-org-element.el (test-org-element/example-block-interpreter):
  Add tests.

Reported-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00006.html>
2018-02-04 10:04:17 +01:00
Nicolas Goaziou 878f2ae68b org-tempo: Small refactoring
* lisp/org-tempo.el (org-tempo-add-templates): Small refactoring.
2018-02-04 08:56:15 +01:00
Nicolas Goaziou a2471b1bb6 Silence byte-compiler 2018-02-04 00:51:00 +01:00
Nicolas Goaziou 85418667a6 Merge branch 'maint' 2018-02-04 00:31:47 +01:00
Nicolas Goaziou 248bc9631b org-element: Revert regexp change for inline source blocks and babel calls
* lisp/org-element.el (org-element-inline-babel-call-parser):
(org-element-inline-src-block-parser): Revert commit
7efa0f2879.

* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code):
* testing/lisp/test-org-element.el (test-org-element/inline-src-block-parser):
Update tests.

Reported-by: Greg Minshall <minshall@acm.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00002.html>
2018-02-04 00:30:00 +01:00
Nicolas Goaziou 222a65bdee org-tempo: Silence byte-compiler 2018-02-04 00:24:01 +01:00
Nicolas Goaziou 892ae3c2e1 Merge branch 'maint' 2018-02-04 00:13:36 +01:00
Nicolas Goaziou 19dcbab6f0 ox: Fix select tags and exclude tags and tags hierarchy
* lisp/ox.el (org-export--selected-trees): Expand select tags groups.
(org-export--prune-tree): Expand exclude tags groups.
(org-export--skip-p): Change signature.

* testing/lisp/test-ox.el (test-org-export/handle-options): Add tests.

Reported-by: Pierre-Luc Gauthier <p.luc.gauthier@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00039.html>
2018-02-04 00:12:45 +01:00
Nicolas Goaziou d89e35ee50 Merge branch 'maint' 2018-02-03 15:24:50 +01:00
Nicolas Goaziou 52c059a10d org-feed: Do not stop feed update when a feed is unavailable
* lisp/org-feed.el (org-feed-update-all): Do not stop feed update when
  a feed is unavailable.

Reported-by: Adrian Tritschler <ajft@ajft.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00043.html>
2018-02-03 15:23:47 +01:00
Nicolas Goaziou 005ff5f5c2 Merge branch 'maint' 2018-02-03 14:54:11 +01:00
Nicolas Goaziou d0c4d9ba23 ox-latex: Allow negative tocdepth
* lisp/ox-latex.el (org-latex-template): Allow negative tocdepth.

Reported-by: Akater <nuclearspace@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-01/msg00528.html>
2018-02-03 14:52:20 +01:00
Nicolas Goaziou 567fc311ac Merge branch 'maint' 2018-02-03 14:42:49 +01:00
Nicolas Goaziou 98422471c9 org-agenda: Fix docstring
* lisp/org-agenda.el (org-agenda-prefix-format): Fix count of items in
  alist.

Reported-by: Nicolas Dudebout <nicolas.dudebout@gmail.com>
2018-02-03 14:41:34 +01:00
Nicolas Goaziou 4b2006db3d Merge branch 'maint' 2018-02-01 22:43:19 +01:00
Nicolas Goaziou e570e964a3 org-compat: Remove `org-decode-time'
* lisp/org-compat.el (org-decode-time): Remove compatibility function,
  no longer used.
2018-02-01 22:42:35 +01:00
Nicolas Goaziou 0790855c93 org-clock: Fix remnant UTC time in clock computation
* lisp/org-clock.el (org-clock-get-sum-start): Remove wrong UTC
  reference.

Reported-by: Jose Robins <jose.robins@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00018.html>
2018-02-01 22:40:39 +01:00