mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-26 07:33:39 +00:00
Empty matcher means prompt in agenda custom commands
When an agenda custom command has an empty string as MATCH element, so far this would lead to a meaningless search using an empty matcher. Now and empty (or white) string will be interpreted just like a nil matcher, i.e. the user will be prompted for the match.
This commit is contained in:
parent
498e71da49
commit
2fcbd1d806
@ -2,6 +2,8 @@
|
||||
|
||||
* org-agenda.el (org-agenda-inactive-leader): New option.
|
||||
(org-agenda-get-timestamps): Use `org-agenda-inactive-leader'.
|
||||
(org-tags-view): Prompt for matcher if MATCH is an empty string.
|
||||
(org-todo-list): Prompt for matcher if ARG is an empty string.
|
||||
|
||||
2009-12-15 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
|
@ -3418,6 +3418,7 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
|
||||
(org-compile-prefix-format 'todo)
|
||||
(org-set-sorting-strategy 'todo)
|
||||
(org-prepare-agenda "TODO")
|
||||
(if (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil))
|
||||
(let* ((today (time-to-days (current-time)))
|
||||
(date (calendar-gregorian-from-absolute today))
|
||||
(kwds org-todo-keywords-for-agenda)
|
||||
@ -3486,11 +3487,12 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
|
||||
(org-compile-prefix-format 'tags)
|
||||
(org-set-sorting-strategy 'tags)
|
||||
(let* ((org-tags-match-list-sublevels
|
||||
;?????? (if todo-only t org-tags-match-list-sublevels))
|
||||
org-tags-match-list-sublevels)
|
||||
(completion-ignore-case t)
|
||||
rtn rtnall files file pos matcher
|
||||
buffer)
|
||||
(when (and (stringp match) (not (string-match "\\S-" match)))
|
||||
(setq match nil))
|
||||
(setq matcher (org-make-tags-matcher match)
|
||||
match (car matcher) matcher (cdr matcher))
|
||||
(org-prepare-agenda (concat "TAGS " match))
|
||||
|
Loading…
Reference in New Issue
Block a user