Commit Graph

4502 Commits

Author SHA1 Message Date
Nicolas Goaziou f05493504a Replace `org-get-tags-at' with `org-get-tags'
* contrib/lisp/org-drill.el (org-part-of-drill-entry-p):
* lisp/org-agenda.el (org-agenda-finalize):
(org-search-view):
(org-agenda-get-todos):
(org-agenda-get-timestamps):
(org-agenda-get-sexps):
(org-agenda-get-progress):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks):
(org-agenda-change-all-lines):
* lisp/org-bibtex.el (org-bibtex-headline):
* lisp/org-clock.el (org-clock-get-table-data):
* lisp/org-pcomplete.el (org-get-tags):
* lisp/org.el (org-trust-scanner-tags):
(org-get-local-tags-at):
(org-get-local-tags):
(org-set-tags):
(org-map-entries):
(org-entry-properties): Use `org-get-tags' instead of
`org-get-tags-at'.
2018-04-19 11:51:54 +02:00
Nicolas Goaziou fbe56f89f7 Change `org-get-tags' specifications
* lisp/org.el (org-tag-line-re): New variable.
(org-hide-archived-subtrees):
(org-get-buffer-tags): Use new function.
(org--get-local-tags): New function.
(org-get-tags): Change meaning.  Now get all inherited tags.  Change
signature.
* lisp/org-archive.el (org-archive-subtree):
* lisp/org-mobile.el (org-mobile-apply):
(org-mobile-edit):
* lisp/org-mouse.el (org-mouse-tag-menu):
* lisp/org-pcomplete.el (pcomplete/org-mode/tag): Apply change

* testing/lisp/test-org.el (test-org/get-tags): New test.
(test-org/tags-at): Remove test.
2018-04-19 11:51:54 +02:00
Nicolas Goaziou 6457a9e4e6 Merge branch 'maint' 2018-04-18 22:18:47 +02:00
Nicolas Goaziou 8814988d1c Fix error message
* lisp/org.el (org-kill-line): Fix error message.
2018-04-18 22:18:23 +02:00
Nicolas Goaziou ee5fa18430 Remove `org<>' function
* lisp/org.el (org<>): Remove function.
2018-04-17 16:08:23 +02:00
Nicolas Goaziou ff3f3876a8 Move time related functions from "org.el" to "org-macs.el"
* lisp/org.el (org-2ft):
(org-time=):
(org-time<):
(org-time<=):
(org-time>):
(org-time>=):
(org-time<>):
(org-matcher-time): Move from here to...
* lisp/org-macs.el: ... here
2018-04-17 16:06:09 +02:00
Nicolas Goaziou 1171d5ef0c Merge branch 'maint' 2018-04-16 13:45:52 +02:00
Nicolas Goaziou 8b6a617ff5 Remove inlinetask END part from Agenda view
* lisp/org-inlinetask.el (org-inlinetask-end-p): New function.
(org-inlinetask-at-task-p):
(org-inlinetask-in-task-p):
(org-inlinetask-goto-beginning):
(org-inlinetask-goto-end):
* lisp/org.el (org-scan-tags): Use new function.

Reported-by: Alain.Cochard@unistra.fr
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00235.html>
2018-04-16 13:44:52 +02:00
Nicolas Goaziou 434d232ca7 Merge branch 'maint' 2018-04-12 21:46:25 +02:00
Nicolas Goaziou 1976c02af0 Fix docstring
* lisp/org.el (org-file-apps): Fix regexp in docstring.
2018-04-12 21:46:05 +02:00
Nicolas Goaziou 384d763447 Move some functions into "org-macs.el"
* lisp/org.el (org-file-newer-than-p):
(org-compile-file): Move...
* lisp/org-macs.el: ... here.
2018-04-11 22:03:18 +02:00
Nicolas Goaziou cbbca2991b Merge branch 'maint' 2018-04-11 21:43:37 +02:00
Nicolas Goaziou b7a7dd1492 Update version keyword 2018-04-11 21:42:46 +02:00
Nicolas Goaziou fb58727f32 Merge branch 'maint' 2018-04-08 18:39:36 +02:00
Nicolas Goaziou f05c2eae33 Fix RET on multi-line links
* lisp/org.el (org-return): Follow multi-line links.
* testing/lisp/test-org.el (test-org/return): Add tests.

Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-04/msg00105.html>
2018-04-08 18:35:40 +02:00
Rasmus 39837b4b31 org: Change org-insert-structure-template to C-c C-,
* lisp/org.el (org-mode-map):
* doc/org-manual.org (With): Change keybinding of
  org-insert-structure-template.

See the thread titled "Poll: new keybinding for
org-insert-structure-template?" in December 2017 for details.
2018-04-08 12:47:12 +02:00
Rasmus d04c20deec org: Change structure insertion
* lisp/org.el (org-insert-structure-template): Change newline
  behavior.
* testing/lisp/test-org.el (test-org/insert-template): New tests.

`org-insert-structure-template' considers indentation and also insert
newlines between the beginning and the end of the block.
2018-04-08 12:47:12 +02:00
Rasmus b56df737b7 org: org-structure-template-alist uses string keys
* lisp/org-tempo.el (org-tempo-keywords-alist):
  (org-tempo-setup):
  (org-tempo-add-templates):
* testing/lisp/test-org-tempo.el (test-org-tempo/add-new-templates):
* lisp/org.el (org-structure-template-alist): Use string keys.
  (org--insert-structure-template-mks):
  (org--insert-structure-template-unique-keys): New functions for block selection.
  (org-insert-structure-template): Use new functions.
* etc/ORG-NEWS:
* doc/org-manual.org: Reflect changes.
2018-04-08 12:47:12 +02:00
Marco Wahl 873caa6ad7 org.el: Fix two docstrings
* lisp/org.el (org-beginning-of-line, org-end-of-line): Fixed
  documentation of org-beginning-of-line; synchronized with
  documentation of org-end-of-line.
2018-04-03 17:03:34 +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
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
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
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 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 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
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 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
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 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
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