emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Making a variable persistent when refreshing the agenda


From: Luke
Subject: [O] Making a variable persistent when refreshing the agenda
Date: Fri, 13 Apr 2018 22:05:48 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

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

[Prev in Thread] Current Thread [Next in Thread]