emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Luke <mideniko1234-org@yahoo.co.uk>
To: emacs-orgmode@gnu.org
Subject: Making a variable persistent when refreshing the agenda
Date: Fri, 13 Apr 2018 22:05:48 +0800	[thread overview]
Message-ID: <paqdbr$3iu$1@blaine.gmane.org> (raw)

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	other threads:[~2018-04-13 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13 14:05 Luke [this message]
2018-04-26 23:34 ` Making a variable persistent when refreshing the agenda Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='paqdbr$3iu$1@blaine.gmane.org' \
    --to=mideniko1234-org@yahoo.co.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).