Browse Source

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.
Bastien 1 year ago
parent
commit
2742211ec6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org-agenda.el

+ 2 - 2
lisp/org-agenda.el

@@ -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)