org-agenda.el: Fix bug when keyboard-quitting the match prompt

* lisp/org-agenda.el (org-tags-view): Don't leave an empty
*Org agenda* buffer when keyboard-quitting the match prompt.

Thanks to Xu Chunyang for reporting this.
This commit is contained in:
Bastien 2018-04-26 18:44:58 +02:00
parent 8944b578b8
commit 2742211ec6
1 changed files with 2 additions and 2 deletions

View File

@ -4751,11 +4751,11 @@ The prefix arg TODO-ONLY limits the search to TODO entries."
(format "*Org Agenda(%s:%s)*"
(or org-keys (or (and todo-only "M") "m")) match)
(format "*Org Agenda(%s)*" (or (and todo-only "M") "m")))))
(setq matcher (org-make-tags-matcher match))
;; Prepare agendas (and `org-tag-alist-for-agenda') before
;; expanding tags within `org-make-tags-matcher'
(org-agenda-prepare (concat "TAGS " match))
(setq matcher (org-make-tags-matcher match)
match (car matcher)
(setq match (car matcher)
matcher (cdr matcher))
(org-compile-prefix-format 'tags)
(org-set-sorting-strategy 'tags)