From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How to display a diary entry in agenda week view only "today" Date: Mon, 11 Apr 2011 11:24:52 -0400 Message-ID: <30295.1302535492@alphaville.dokosmarshall.org> References: <20110411013620.3a20f839@bhishma.homelinux.net> <4DA2ECBC.6040002@diplan.de> <20110411073332.3414cff9@bhishma.homelinux.net> <29483.1302533728@alphaville.dokosmarshall.org> <87ipuk25kz.fsf@norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=53667 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q9IzF-0002ok-Cv for emacs-orgmode@gnu.org; Mon, 11 Apr 2011 11:25:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9IzC-0006kB-RP for emacs-orgmode@gnu.org; Mon, 11 Apr 2011 11:25:08 -0400 Received: from vms173003pub.verizon.net ([206.46.173.3]:49500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9IzC-0006jh-Mk for emacs-orgmode@gnu.org; Mon, 11 Apr 2011 11:25:06 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LJH001GIUTGPD30@vms173003.mailsrvcs.net> for emacs-orgmode@gnu.org; Mon, 11 Apr 2011 10:24:53 -0500 (CDT) In-reply-to: Message from Bernt Hansen of "Mon, 11 Apr 2011 11:03:24 EDT." <87ipuk25kz.fsf@norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org, Rainer Stengele , nicholas.dokos@hp.com Bernt Hansen wrote: > Nick Dokos writes: > > > Suvayu Ali wrote: > > > >> On Mon, 11 Apr 2011 14:55:24 +0200 > >> Niels Giesen wrote: > >> > >> > On Mon, Apr 11, 2011 at 1:57 PM, Rainer Stengele > >> > wrote: > >> > > Am 11.04.2011 10:36, schrieb Suvayu Ali: > >> > >> On Mon, 11 Apr 2011 08:52:52 +0200 > >> > >> > >> > >> %%(if (calendar-date-equal date (calendar-current-date)) > >> > >> (diary-sunrise-sunset)) > >> > >> > >> > > Perfect, thanks. > >> > > > >> > > I can find the other functions in calendar.el, > >> > > but where is "date" from? > >> > > > >> > > >> > date is a dynamically bound variable at the time of evaluation. > >> > > >> > >> I have a question I have been meaning to ask for a long time. How does > >> one test sexps with variables like these? I have tried the scratch > >> buffer but it gives errors like "(void-variable date)". I found the only > >> way I could test is to put it on one of the agenda files. > >> > >> Any suggestions? > >> > > > > Bind date explicitly in the scratch buffer and then evaluate: > > > > (setq date '(4 11 2011)) > > Wouldn't a > (let ((date '(4 11 2011))) > ) > > be better so date isn't permanently bound? > Sure - I tend to do these things in an isolated emacs, so I don't particularly care - I kill it and restart it, since it goes off the rails quite often - but if you use your main emacs, that is definitely a good idea. OTOH, using your main emacs for experiments is probably *not* a good idea anyway :-) Nick