all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* diary behaving strangely
@ 2002-10-29 14:19 Tiarnan
  2002-10-29 15:36 ` ken
  0 siblings, 1 reply; 10+ messages in thread
From: Tiarnan @ 2002-10-29 14:19 UTC (permalink / raw)


Hi--

I've written a bit of lisp (based on code on the emacs Wiki) for
snarfing MS Outlook appointment messages and saving them to the emacs
diary. One problem... even though the correct entries are listed in
the diary when I call it as a file, they don't show up in the
appointments list. I've tried reloading diary (M-x diary), and even
reloading emacs, but still, the appointments are not recognised,
although they seem to be correctly formatted.

Can anyone help?

Here's the lisp:

(defun toc-outlook-invitation-to-diary ()
  (interactive)
  (let ((buffer (or (get-buffer "*Article*") (current-buffer))))
    (save-excursion
      (set-buffer buffer)
      (goto-char (point-min))
      (when (re-search-forward "^Subject: \\(.*\\)$")
	(setq subject (match-string 1))
	(beginning-of-buffer)
	(when (re-search-forward "^When: \\([0-9]+ \\w+\\) \\([0-9]+\\) \\([0-9]+:[0-9]+\\).*$")
	  (setq date (match-string 1))
	  (setq year (match-string 2))
	  (setq time (match-string 3))
	  (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\n %s %s (%s)\n" date year time subject where))
	    (save-buffer)
	    (bury-buffer diary-buffer)))))))

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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-11-13  1:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1035901228.11451.help-gnu-emacs@gnu.org>
2002-10-29 16:08 ` diary behaving strangely Alan Shutko
2002-10-29 16:37   ` Tiarnan
2002-10-29 16:48     ` Alan Shutko
2002-10-30  9:03       ` Tiarnan
2002-10-30 10:34         ` Tiarnan
     [not found]       ` <mailman.1035968667.28019.help-gnu-emacs@gnu.org>
2002-10-30 14:23         ` Alan Shutko
2002-11-12  9:43           ` Colin Marquardt
2002-11-13  1:54             ` Edward M. Reingold
2002-10-29 14:19 Tiarnan
2002-10-29 15:36 ` ken

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.