From mboxrd@z Thu Jan 1 00:00:00 1970 From: SAKURAI Masashi Subject: Re: Calendar-like view of the org-agenda Date: Sun, 17 Jul 2011 00:31:08 +0900 Message-ID: <20110716153108.4CDDA13C4E9@vps1.kiwanami.net> References: <87pqlu5quz.fsf@gnu.org> <87zkky48ol.wl%markert.michael@googlemail.com> <87tyb2qs39.fsf@isil.kanru.info> <8762nigeuk.wl%markert.michael@googlemail.com> <8739iklkgq.fsf@grumps.lan> <878vsbube7.fsf@member.fsf.org> <19988.11619.3400.87930@gazelle.local> <87sjqjsp94.fsf@member.fsf.org> <874o2zzp17.fsf@pinto.chemeng.ucl.ac.uk> <19988.15298.72280.825033@gazelle.local> <20110709131527.1472213C571@vps1.kiwanami.net> <19995.18648.500570.51213@gazelle.local> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi6pp-0000nG-Gq for emacs-orgmode@gnu.org; Sat, 16 Jul 2011 11:31:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qi6pn-00042M-Ag for emacs-orgmode@gnu.org; Sat, 16 Jul 2011 11:31:17 -0400 Received: from vps1.kiwanami.net ([182.48.41.71]:21337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qi6pm-00041a-PJ for emacs-orgmode@gnu.org; Sat, 16 Jul 2011 11:31:15 -0400 In-Reply-To: <19995.18648.500570.51213@gazelle.local> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: herme@fi.upm.es Cc: tassilo@member.fsf.org, emacs-orgmode@gnu.org 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) m.sakurai@kiwanami.net