From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miguel Fernando Cabrera Subject: (Possible Feature Request) Hiding Tags in Agenda View/Implementing Contexts in Org Date: Wed, 7 Oct 2009 00:16:44 -0500 Message-ID: <330fb75e0910062216t7244cc75k91ea51d1cc45e279@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvOtT-0003FH-PQ for emacs-orgmode@gnu.org; Wed, 07 Oct 2009 01:16:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvOtO-00039u-A8 for emacs-orgmode@gnu.org; Wed, 07 Oct 2009 01:16:55 -0400 Received: from [199.232.76.173] (port=39907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvOtO-00039j-0B for emacs-orgmode@gnu.org; Wed, 07 Oct 2009 01:16:50 -0400 Received: from mail-yw0-f172.google.com ([209.85.211.172]:38475) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvOtN-0002eo-Mm for emacs-orgmode@gnu.org; Wed, 07 Oct 2009 01:16:49 -0400 Received: by ywh2 with SMTP id 2so4767921ywh.27 for ; Tue, 06 Oct 2009 22:16:44 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello all, We all know of FILETAGS. Those are tags added to all entries in a file.=A0 That is cool. The only thing I don't like is that all those tags are shown also in the Agenda, which if it itself restricted to the file can be redundant. Is there a way to avoid a specific tag to show up in the Agenda? Let me tell you what I would do if tha functionality exists, so maybe you can give me a good alternative. I have several files, gtd.org (I put the name after a tutorial, but I don't implement pure gtd) and home.org. One if for work related tasks and the other for personal projects and task that are usually performed at home. I have "work" agenda view that shows my schedule of the tasks I have in gtd.org (and in other work related org files).=A0 I also have a "home" agenda view, that is restricted to home.org. Now, sometimes I have to do something related to a personal project that can be only accomplished during work-hours. For example schedule a appointment with the dentist. So far what I have done is that I put "@work" tag on it.=A0 And below the agenda view for "gtd.org" I put tags-todo view=A0 looking for headlines tagged "@work": =A0=A0=A0=A0 ("w" "Things to do at Work" =A0=A0=A0=A0=A0=A0=A0=A0 ( =A0=A0=A0=A0=A0=A0=A0=A0=A0 (agenda "" ((org-agenda-ndays 1) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-agenda= -sorting-strategy =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (quote (= (agenda time-up priority-down tag-up) ))) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-agenda= -files org-files-work) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (org-deadli= ne-warning-days 0) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 )) =A0=A0=A0=A0=A0=A0=A0=A0=A0 (tags-todo "REFILE") =A0=A0=A0=A0=A0=A0=A0=A0=A0 (tags-todo "@work") ;; show the stuff from home= that can be done at work as well (etc, calls or=A0 whatever) =A0=A0=A0=A0=A0=A0=A0=A0=A0 ) =A0=A0=A0=A0=A0=A0=A0=A0 ) org-files-work is a variable set to something like:=A0 (setq org-files-work '("gtd.org" "scm.org")) This work fine, however, I would like to see those task on "home.org" that have been tagged with "@work" in the agenda day-view of "gtd.org". I think that this can't be done right now. So I thought, what if I use a FILETAG for those files that belong to the "@work" context. And in "home.org" only mark those personal tasks donde at work with the "@work" tag. Then use=A0"org-agenda-skip-function" to skip those tags that don't have "@work" tag attached in any file (I haven't written that function yet): for example: ("w" "Things to do at Work" ( (agenda "" ((org-agenda-ndays 1) (org-agenda-skip-function 'my-skip-unless-at-work) (org-agenda-sorting-strategy (quote ((agenda time-up priority-down tag-up) ))) (org-agenda-files ("gtd.org", "home.org")) (org-deadline-warning-days 0) )) (tags-todo "REFILE") ) ) Too hacky? Now, to really do what I want would be cool to have a way of saying to org that don't show the "@work" tag. I think at the end this is a question of how implement context in a good way in Org. Any advice or strategy will be really helpful. BTW, is there some lisp function like "org-entry-tags" to get the tags of an entry, not reliying in "re-search-forward" as in [1] [1] http://orgmode.org/manual/Special-agenda-views.html#Special-agenda-view= s Thank you! -- Miguel Fernando Cabrera Granados http://mfcabrera.com "A los hombres fuertes les pasa lo que a los barriletes; se elevan cuando e= s mayor el viento que se opone a su ascenso." - Jos=E9 Ingenieros