Browse Source

agenda: Respect FILETAGS when skipping archive entries

* lisp/org-agenda.el (org-agenda-skip): Consider skipping all entries
in a file if org-archive-tag is set via FILETAGS.

Reported-by: George Sokolsky <sokolgeo@posteo.net>
<87pnb4i217.fsf@posteo.net>
Kyle Meyer 4 years ago
parent
commit
5e2490bdf2
1 changed files with 4 additions and 2 deletions
  1. 4 2
      lisp/org-agenda.el

+ 4 - 2
lisp/org-agenda.el

@@ -4090,8 +4090,10 @@ continue from there."
     (when (or
 	   (save-excursion (goto-char p) (looking-at comment-start-skip))
 	   (and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
-		(get-text-property p :org-archived)
-		(org-end-of-subtree t))
+		(or (and (get-text-property p :org-archived)
+			 (org-end-of-subtree t))
+		    (and (member org-archive-tag org-file-tags)
+			 (goto-char (point-max)))))
 	   (and org-agenda-skip-comment-trees
 		(get-text-property p :org-comment)
 		(org-end-of-subtree t))