From b0a436cb8e316b266c4d5f3691cc94625a3238b5 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 26 Nov 2015 14:20:42 +0100 Subject: [PATCH] org-agenda: Write only currently visible items * lisp/org-agenda.el (org-agenda-write): Fix arguments passed to `org-agenda-remove-marked-text' to properly remove entries with `invisible' property set to `org-filtered'. * lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Always include TODO entries in the output. The motivation is that a user not filtering out TODO or DONE items in the current agenda probably wants them in the output. Reported-by: "sgeorgii ." --- lisp/org-agenda.el | 2 +- lisp/ox-icalendar.el | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index e12a14226..41937b35c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3349,7 +3349,7 @@ the agenda to write." (rename-buffer org-agenda-write-buffer-name t) (set-buffer-modified-p nil) (insert bs) - (org-agenda-remove-marked-text 'org-filtered) + (org-agenda-remove-marked-text 'invisible 'org-filtered) (run-hooks 'org-agenda-before-write-hook) (cond ((org-bound-and-true-p org-mobile-creating-agendas) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index b31e882cf..29ba409f7 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -901,7 +901,9 @@ This function assumes major mode for current buffer is (buffer-substring (point) (progn (outline-next-heading) (point))))))))) (forward-line))))) - 'icalendar t '(:ascii-charset utf-8 :ascii-links-to-notes nil)))) + 'icalendar t + '(:ascii-charset utf-8 :ascii-links-to-notes nil + :icalendar-include-todo all)))) (with-temp-file file (insert (org-icalendar--vcalendar -- 2.11.4.GIT