I'm working on an agenda file to organize my teaching each semester. I'd like to be able to view my agenda by semester. For example, my fall semester in 2017 will begin during week #2 and will end on week #18. Thus, I'd like to view my agenda starting from Monday 9 January 2017
to Sunday 7 May 2017
. Is this possible?
1 Answer
You can set up custom agendas of various types by using custom commands. Basically you add a description of the agenda you want to view and settings for various options to the list org-agenda-custom-commands
.
In this case, you want to set org-agenda-start-day
to "2017-1-9
" and org-agenda-span
to 119
(that's 17 weeks * 7 days). The code for your .emacs
file is:
(add-to-list 'org-agenda-custom-commands
'("S" "Semester Winter 2017"
agenda ""
((org-agenda-start-day "2017-01-09")
(org-agenda-span 119)
(org-agenda-overriding-header "Semester Winter 2017")
))
)
Because a semester is a lot of days, this agenda will take some time to generate.
The entries in the list giving the custom command are:
- A shortcut key using after
C-c a
to access the agenda. - A description.
- The type of agenda (
agenda
in this case).agenda
,todo
andtags
are the most useful types. - For
tags
andtodo
types this is the tags or todo items to search for. For theagenda
type it should be an empty string. - A list of pairs
(variable value)
giving various settings to customize the agenda.
org-agenda-span
andorg-agenda-start-day
?