From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Relative dates with sexep Date: Sat, 18 Sep 2010 20:03:15 +0100 Message-ID: <87pqwaho24.wl%ucecesf@ucl.ac.uk> References: <1284654438.7792.63.camel@localhost> <87tylo94tk.wl%ucecesf@ucl.ac.uk> <1284734515.7792.88.camel@localhost> Reply-To: Eric S Fraga Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Sat_Sep_18_20:03:15_2010-1" Return-path: Received: from [140.186.70.92] (port=41662 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ox2h7-0003Dt-11 for emacs-orgmode@gnu.org; Sat, 18 Sep 2010 15:03:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ox2h5-00069Z-OJ for emacs-orgmode@gnu.org; Sat, 18 Sep 2010 15:03:28 -0400 Received: from vscane-a.ucl.ac.uk ([144.82.108.41]:41876) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ox2h5-00066n-KE for emacs-orgmode@gnu.org; Sat, 18 Sep 2010 15:03:27 -0400 In-Reply-To: <1284734515.7792.88.camel@localhost> 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: julien cubizolles Cc: org-mode --Multipart_Sat_Sep_18_20:03:15_2010-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 17 Sep 2010 16:41:55 +0200, julien cubizolles wrote: >=20 > Le vendredi 17 septembre 2010 =C3=A0 09:01 +0100, Eric S Fraga a =C3=A9cr= it : > > On Thu, 16 Sep 2010 18:27:18 +0200, julien cubizolles wrote: > > >=20 > > > I'm trying to specify a date relative to another date in an org file. > > > I've tried to adapt one of the examples from worg, with : > > >=20 > > > <%%(=3D 7 (- (calendar-absolute-from-gregorian date) > > > (calendar-absolute-from-gregorian (02 02 2010))))> > > >=20 > > > to get the date one week after the 2nd of february 2010. Bad sexp... > >=20 > > Quote the date: ... '(02 02 2010) > > as it is trying to evaluate the function "02" otherwise. >=20 > I'm trying to make it reusable by defining a function in my .emacs : >=20 > (defun diary-relative (n day) > "Diary entry that will always appear N days from day" > (=3D > (calendar-absolute-from-gregorian date) > (+ n (calendar-absolute-from-gregorian day)))) >=20 > I try to use it with a sexp like : > <%%(diary-relative (7 '(09 15 2010)))> >=20 > which doesn't work. I really need to seriously read about lisp > programming... Possibly! ;-) Try <%%(diary-relative 7 '(09 15 2010))> as the arguments to a function should not be in ()s. --Multipart_Sat_Sep_18_20:03:15_2010-1 Content-Type: text/plain; charset=US-ASCII -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D --Multipart_Sat_Sep_18_20:03:15_2010-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Multipart_Sat_Sep_18_20:03:15_2010-1--