Hi Manuel,
Thank you for your example.
I have to study a lot of customize variables of org-agenda.
The org-mode is very deep world!
At Mon, 11 Jul 2011 21:02:48 +0200,
Manuel Hermenegildo wrote:
> :
> Currently, both tasks will appear in the calfw view.
>
> In the normal org agenda views the necessary filtering is done via the
> "org-agenda-custom-commands" variable, defining a "custom agenda
> command" with a filter (this is the recommended way of creating
> different agendas and todo lists in org). For example, to get an
> agenda view with only my tasks, which I identfy with the tag "MH" I
> use (this is my normal agenda view):
>
> (setq org-agenda-custom-commands
> (list
> (list
> "a" "Agenda with (only) my tasks (those that have my tag and a date)"
> '((agenda
> ""
> ((org-agenda-skip-function '(my-skip-by-tags "MH"))
> (org-agenda-overriding-header
> "Agenda -- with (only) my tasks (those that have my tag and a
> date)")
> ))))))
> :
> The particular filter that I use (my-skip-by-tags) is a function that
> checks for inherited tags. I am not sure this can be done with
> org-agenda-get-day-entries. This is why I was suggesting perhaps
> using a modified version of org-agenda (a back-end) that would feed
> the data computed to calfw (the same could be used for all the other
> agenda exports). Or perhaps org-agenda-get-day-entries can be made to
> call a filter function like the one above?
I think org-agenda-get-day-entries uses the customize function
org-agenda-skip-function via org-agenda-get-xxx functions.
So, I can display schedules filtered by the my-skip-by-tags,
like following ad-hoc code.
==================================================
(defun cfw:org-collect-schedules-period (begin end)
"[internal] Return org schedule items between BEGIN and END."
(let ((org-agenda-prefix-format "")
(span 'day)
(org-agenda-skip-function '(my-skip-by-tags "MH"))) ;; Added here!!
(org-compile-prefix-format nil)
(loop for date in (cfw:enumerate-days begin end) append
(loop for file in (org-agenda-files nil 'ifmode) append
(progn
(org-check-agenda-file file)
(apply 'org-agenda-get-day-entries
file date
cfw:org-agenda-schedule-args))))))
==================================================
I will think about the customization of such filters.
If someone has a good idea or patch, please let me know.
Thank you,
--
SAKURAI, Masashi (family, given)
[email protected]