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
    How about setting the variables org-agenda-span and org-agenda-start-day?
    – lawlist
    Dec 28, 2016 at 1:38

1 Answer 1


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:

  1. A shortcut key using after C-c a to access the agenda.
  2. A description.
  3. The type of agenda (agenda in this case). agenda, todo and tags are the most useful types.
  4. For tags and todo types this is the tags or todo items to search for. For the agenda type it should be an empty string.
  5. A list of pairs (variable value) giving various settings to customize the agenda.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.