I like to be able to view a list of tasks that need to be done today, along with warnings of any upcoming deadlines within the next few days. The number of "deadline warning days" that I require varies from time to time, so I have one of my agenda commands set up like so:

("d" "Daily Action List"
 ((agenda
   ""
   ((org-agenda-overriding-header "== TO BE DONE TODAY ==")
        (org-agenda-span
         (quote day))
        (org-agenda-skip-deadline-prewarning-if-scheduled t)
        (org-agenda-sorting-strategy
         (quote
          (habit-up time-up todo-state-up deadline-up timestamp-up 
priority-down)))
        (org-deadline-warning-days
         (string-to-number
          (read-string "Number of warning days [0]: " nil nil "0")))))))

This allows me to interactively specify the number of "deadline warning days" when creating the agenda. Sometimes I need to refresh the agenda (org-agenda-redo), but this means that I need to re-enter the "Number of warning days" each time the agenda refreshes.

What I would like to do is somehow store the value within the agenda, and use the stored value when refreshing the agenda (rather than re-entering it each time org-agenda-redo is called).

I know that agenda filters persist when the agenda is refreshed, so I'm looking to do something similar with my custom value. I've experimented with trying to set the variable as a buffer local value, but without success.

Is this possible? If so, any ideas how?

--
Luke


Reply via email to