emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* (Possible Feature Request) Hiding Tags in Agenda View/Implementing Contexts in Org
@ 2009-10-07  5:16 Miguel Fernando Cabrera
  2009-10-07 11:29 ` Matt Lundin
  2009-10-08 16:07 ` Martin Pohlack
  0 siblings, 2 replies; 4+ messages in thread
From: Miguel Fernando Cabrera @ 2009-10-07  5:16 UTC (permalink / raw)
  To: emacs-orgmode

Hello all,

We all know of FILETAGS. Those are tags added to all entries in a
file.  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).  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.  And below the agenda view for "gtd.org" I put
tags-todo view  looking for headlines tagged "@work":

     ("w" "Things to do at Work"
         (
          (agenda "" ((org-agenda-ndays 1)


                      (org-agenda-sorting-strategy
                       (quote ((agenda time-up priority-down tag-up) )))
                      (org-agenda-files org-files-work)


                      (org-deadline-warning-days 0)

                      ))
          (tags-todo "REFILE")
          (tags-todo "@work") ;; show the stuff from home that can be
done at work as well (etc, calls or  whatever)
          )

         )

org-files-work is a variable set to something like:  (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 "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-views

Thank you!

--
Miguel Fernando Cabrera Granados
http://mfcabrera.com
"A los hombres fuertes les pasa lo que a los barriletes; se elevan cuando es
mayor el viento que se opone a su ascenso." - José Ingenieros

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-08 19:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07  5:16 (Possible Feature Request) Hiding Tags in Agenda View/Implementing Contexts in Org Miguel Fernando Cabrera
2009-10-07 11:29 ` Matt Lundin
2009-10-08 16:07 ` Martin Pohlack
2009-10-08 18:56   ` Darlan Cavalcante Moreira

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).