[Top][All Lists]

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

Re: diary behaving strangely

From: Tiarnan
Subject: Re: diary behaving strangely
Date: 30 Oct 2002 10:34:27 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "T" == Tiarnan  <> writes:
    AS> If not, the problem is probably that you don't have
    AS> european-calendar-style set to t.

Replying to myself... it seems that the problem was indeed the
calendar style---it only accepts diary entries in the form:

October 30, 2002
        blah blah blah

Once I amended the lisp to be slightly more careful about picking out
the date, month and year, I was able to drop correctly formatted
events into the diary, where they were picked up by the diary, and the
appointment list. Thanks to AS for the hint (disregarded at first). 

For anyone who is interested, here's the schnippet (largely purloined
from the example on the emacs Wiki):

(defun toc-outlook-invitation-to-diary ()
  (let ((buffer (or (get-buffer "*Article*") (current-buffer))))
      (set-buffer buffer)
      (goto-char (point-min))
      (when (re-search-forward "^Subject: \\(.*\\)$")
        (setq subject (match-string 1))
        (when (re-search-forward "^When: \\([0-9]+\\) \\(\\w+\\) \\([0-9]+\\) 
          (setq day  (match-string 1))
          (setq month (match-string 2))
          (setq year (match-string 3))
          (setq time (match-string 4))
          (when (re-search-forward "^Where: \\(.*\\)$")
            (setq where (match-string 1))
            (setq diary-buffer (find-file-noselect diary-file))
            (set-buffer diary-buffer)
            (goto-char (point-max))
            (insert (format "\n%s %s, %s\n\t%s %s (%s)\n" month day year time 
subject where))
            (bury-buffer diary-buffer)))))))

Anyway, now I'm happy, since Outlook can disappear completely from my
desktop. Another positive example of the Law of Software Envelopment.



Tiarnán Ó Corráin               CMG-WDSC
Sysadmin                        Cork.
tiarnan.o'       +353-21-4933200

"Iraq: incredible weapons - incredible weapons." How do you know that? 
"Uh, well... We looked at the receipt." -- Bill Hicks, 1992

reply via email to

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