From 5e2490bdf29a1eeff91b631425c38309cf368690 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 20 May 2020 22:47:42 -0400 Subject: [PATCH] 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 <87pnb4i217.fsf@posteo.net> --- lisp/org-agenda.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 1585607fc..5372c7ad1 100644 --- a/lisp/org-agenda.el +++ b/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))