* Custom agenda views
@ 2007-10-26 14:20 Dave C. Nelson
2007-10-26 14:36 ` Bernt Hansen
2007-10-28 10:46 ` Bastien
0 siblings, 2 replies; 7+ messages in thread
From: Dave C. Nelson @ 2007-10-26 14:20 UTC (permalink / raw)
To: emacs-orgmode
I'm playing around with org mode and while it works mostly the way I
want, I have something I'm trying to do and so far I've failed. I should
mention that I'm not much of a lisp programmer, so it might be my lack
of knowledge here.
What I want is to have an agenda view like the default agenda view one
gets with c-a a, but "narrowed" so that only a subset of todo items
show. For example, when I'm at work, I want to narrow the agenda view so
that it only shows todo items related to work.
I've read through the manual, the past list postings, etc. and I just
can't seem to come up with an org-agenda-custom-command that does this
(I assume this is the way to accomplilsh this). Is it possible? Would
someone please give me a hint?
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Custom agenda views
2007-10-26 14:20 Custom agenda views Dave C. Nelson
@ 2007-10-26 14:36 ` Bernt Hansen
2007-10-26 15:10 ` Wanrong Lin
2007-10-26 15:20 ` Dave C. Nelson
2007-10-28 10:46 ` Bastien
1 sibling, 2 replies; 7+ messages in thread
From: Bernt Hansen @ 2007-10-26 14:36 UTC (permalink / raw)
To: emacs-orgmode
"Dave C. Nelson" <DCNelson@skokielibrary.info> writes:
>
> I'm playing around with org mode and while it works mostly the way I
> want, I have something I'm trying to do and so far I've failed. I should
> mention that I'm not much of a lisp programmer, so it might be my lack
> of knowledge here.
>
> What I want is to have an agenda view like the default agenda view one
> gets with c-a a, but "narrowed" so that only a subset of todo items
> show. For example, when I'm at work, I want to narrow the agenda view so
> that it only shows todo items related to work.
>
> I've read through the manual, the past list postings, etc. and I just
> can't seem to come up with an org-agenda-custom-command that does this
> (I assume this is the way to accomplilsh this). Is it possible? Would
> someone please give me a hint?
I put my work todo items in a separate org file from other things. Then
when you are in that org file you can limit your agenda view to just
that file with
C-a a 1 a
Hope that helps.
Bernt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: Custom agenda views
2007-10-26 14:36 ` Bernt Hansen
@ 2007-10-26 15:10 ` Wanrong Lin
2007-10-26 15:20 ` Dave C. Nelson
1 sibling, 0 replies; 7+ messages in thread
From: Wanrong Lin @ 2007-10-26 15:10 UTC (permalink / raw)
To: emacs-orgmode
Or, maybe you can put your work related and personal org files in
different directories, and write a small function to switch the
"org-agenda-files" between them (I believe with org-mode 5.13g, the
org-agenda-files is dynamically built if it is set to a directory).
Actually, I think it would be nice if this feature can be included into
org-mode i.e. something like "org-agenda-file-set-switch" or
"org-context-switch". It would be great if we can build agenda view from
either a single agenda file set, or all agenda file sets. For me, I
like to break down both my personal stuff and work stuff into multiple
files, so file restriction does not work that well.
Wanrong
Bernt Hansen wrote:
> "Dave C. Nelson" <DCNelson@skokielibrary.info> writes:
>
>
>>
>> I'm playing around with org mode and while it works mostly the way I
>> want, I have something I'm trying to do and so far I've failed. I should
>> mention that I'm not much of a lisp programmer, so it might be my lack
>> of knowledge here.
>>
>> What I want is to have an agenda view like the default agenda view one
>> gets with c-a a, but "narrowed" so that only a subset of todo items
>> show. For example, when I'm at work, I want to narrow the agenda view so
>> that it only shows todo items related to work.
>>
>> I've read through the manual, the past list postings, etc. and I just
>> can't seem to come up with an org-agenda-custom-command that does this
>> (I assume this is the way to accomplilsh this). Is it possible? Would
>> someone please give me a hint?
>>
>
> I put my work todo items in a separate org file from other things. Then
> when you are in that org file you can limit your agenda view to just
> that file with
>
> C-a a 1 a
>
> Hope that helps.
>
> Bernt
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Re: Custom agenda views
2007-10-26 14:36 ` Bernt Hansen
2007-10-26 15:10 ` Wanrong Lin
@ 2007-10-26 15:20 ` Dave C. Nelson
2007-10-26 15:56 ` Bernt Hansen
1 sibling, 1 reply; 7+ messages in thread
From: Dave C. Nelson @ 2007-10-26 15:20 UTC (permalink / raw)
To: Bernt Hansen, emacs-orgmode
> I put my work todo items in a separate org file from other
> things. Then when you are in that org file you can limit
> your agenda view to just that file with
>
> C-a a 1 a
>
> Hope that helps.
This suggestion is helpful, but I should've stated that I have some
tasks that I want to show both at work and at home. I thought I could do
this by tagging the work only items with :WORK:, the home items with
:HOME: and the work/home items with :HOME:WORK: and then (somehow)
getting the agenda view to only show items tagged WORK or HOME.
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: Custom agenda views
2007-10-26 15:20 ` Dave C. Nelson
@ 2007-10-26 15:56 ` Bernt Hansen
2007-10-28 11:03 ` Bastien
0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2007-10-26 15:56 UTC (permalink / raw)
To: Dave C. Nelson; +Cc: emacs-orgmode
"Dave C. Nelson" <DCNelson@skokielibrary.info> writes:
>> I put my work todo items in a separate org file from other
>> things. Then when you are in that org file you can limit
>> your agenda view to just that file with
>>
>> C-a a 1 a
>>
>> Hope that helps.
>
> This suggestion is helpful, but I should've stated that I have some
> tasks that I want to show both at work and at home. I thought I could do
> this by tagging the work only items with :WORK:, the home items with
> :HOME: and the work/home items with :HOME:WORK: and then (somehow)
> getting the agenda view to only show items tagged WORK or HOME.
I thought you meant you wanted the calendar agenda view limited
(day/week/month etc) which I don't know how to do other than by org file.
If your tasks are tagged you can get a tag match to show what you want -
but it won't be the day/week agenda.
C-a m
and enter WORK/NEXT
should show all WORK tagged todo items in a NEXT state.
I use that alot. I have multiple 'work' org files (by client) and when
I'm at work
C-a a w
searches @WORK/NEXT for me and I can pick from the available NEXT times
for what to work on.
I normally schedule high priority projects onto my daily agenda and work
on those first. Then when there is nothing specific that I need to work
on I can view the NEXT todo lists and pick something.
Regards,
Bernt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: Custom agenda views
2007-10-26 15:56 ` Bernt Hansen
@ 2007-10-28 11:03 ` Bastien
0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2007-10-28 11:03 UTC (permalink / raw)
To: emacs-orgmode
Bernt Hansen <bernt@norang.ca> writes:
>> This suggestion is helpful, but I should've stated that I have some
>> tasks that I want to show both at work and at home. I thought I could do
>> this by tagging the work only items with :WORK:, the home items with
>> :HOME: and the work/home items with :HOME:WORK: and then (somehow)
>> getting the agenda view to only show items tagged WORK or HOME.
>
> I thought you meant you wanted the calendar agenda view limited
> (day/week/month etc) which I don't know how to do other than by org
> file.
See my suggestion in my post about using `org-agenda-skip-function'.
Having a tutorial for this would be great, since Org's manual might not
be fully understandable for people that are not fluent in Emacs Lisp.
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Custom agenda views
2007-10-26 14:20 Custom agenda views Dave C. Nelson
2007-10-26 14:36 ` Bernt Hansen
@ 2007-10-28 10:46 ` Bastien
1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2007-10-28 10:46 UTC (permalink / raw)
To: emacs-orgmode
"Dave C. Nelson" <DCNelson@skokielibrary.info> writes:
> What I want is to have an agenda view like the default agenda view one
> gets with c-a a, but "narrowed" so that only a subset of todo items
> show. For example, when I'm at work, I want to narrow the agenda view
> so that it only shows todo items related to work.
What about using agenda blocks[1]?
(org-add-agenda-custom-command
'("v" "Agenda and Work-related tasks"
((tags-todo "WORK")
(agenda))))
If you just want to use the agenda block and select entries in it, you
can do this with `org-agenda-skip-function'[2]:
(org-add-agenda-custom-command
'("v" agenda "PROJECT"
((org-agenda-skip-function 'my-skip-unless-work)
(org-agenda-overriding-header "Projects related to work: "))))
(defun my-skip-unless-work ()
"Skip trees that are not tagged as :WORK:"
(let ((subtree-end (save-excursion (org-end-of-subtree t))))
(if (re-search-forward ":WORK:" subtree-end t)
nil ; tag found, do not skip
subtree-end))) ; tag not found, continue after end of subtree
HTH,
Notes:
[1] See (info "(org)Block agenda")
[2] See (info "(org)Special agenda views")
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-28 10:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 14:20 Custom agenda views Dave C. Nelson
2007-10-26 14:36 ` Bernt Hansen
2007-10-26 15:10 ` Wanrong Lin
2007-10-26 15:20 ` Dave C. Nelson
2007-10-26 15:56 ` Bernt Hansen
2007-10-28 11:03 ` Bastien
2007-10-28 10:46 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.