emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Miguel Fernando Cabrera <mfcabrera@gmail.com>
To: emacs-orgmode@gnu.org
Subject: (Possible Feature Request) Hiding Tags in Agenda View/Implementing Contexts in Org
Date: Wed, 7 Oct 2009 00:16:44 -0500	[thread overview]
Message-ID: <330fb75e0910062216t7244cc75k91ea51d1cc45e279@mail.gmail.com> (raw)

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

             reply	other threads:[~2009-10-07  5:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07  5:16 Miguel Fernando Cabrera [this message]
2009-10-07 11:29 ` (Possible Feature Request) Hiding Tags in Agenda View/Implementing Contexts in Org Matt Lundin
2009-10-08 16:07 ` Martin Pohlack
2009-10-08 18:56   ` Darlan Cavalcante Moreira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=330fb75e0910062216t7244cc75k91ea51d1cc45e279@mail.gmail.com \
    --to=mfcabrera@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).