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 ." <sgeorgii@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102998>
This commit is contained in:
Nicolas Goaziou 2015-11-26 14:20:42 +01:00
parent 16c7594a0f
commit b0a436cb8e
2 changed files with 4 additions and 2 deletions

View File

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

View File

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