* diary entry to count
@ 2002-09-06 22:47 Raimund.Kohl
0 siblings, 0 replies; 3+ messages in thread
From: Raimund.Kohl @ 2002-09-06 22:47 UTC (permalink / raw)
Hi,
I am looking for a way to tell the calender programm to remind me of
starting a certain discourse no every 1st of each month for a period of
the next 12 months. Somehow I don't have a clue how to do that. Inserting
i-d on the calender would be easy but then I don't know how to let emacs
count (say 1st of Sept No 1, 1st of Nov No 3 ... etc) or to stop after 12
month (that is to not repeat on the 1st of the 13th month); inserting
cyclic would be easy to count but then the cyclic argument is a number of
days which vary between 30 and 31 (not to mention Feb). Can anybody help?
Thank you.
ray
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: diary entry to count
[not found] <851y8383gj.fsf@emr.cs.iit.edu>
@ 2002-09-09 21:52 ` Raimund.Kohl
0 siblings, 0 replies; 3+ messages in thread
From: Raimund.Kohl @ 2002-09-09 21:52 UTC (permalink / raw)
On 9 Sep 2002, Edward M. Reingold wrote:
> If you want such entries only, say from Sept 1, 2002 until Aug 1, 2003, you
> would use a diary sexp such as
>
> %%(and (= (extract-calendar-day date) 1)
> (<= (calendar-absolute-from-gregorian date)
> (calendar-absolute-from-gregorian '(8 1 2003)))
> (>= (calendar-absolute-from-gregorian date)
> (calendar-absolute-from-gregorian '(9 1 2002)))) Blah blah
absolutely breathtaking, that is, at least for me :-) wow ... but %d for
counting the Discourse No don't work ... how do I do this - for that is
the crux to that, otherwise I just would have pressed i-m and that it
would have been. I am looking for calender/diary telling me (e.g.)
1st of Sept - Discourse No 1
or later
1st of Nov - Discourse No 3
Thank you anyway,
ray
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: diary entry to count
[not found] <mailman.1031608628.2831.help-gnu-emacs@gnu.org>
@ 2002-09-10 0:56 ` Edward M. Reingold
0 siblings, 0 replies; 3+ messages in thread
From: Edward M. Reingold @ 2002-09-10 0:56 UTC (permalink / raw)
Cc: Raimund.Kohl
>>>>> "RK" == Raimund Kohl <Raimund.Kohl@freenet.de> writes:
RK> that it would have been. I am looking for calender/diary telling me
RK> (e.g.)
RK> 1st of Sept - Discourse No 1
RK> or later
RK> 1st of Nov - Discourse No 3
Oh--I misunderstood. use
%%(diary-first-of-month 20 9 2002) Discourse No %d
for 20 months starting October 1, 2002, where you have the following in your
.emacs
(defun diary-first-of-month (n month year)
"Cycle diary entry.
Entry applies on the first of the month for N months starting MONTH, DAY, YEAR.
ENTRY can contain `%d' or `%d%s'; the %d will be replaced by the number of
months since MONTH 1, YEAR and the %s will be replaced by the ordinal ending
of that number (that is, `st', `nd', `rd' or `th', as appropriate."
(let* ((cycle (+ 1 (* 12 (- (extract-calendar-year date) year))
(- (extract-calendar-month date) month))))
(if (and (= (extract-calendar-day date) 1)
(< 0 cycle)
(<= cycle n))
(format entry cycle (diary-ordinal-suffix cycle)))))
--
Professor Edward M. Reingold Email: reingold@iit.edu
Chairman, Department of Computer Science Voice: (312) 567-3309
Illinois Institute of Technology Assistant: (312) 567-5152
Stuart Building Fax: (312) 567-5067
10 West 31st Street, Suite 236
Chicago, IL 60616-3729 U.S.A.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-10 0:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-06 22:47 diary entry to count Raimund.Kohl
[not found] <851y8383gj.fsf@emr.cs.iit.edu>
2002-09-09 21:52 ` Raimund.Kohl
[not found] <mailman.1031608628.2831.help-gnu-emacs@gnu.org>
2002-09-10 0:56 ` Edward M. Reingold
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).