;ELC   
;;; Compiled by nelhage@mit.edu on Wed Mar  7 14:36:37 2007
;;; from file /home/nelhage/.elisp/site/g-client/gcal.el
;;; in Emacs version 23.0.0.2
;;; with all optimizations.
;;; Function definitions are lazy-loaded.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`gcal.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\310\311\312\313\314\315%\207" [require cl proclaim (optimize (safety 0) (speed 3)) calendar g-utils g-auth browse-url custom-declare-group gcal nil "Google Calendar" :group g] 6)
#@45 Mail address that identifies calendar user.
(custom-declare-variable 'gcal-user-email 'nil '(#$ . 891) :type '(choice (const :tag "none" nil) (string :tag "username@gmail.com" "")) :group 'gcal)
#@50 Password for authenticating to calendar account.
(custom-declare-variable 'gcal-user-password 'nil '(#$ . 1092) :type '(radio (const :tag "Prompt for password" nil) (string :tag "Save password in .emacs")) :group 'gcal)
#@45 Service name for accessing Google Calendar.
(defconst gcal-service-name "cl" (#$ . 1318))
#@28 Check if this is Calendar.
(defalias 'gcal-p #[(service) #@46 ("	\230\207" . [service gcal-service-name])(#$ . 1477) nil 2 (#$ . 1414)])
(put 'gcal-p 'byte-optimizer 'byte-compile-inline-expand)
#@30 Make a new gcal auth handle.
(defalias 'make-gcal-auth #[nil #@167 ("\304\305\306 	\307\211\211\n\307\211&\207" . [gcal-user-email gcal-user-password gcal-service-name g-auth-lifetime vector cl-struct-g-auth user-login-name nil])(#$ . 1685) nil 12 (#$ . 1617)])
(put 'make-gcal-auth 'byte-optimizer 'byte-compile-inline-expand)
#@47 G auth handle used for signing into calendar.
(defvar gcal-auth-handle (byte-code "\304\305\306 	\307\211\211\n\307\211&\207" [gcal-user-email gcal-user-password gcal-service-name g-auth-lifetime vector cl-struct-g-auth user-login-name nil] 12) (#$ . 1955))
#@36 Authenticate into Google Calendar.
(defalias 'gcal-authenticate #[nil #@52 ("\301!\207" . [gcal-auth-handle g-authenticate])(#$ . 2298) nil 2 (#$ . 2222)])
#@36 XML template for  calendar events.
(defvar gcal-event-template "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>\n<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'>\n</category>\n<title type='text'>%s </title>\n<content type='text'>%s </content>\n<author>\n<name>%s </name>\n<email>%s </email>\n</author>\n<gd:transparency value='%s'></gd:transparency>\n<gd:eventStatus value='%s'></gd:eventStatus>\n<gd:where valueString='%s'></gd:where>\n<gd:when startTime='%s' endTime='%s'></gd:when>\n%s\n</entry> " (#$ . 2386))
#@30 XML template  for attendees.
(defvar gcal-attendee-template "<gd:who rel='%s'\n    valueString='%s'\n    email='%s'>\n    <gd:attendeeStatus value='%s'/>\n    <gd:attendeeType value='%s'/>\n</gd:who>\n" (#$ . 3001))
(byte-code "\300\301\302\303#\210\301\304N\204 \300\301\304\305#\210\300\207" [put gcal-event-title cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-title (aref cl-x 1)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-title #[(cl-x) #@27 ("\301H\207" . [cl-x 1])(#$ . 3568) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-title setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-title nil 1] 6] gcal-event-content cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-content (aref cl-x 2)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-content #[(cl-x) #@27 ("\301H\207" . [cl-x 2])(#$ . 4126) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-content setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-content nil 2] 6] gcal-event-author-name cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-author-name (aref cl-x 3)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-author-name #[(cl-x) #@27 ("\301H\207" . [cl-x 3])(#$ . 4700) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-author-name setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-author-name nil 3] 6] gcal-event-author-email cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-author-email (aref cl-x 4)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-author-email #[(cl-x) #@27 ("\301H\207" . [cl-x 4])(#$ . 5285) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-author-email setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-author-email nil 4] 6] gcal-event-transparency cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-transparency (aref cl-x 5)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-transparency #[(cl-x) #@27 ("\301H\207" . [cl-x 5])(#$ . 5872) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-transparency setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-transparency nil 5] 6] gcal-event-status cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-status (aref cl-x 6)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-status #[(cl-x) #@27 ("\301H\207" . [cl-x 6])(#$ . 6441) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-status setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-status nil 6] 6] gcal-event-where cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-where (aref cl-x 7)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-where #[(cl-x) #@27 ("\301H\207" . [cl-x 7])(#$ . 6995) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-where setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-where nil 7] 6] gcal-event-when-start cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-when-start (aref cl-x 8)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-when-start #[(cl-x) #@27 ("\301H\207" . [cl-x 8])(#$ . 7562) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-when-start setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-when-start nil 8] 6] gcal-event-when-end cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-when-end (aref cl-x 9)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-when-end #[(cl-x) #@27 ("\301H\207" . [cl-x 9])(#$ . 8133) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-when-end setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-when-end nil 9] 6] gcal-event-who cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-who (aref cl-x 10)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-who #[(cl-x) #@28 ("\301H\207" . [cl-x 10])(#$ . 8686) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-event-who setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-event gcal-event-who nil 10] 6] gcal-event-p cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\211\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-event-p (and (vectorp cl-x) (>= (length cl-x) 11) (memq (aref cl-x 0) cl-struct-gcal-event-tags) t)) nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-event-p #[(cl-x) #@106 ("\302!\2050G\303Y\2050\304H	>\2050\305\207" . [cl-x cl-struct-gcal-event-tags vectorp 11 0 t])(#$ . 9301) nil 2])
(defalias 'copy-gcal-event #[(x) #@36 ("\301!\207" . [x copy-sequence])(#$ . 9464) nil 2])
(byte-code "\300\301\302\303#\210\301\304N\204 \300\301\304\305#\210\300\207" [put make-gcal-event cl-compiler-macro #[(cl-whole &rest #1=#:--cl-rest--) "\306>A@\307>A@\310>\206 \311A@\312>A@\313>A@\314>A@\315>A@\316>A@\317>A@\320>A@\321\322\323\324\325	\n\f&.\n\207" [#1# title content author-name author-email transparency :title :content :author-name (nil (user-login-name)) :author-email :transparency :status :where :when-start :when-end :who cl-defsubst-expand (title content author-name author-email transparency status where when-start when-end who) (block make-gcal-event (vector 'cl-struct-gcal-event title content author-name author-email transparency status where when-start when-end who)) t nil status where when-start when-end who cl-whole] 16 "Not documented\n\n(fn CL-WHOLE &cl-quote &key TITLE CONTENT AUTHOR-NAME AUTHOR-EMAIL TRANSPARENCY STATUS WHERE WHEN-START WHEN-END WHO)"] byte-compile cl-byte-compile-compiler-macro] 4)
#@116 Not documented

(fn &key TITLE CONTENT AUTHOR-NAME AUTHOR-EMAIL TRANSPARENCY STATUS WHERE WHEN-START WHEN-END WHO)
(defalias 'make-gcal-event #[(&rest #1=#:--cl-rest--) "\306>A@\307>A@\310>\206 \311\312 DA@\313>A@\314>A@\315>A@\316>A@\317>A@\320>A@\321>A@\322\323	\n\f&.\n\207" [#1# title content author-name author-email transparency :title :content :author-name nil user-login-name :author-email :transparency :status :where :when-start :when-end :who vector cl-struct-gcal-event status where when-start when-end who] 12 (#$ . 10512)])
(byte-code "\302B\303C\304\305\306\307#\210\304\305\310\311#\210\304\305\312\313#\210\304\305\314\315#\210\304\316\317\315#\210\304\320\317\315#\210\304\321\317\322#\210\304\323\317\315#\210\304\324\317\315#\210\304\325\317\315#\210\304\326\317\315#\210\304\327\317\315#\210\304\330\317\315#\210\304\331\317\315#\210\304\332\317\315#\210\304\333\317\315#\210\304\334\317\315#\207" [custom-print-functions cl-struct-gcal-event-tags #[(cl-x cl-s cl-n) "\303!\205\230 G\304Y\205\230 \305H	>\205\230 \306\307\n\"\210\306\310\n\"\210\311\312H\n\"\210\306\313\n\"\210\311\314H\n\"\210\306\315\n\"\210\311\316H\n\"\210\306\317\n\"\210\311\320H\n\"\210\306\321\n\"\210\311\322H\n\"\210\306\323\n\"\210\311\324H\n\"\210\306\325\n\"\210\311\326H\n\"\210\306\327\n\"\210\311\330H\n\"\210\306\331\n\"\210\311\332H\n\"\210\306\333\n\"\210\311\334H\n\"\210\306\335\n\"\210\336\207" [cl-x cl-struct-gcal-event-tags cl-s vectorp 11 0 princ "#S(gcal-event" " title" prin1 1 " content" 2 " author-name" 3 " author-email" 4 " transparency" 5 " status" 6 " where" 7 " when-start" 8 " when-end" 9 " who" 10 ")" t] 3] cl-struct-gcal-event put gcal-event cl-struct-slots ((cl-tag-slot) (title) (content) (author-name (user-login-name)) (author-email) (transparency) (status) (where) (when-start) (when-end) (who)) cl-struct-type (vector nil) cl-struct-include nil cl-struct-print t make-gcal-event side-effect-free copy-gcal-event gcal-event-p error-free gcal-event-who gcal-event-when-end gcal-event-when-start gcal-event-where gcal-event-status gcal-event-transparency gcal-event-author-email gcal-event-author-name gcal-event-content gcal-event-title] 4)
#@49 Return XML representation of list of attendees.
(defalias 'gcal-attendee-list-as-xml #[(attendees) #@303 ("\301\302\303#\207" . [attendees mapconcat #[(w) "\302\303	!\206	0\304\305	!\2060\304\306	!\2060\304\307	!\2060\304\310	!\206%0\304&\207" [gcal-attendee-template w format gcal-attendee-role "" gcal-attendee-cn gcal-attendee-email gcal-attendee-resource-type gcal-attendee-status] 8] "\n"])(#$ . 12852) nil 4 (#$ . 12746)])
#@37 Return XML representation of event.
(defalias 'gcal-event-as-xml #[(e) #@162 ("\302	\303H	\304H	\305H	\306H	\307H	\310H	\311H	\312H	\313H\314	\315H!&\207" . [gcal-event-template e format 1 2 3 4 5 6 7 8 9 gcal-attendee-list-as-xml 10])(#$ . 13271) nil 14 (#$ . 13193)])
(byte-code "\300\301\302\303#\210\301\304N\204 \300\301\304\305#\210\300\207" [put gcal-attendee-email cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-attendee-email (aref cl-x 1)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-attendee-email #[(cl-x) #@27 ("\301H\207" . [cl-x 1])(#$ . 13826) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-attendee-email setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-attendee gcal-attendee-email nil 1] 6] gcal-attendee-cn cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-attendee-cn (aref cl-x 2)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-attendee-cn #[(cl-x) #@27 ("\301H\207" . [cl-x 2])(#$ . 14388) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-attendee-cn setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-attendee gcal-attendee-cn nil 2] 6] gcal-attendee-status cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-attendee-status (aref cl-x 3)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-attendee-status #[(cl-x) #@27 ("\301H\207" . [cl-x 3])(#$ . 14956) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-attendee-status setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-attendee gcal-attendee-status nil 3] 6] gcal-attendee-role cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-attendee-role (aref cl-x 4)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-attendee-role #[(cl-x) #@27 ("\301H\207" . [cl-x 4])(#$ . 15526) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-attendee-role setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-attendee gcal-attendee-role nil 4] 6] gcal-attendee-resource-type cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\305\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-attendee-resource-type (aref cl-x 5)) t nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-attendee-resource-type #[(cl-x) #@27 ("\301H\207" . [cl-x 5])(#$ . 16119) nil 2])
(byte-code "\300\301\302\303#\210\300\304\305\306#\210\304\307N\204 \300\304\307\310#\210\300\207" [put gcal-attendee-resource-type setf-method #[(cl-x) "\301\302\303\304\305%\207" [cl-x cl-struct-setf-expander gcal-attendee gcal-attendee-resource-type nil 5] 6] gcal-attendee-p cl-compiler-macro #[(--cl-whole-arg-- cl-x) "\301\302\303\304\211\211&\207" [cl-x cl-defsubst-expand (cl-x) (block gcal-attendee-p (and (vectorp cl-x) (>= (length cl-x) 6) (memq (aref cl-x 0) cl-struct-gcal-attendee-tags) t)) nil] 7] byte-compile cl-byte-compile-compiler-macro] 4)
(defalias 'gcal-attendee-p #[(cl-x) #@108 ("\302!\2050G\303Y\2050\304H	>\2050\305\207" . [cl-x cl-struct-gcal-attendee-tags vectorp 6 0 t])(#$ . 16773) nil 2])
(defalias 'copy-gcal-attendee #[(x) #@36 ("\301!\207" . [x copy-sequence])(#$ . 16942) nil 2])
(byte-code "\300\301\302\303#\210\301\304N\204 \300\301\304\305#\210\300\207" [put make-gcal-attendee cl-compiler-macro #[(cl-whole &rest #1=#:--cl-rest--) "\306>A@\307>A@\310>A@\311>A@\312>A@\313\314\315\316\317	\n\f&\n-\207" [#1# email cn status role resource-type :email :cn :status :role :resource-type cl-defsubst-expand (email cn status role resource-type) (block make-gcal-attendee (vector 'cl-struct-gcal-attendee email cn status role resource-type)) t nil cl-whole] 11 "Not documented\n\n(fn CL-WHOLE &cl-quote &key EMAIL CN STATUS ROLE RESOURCE-TYPE)"] byte-compile cl-byte-compile-compiler-macro] 4)
#@62 Not documented

(fn &key EMAIL CN STATUS ROLE RESOURCE-TYPE)
(defalias 'make-gcal-attendee #[(&rest #1=#:--cl-rest--) "\306>A@\307>A@\310>A@\311>A@\312>A@\313\314	\n\f&-\207" [#1# email cn status role resource-type :email :cn :status :role :resource-type vector cl-struct-gcal-attendee] 7 (#$ . 17629)])
(byte-code "\302B\303C\304\305\306\307#\210\304\305\310\311#\210\304\305\312\313#\210\304\305\314\315#\210\304\316\317\315#\210\304\320\317\315#\210\304\321\317\322#\210\304\323\317\315#\210\304\324\317\315#\210\304\325\317\315#\210\304\326\317\315#\210\304\327\317\315#\207" [custom-print-functions cl-struct-gcal-attendee-tags #[(cl-x cl-s cl-n) "\303!\205\\ G\304Y\205\\ \305H	>\205\\ \306\307\n\"\210\306\310\n\"\210\311\312H\n\"\210\306\313\n\"\210\311\314H\n\"\210\306\315\n\"\210\311\316H\n\"\210\306\317\n\"\210\311\320H\n\"\210\306\321\n\"\210\311\322H\n\"\210\306\323\n\"\210\324\207" [cl-x cl-struct-gcal-attendee-tags cl-s vectorp 6 0 princ "#S(gcal-attendee" " email" prin1 1 " cn" 2 " status" 3 " role" 4 " resource-type" 5 ")" t] 3] cl-struct-gcal-attendee put gcal-attendee cl-struct-slots ((cl-tag-slot) (email) (cn) (status) (role) (resource-type)) cl-struct-type (vector nil) cl-struct-include nil cl-struct-print t make-gcal-attendee side-effect-free copy-gcal-attendee gcal-attendee-p error-free gcal-attendee-resource-type gcal-attendee-role gcal-attendee-status gcal-attendee-cn gcal-attendee-email] 4)
#@36 Alist of event transparency types.
(defvar gcal-event-transparency-alist '((opaque . "http://schemas.google.com/g/2005#event.opaque")) (#$ . 19089))
#@58 Return identifier for specified event transparency type.
(defalias 'gcal-event-transparency-value #[(type) #@84 ("\303	\"\211\2050\nA)\207" . [type gcal-event-transparency-alist pair assoc])(#$ . 19357) nil 4 (#$ . 19244)])
(put 'gcal-event-transparency-value 'byte-optimizer 'byte-compile-inline-expand)
#@30 Alist of event status types.
(defvar gcal-event-status-alist '((confirmed . "http://schemas.google.com/g/2005#event.confirmed")) (#$ . 19560))
#@52 Return identifier for specified event status type.
(defalias 'gcal-event-status-value #[(type) #@78 ("\303	\"\211\2050\nA)\207" . [type gcal-event-status-alist pair assoc])(#$ . 19810) nil 4 (#$ . 19709)])
(put 'gcal-event-status-value 'byte-optimizer 'byte-compile-inline-expand)
#@29 Get transparency for event.
(defalias 'gcal-read-transparency #[nil #@96 ("\303\304	\"\211\2050\nA*\207" . [type gcal-event-transparency-alist pair opaque assoc])(#$ . 20075) nil 4 (#$ . 20001)])
(put 'gcal-read-transparency 'byte-optimizer 'byte-compile-inline-expand)
#@23 Get status for event.
(defalias 'gcal-read-status #[nil #@93 ("\303\304	\"\211\2050\nA*\207" . [type gcal-event-status-alist pair confirmed assoc])(#$ . 20345) nil 4 (#$ . 20283)])
(put 'gcal-read-status 'byte-optimizer 'byte-compile-inline-expand)
#@41 XSL transform used to view event feeds.
(custom-declare-variable 'gcal-calendar-view '(expand-file-name "gcal-view.xsl" g-directory) '(#$ . 20544) :group 'gcal)
#@41 XSL transform used to view event feeds.
(custom-declare-variable 'gcal-event-view '(expand-file-name "gevent-view.xsl" g-directory) '(#$ . 20711) :group 'gcal)
#@30 Time format used for events.
(custom-declare-variable 'gcal-event-time-format '"%Y-%m-%dT%H:%M:%S.000" '(#$ . 20877) :type 'string :group 'gcal)
#@124 Like format-time-string, except we produce a zone offset per
  Google Calendar spec. `time-spec' defaults to current time.
(defalias 'gcal-format-time-string #[(&optional time-spec) #@196 ("\2040\304 \305\306!\307\310	\311\312O	\312\313O#\307\314\305\"\n#*\207" . [time-spec z zone gcal-event-time-format current-time format-time-string "%z" format "%s:%s" 0 -2 nil "%s%s"])(#$ . 21218) nil 6 (#$ . 21029)])
(put 'gcal-format-time-string 'byte-optimizer 'byte-compile-inline-expand)
#@45 Read time and return it suitably formatted.
(defalias 'gcal-read-time #[(prompt) #@230 ("\305\306\307 \310\311!\312\313\n\314\315O\n\315\306O#\312\316\310\f	\"#+\"\207" . [prompt time-spec z zone gcal-event-time-format read-from-minibuffer nil current-time format-time-string "%z" format "%s:%s" 0 -2 "%s%s"])(#$ . 21615) nil 8 (#$ . 21527)])
(put 'gcal-read-time 'byte-optimizer 'byte-compile-inline-expand)
#@106 Smart date collector.
Prompts with `prompt'.
This function is sensitive to calendar mode when prompting.
(defalias 'gcal-read-calendar-date #[(prompt) #@539 ("\306\307!\310\n\311=\203#0\312 \313\314@\211A@)\211AA)@$)\315	\310\211\211	&\316\317\320\321\"\"\322\323\324\211\211\211A@)@\211AA)@C&\211\204V0\325 \306\326!\313\327\324\330O\330\310O#\313\331\306\"#-\207" . [result default major-mode date x prompt format-time-string "%m/%d/%Y" nil calendar-mode calendar-cursor-to-nearest-date format "%s/%s/%s" read-from-minibuffer mapcar read split-string "/" apply encode-time 0 current-time "%z" "%s:%s" -2 "%s%s" time-spec z zone gcal-event-time-format])(#$ . 22108) nil 9 (#$ . 21950)])
#@129 Smart time collector.
Prompts with `prompt'.
Default date is assumed to be today, or  the date selected when
  in the calendar.
(defalias 'gcal-read-calendar-time #[(prompt) #@568 ("\306\211\211\307=\203#0\310 \211\211A@)\n@\n\211AA)@E\20210\311 \312	8\313	8\314	8E\315\316\317!\306\211\211\316\317!&\320\321\322\323\"\"\324\325\326\211A@)@\n%\211\204^0\327 \316\330!\331\332\326\333O\333\306O#_\331\334\316 \"_#.\207" . [result now date major-mode x prompt nil calendar-mode calendar-cursor-to-nearest-date decode-time 3 4 5 read-from-minibuffer format-time-string "%H:%M" mapcar read split-string ":" apply encode-time 0 current-time "%z" format "%s:%s" -2 "%s%s" time-spec z zone gcal-event-time-format])(#$ . 22867) nil 9 (#$ . 22686)])
#@28 Read list of participants.
(defalias 'gcal-read-who #[(prompt) #@279 ("\304\211\211\305\306\307\"!\211G\310V\203%0\311\312\211\304\313\304&\211\nB\2020\n+\207" . [email participant who prompt nil read-from-minibuffer format "%s email: Blank to quit" 0 vector cl-struct-gcal-attendee "http://schemas.google.com/g/2005#event.attendee"])(#$ . 23543) nil 8 (#$ . 23473)])
(put 'gcal-read-who 'byte-optimizer 'byte-compile-inline-expand)
#@61 Prompt user for event params and return an event structure.
(defalias 'gcal-read-event #[(title content where start end who transparency status) #@309 ("\306\307\310\211\311 \312H\310\211\211\211\211\211&\211\313\nI\210	\312I\210	\314\fI\210	\315I\210	\316I\210	\317I\210	\320I\210	\321I\210	)\207" . [gcal-auth-handle event title content where start vector cl-struct-gcal-event nil user-login-name 2 1 7 8 9 10 5 6 end who transparency status])(#$ . 24077) nil 13 (#$ . 23925) (list (read-from-minibuffer "Title: ") (read-from-minibuffer "Content: ") (read-from-minibuffer "Where: ") (gcal-read-calendar-time "Start Time: ") (gcal-read-calendar-time "End Time: ") (gcal-read-who "Participant: ") (gcal-read-transparency) (gcal-read-status))])
#@65 URL for default calendar feed for currently authenticated
user.
(defvar gcal-default-feed-url "http://www.google.com/calendar/feeds/default/private/full" (#$ . 24689))
#@53 URL for private calendar feed using authentication.
(defvar gcal-private-feed-url "http://www.google.com/calendar/feeds/%s/private/full" (#$ . 24863))
#@45 Return private feed for authenticated user.
(defalias 'gcal-private-feed-url #[nil #@310 ("\303	\304H\305\306\n\307#)\"\207" . [gcal-private-feed-url gcal-auth-handle str format 2 mapconcat #[(c) "\301U\2030\302\207\303Y\2030\304X\204,0\305Y\203 0\306X\204,0\307Y\20300\310X\20300\311!\207\312\313\"\226\207" [c 32 "+" 97 122 65 90 48 57 char-to-string format "%%%02x"] 3] ""])(#$ . 25110) nil 6 (#$ . 25020)])
(put 'gcal-private-feed-url 'byte-optimizer 'byte-compile-inline-expand)
#@69 Post event via HTTPS to location and return resulting HTTP headers.
(defalias 'gcal-post-event #[(event location) #@1154 ("\306!\307\212\nq\210\310 \210\311 \210\312!c\210\313\314\315 \"\316\317ed\313\320%&'(\313)\321((*\322*(\323H\"\211+\205F0+A+\"),-&p\324%\210ed.\211/b\210\3250.\326#\203i0`.\214/.}\210\316\211\211123eb\210\327\330!\203\2400\331\332!\210\331\333!\210`2\331\332!\210\334\3352`\"B3B3\336y\210m\204\3150\337\335\340 \341 \"\342\"\2111G\343U\203\30701@1\2114A@)B3B3\336y\210\202\24003.ed.\211/b\210\3250.\326#\203\3540\335`.\"\202\3550\344.D\207" . [g-scratch-buffer buffer-undo-list buffer event status cl get-buffer-create t kill-all-local-variables erase-buffer gcal-event-as-xml format "-H Content-length:%s" buffer-size nil shell-command-on-region "%s %s %s %s %s -i -X POST --data-binary @- %s 2>/dev/null" "Auth" assoc 6 replace search-forward no-error looking-at "HTTP/[0-9.]+" skip-syntax-forward "^ " " " "Status" buffer-substring-no-properties 1 split-string line-beginning-position line-end-position ": " 2 "" g-curl-program g-curl-common-options gcal-auth-handle auth-handle g-authorization-header-format name pair g-cookie-options location end start g-crlf-pair fields pos headers x])(#$ . 25653) nil 16 (#$ . 25531)])
(put 'gcal-post-event 'byte-optimizer 'byte-compile-inline-expand)
#@23 Add a calendar event.
(defalias 'gcal-add-event #[nil #@2661 ("\306!\210\307\310!\311\211\211\211\211\2114\3125\313H6\314\3156\316#)\"4\3177!\32089\2129q\210\321 \210\322 \210\3234!c\210\312\324\325 \"\311:\326ed\312\327;<:=\312>\330==?\331?=\332H\"\211@\205s0@A+\")A	&p\333%\210edB\211Cb\210\334DB\335#\203\2250`B\214CB}\210\311\211\211EFeb\210\336\337!\203\3110\340\341!\210\340\342!\210`F\340\341!\210\343\344F`\"B\fB\345y\210m\204\3640\346\344\347 \350 \"\351\"\211EG\313U\203\3560E@E\211GA@)B\fB\345y\210\202\3110\f.edB\211Cb\210\334DB\335#\203\344`B\"\202\316.	D\211@\n\211GA@)\343\fH?\331?H\"\2058\331?H\"A*\211\352\230\203V\353\fH?\331?H\"\205V\331?H\"A*\211\204`\354\355!\2104	4\3177!\32089\2129q\210\321 \210\322 \210\3234!c\210\312\324\325 \"\311:\326ed\312\327;<:=\312>\330==?\331?=\332H\"\211@\205\262@A+\")A	&p\333%\210edB\211Cb\210\334DB\335#\203\324`B\214CB}\210\311\211\211EFeb\210\336\337!\203\340\341!\210\340\342!\210`F\340\341!\210\343\344F`\"B\fB\345y\210m\2043\346\344\347 \350 \"\351\"\211EG\313U\203-E@E\211GA@)B\fB\345y\210\202\f.edB\211Cb\210\334DB\335#\203Q\344`B\"\202R\316.	D\n@\n\211GA@)\343\fH?\331?H\"\205w\331?H\"A*\356\230\205\355\357GV\203\323IJK\3177!\32089\2129q\210\321 \210\322 \210Kc\210J\203\314edJLBC\326CB\312\360MLN\203\306\361\202\307\316$\333$\210+Op!+\210*\362\363\353\fH?\331?H\"\205\353\331?H\"A*\".\207" . [gcal-auth-handle location response body headers status g-auth-ensure-token call-interactively gcal-read-event nil format 2 mapconcat #[(c) "\301U\2030\302\207\303Y\2030\304X\204,0\305Y\203 0\306X\204,0\307Y\20300\310X\20300\311!\207\312\313\"\226\207" [c 32 "+" 97 122 65 90 48 57 char-to-string format "%%%02x"] 3] "" get-buffer-create t kill-all-local-variables erase-buffer gcal-event-as-xml "-H Content-length:%s" buffer-size shell-command-on-region "%s %s %s %s %s -i -X POST --data-binary @- %s 2>/dev/null" "Auth" assoc 6 replace search-forward no-error looking-at "HTTP/[0-9.]+" skip-syntax-forward "^ " " " "Status" buffer-substring-no-properties 1 split-string line-beginning-position line-end-position ": " "302" "Location" error "Could not find redirect." "201" 0 "%s %s - %s" " 2>/dev/null" message "Event added as %s" event gcal-private-feed-url str g-scratch-buffer buffer-undo-list buffer cl g-curl-program g-curl-common-options auth-handle g-authorization-header-format name pair g-cookie-options end start g-crlf-pair fields pos x header-alist gcal-calendar-view style string xsl g-xslt-program g-xslt-debug g-html-handler])(#$ . 26975) nil 17 (#$ . 26913) nil])
#@44 Add a calendar event using simple English.
(defalias 'gcal-quick-add-event #[nil #@798 ("\306!\210\307\310!\311\n!\312\212\fq\210\313 \210\314 \210\315\316\317\316\320\321\322H\"\211\205<0A+\")\316\323\316\324H\325\326\327#)\"	\325\326\327#)#%!,\207" . [gcal-auth-handle event g-scratch-buffer buffer-undo-list buffer g-curl-program g-auth-ensure-token read-from-minibuffer "Quick Add Event: " get-buffer-create t kill-all-local-variables erase-buffer shell-command format "%s -i   %s %s  %s" "Auth" assoc 6 "%s/event?ctext=%s" 2 mapconcat #[(c) "\301U\2030\302\207\303Y\2030\304X\204,0\305Y\203 0\306X\204,0\307Y\20300\310X\20300\311!\207\312\313\"\226\207" [c 32 "+" 97 122 65 90 48 57 char-to-string format "%%%02x"] 3] "" g-curl-common-options auth-handle g-authorization-header-format name pair gcal-private-feed-url str])(#$ . 29767) nil 14 (#$ . 29679) nil])
#@26 Delete a calendar event.
(defalias 'gcal-delete-event #[(event-uri) #@530 ("\306!\210\307\211\211\310\f!\311\212q\210\312 \210\313 \210\314\315\316\315\317\320\321H\"\211\205A0A+\")&p\322#.\207" . [gcal-auth-handle response body headers g-scratch-buffer buffer-undo-list g-auth-ensure-token nil get-buffer-create t kill-all-local-variables erase-buffer shell-command format "%s %s %s %s -i -X DELETE %s 2>/dev/null" "Auth" assoc 6 replace buffer g-curl-program g-curl-common-options auth-handle g-authorization-header-format name pair g-cookie-options event-uri])(#$ . 30683) nil 12 (#$ . 30608) (list (read-from-minibuffer "Event URL: " (browse-url-url-at-point)))])
#@38 XSL transform used to accept events.
(custom-declare-variable 'gcal-event-accept '(expand-file-name "gevent-accept.xsl" g-directory) '(#$ . 31322) :group 'gcal)
#@34 Accept (RSVP)  a calendar event.
(defalias 'gcal-accept-event #[(event-uri) #@827 ("\306!\210\307	!\310\212q\210\311 \210\312 \210\313\314\315\f\314\316\317\320H\"\211\20570A+\")&p\321#\210\322ed\314\323\324H_$p\321%\210\314\325\326 \" \322ed\314\327\f \314\316\317\320H\"\211\205\2030A+\")&p\321%,\207" . [gcal-auth-handle g-scratch-buffer buffer-undo-list buffer g-curl-program g-curl-common-options g-auth-ensure-token get-buffer-create t kill-all-local-variables erase-buffer shell-command format "%s %s %s %s  -X GET %s 2>/dev/null" "Auth" assoc 6 replace shell-command-on-region "%s --param 'email' \"'%s'\" %s - 2>/dev/null" 2 "-H Content-length:%s" buffer-size "%s %s %s %s %s -i -X PUT --data-binary @- %s 2>/dev/null" auth-handle g-authorization-header-format name pair g-cookie-options event-uri g-xslt-program gcal-event-accept cl])(#$ . 31572) nil 15 (#$ . 31489) (list (read-from-minibuffer "Event URL: " (browse-url-url-at-point)))])
#@49 Show calendar for currently authenticated user.
(defalias 'gcal-show-calendar #[(&optional calendar start-min start-max) #@1148 ("\306!\210\307\310	\n\307\f\311\312\313H\"\211\205_0A+\")\20690\307\314H_\315\316_\317#)\" \204G0!\204G0\320\202V0\307\321 \206O0\317!\206U0\317#&\"#$\322%!\323&'\212'q\210\324 \210\325 \210\326$p\"\210#\203\2410ed#()*\327*)\307\330+(,\203\2330\331\202\2340\317$\332$\210+-p!-\207" . [gcal-auth-handle g-curl-program g-curl-common-options auth-handle g-authorization-header-format name g-auth-ensure-token format "%s %s %s %s  '%s%s' 2>/dev/null" "Auth" assoc 6 2 mapconcat #[(c) "\301U\2030\302\207\303Y\2030\304X\204,0\305Y\203 0\306X\204,0\307Y\20300\310X\20300\311!\207\312\313\"\226\207" [c 32 "+" 97 122 65 90 48 57 char-to-string format "%%%02x"] 3] "" "?orderby=starttime" "?orderby=starttime&start-min=%s&start-max=%s" get-buffer-create t kill-all-local-variables erase-buffer shell-command shell-command-on-region "%s %s - %s" " 2>/dev/null" replace pair g-cookie-options calendar gcal-private-feed-url str start-min start-max gcal-calendar-view style command g-scratch-buffer buffer-undo-list buffer xsl end start g-xslt-program g-xslt-debug g-html-handler])(#$ . 32637) nil 12 (#$ . 32508) (list (if current-prefix-arg (read-from-minibuffer "Calendar URI:" (gcal-private-feed-url)) (gcal-private-feed-url)) (if current-prefix-arg (read-from-minibuffer "Start:" (format-time-string gcal-event-time-format (current-time)))) (if current-prefix-arg (read-from-minibuffer "End:" (format-time-string gcal-event-time-format (current-time)))))])
#@56 Number of days for which we show an agenda by default.
(custom-declare-variable 'gcal-calendar-agenda-days '5 '(#$ . 34170) :type 'integer :group 'gcal)
#@87 Get GCal date from a calendar date spec.
Default is to use calendar date under point.
(defalias 'gcal-calendar-get-date #[(&optional date) #@306 ("\2060\306 \307\310\311\211\211\211A@)@\211AA)@C&\211\204&0\312 \313\314!\315\316\311\317O\317\320O#\315\321\313\n\"\f#+\207" . [date x time-spec z zone gcal-event-time-format calendar-current-date apply encode-time 0 current-time format-time-string "%z" format "%s:%s" -2 nil "%s%s"])(#$ . 34475) nil 9 (#$ . 34329)])
#@391 Show agenda for currently authenticated user.
With interactive prefix arg, prompts for calendar to show. This
command is best invoked from within the emacs calendar. It uses
point and mark in the calendar to determine the days for which we
show the agenda. If no mark is set in the calendar, the agenda is
shown for the next `gcal-calendar-agenda-days' days following the
date under point.
(defalias 'gcal-calendar-agenda #[(&optional calendar) #@3118 ("\306\307=\205	0\310 !\307=\2030\n@\2030\306\n@!\2024\307=\203\255\306\311\310 \211\211AA@)\312\211\313U\203>0\314\315!\202\244\313V\203\3010S\211\211@).\211A@)/\211AA@)/.S\316_\\0.\317V\203\25200.\320_\321\\\322\245Z0\211\313W\203\2130\323!S\324\320\246!\205\2410\324\325\246!?\206\2410\324\326\246!)\203\25200T00-\f\327_\\\f\320\245\\\f\325\245[\\\f\326\245\\\202\244\323T!\211\211@).\211A@)/\211AA@)/.S\316_\\0.\317V\203)0.\320_\321\\\322\245Z0\211\313W\203\n\323!S\324\320\246!\205 \324\325\246!?\206 \324\326\246!)\203)0T00-\f\327_Z\f\320\245Z\f\325\245[Z\f\326\245Z\330\211\211@).\211A@)/\211AA@)/.S\316_\\0.\317V\203\2400.\320_\321\\\322\245Z0\211\313W\203\201\323!S\324\320\246!\205\227\324\325\246!?\206\227\324\326\246!)\203\2400T00-Z+1\\!!\2024\306\311\331 \211\211AA@)\312\211\313U\203\310\314\315!\202.\313V\203KS\211\211@).\211A@)/\211AA@)/.S\316_\\0.\317V\20340.\320_\321\\\322\245Z0\211\313W\203\323!S\324\320\246!\205+\324\325\246!?\206+\324\326\246!)\20340T00-\f\327_\\\f\320\245\\\f\325\245[\\\f\326\245\\\202.\323T!\211\211@).\211A@)/\211AA@)/.S\316_\\0.\317V\203\2630.\320_\321\\\322\245Z0\211\313W\203\224\323!S\324\320\246!\205\252\324\325\246!?\206\252\324\326\246!)\203\2630T00-\f\327_Z\f\320\245Z\f\325\245[Z\f\326\245Z\330\211\211@).\211A@)/\211AA@)/.S\316_\\0.\317V\203*0.\320_\321\\\322\245Z0\211\313W\203\323!S\324\320\246!\205!\324\325\246!?\206!\324\326\246!)\203*0T00-Z+1\\!!2\3323!\210\333\3344536\3337\335668\33686\337H\"\2119\205`9A+\"):;\206{\333<3\317H=\340\341=\342#)\"	\204\2102\204\210\343\202\226\333\344	\206\217\3422\206\225\342#&>?@\345A!\346BC\212Cq\210\347 \210\350 \210\351@p\"\210?\203\341ed?DEF\352FE\333\353GDH\203\333\354\202\334\342$\355$\210+Ip!.\207" . [major-mode start-min calendar-mark-ring date offset-years year gcal-calendar-get-date calendar-mode calendar-cursor-to-nearest-date calendar-gregorian-from-absolute nil 0 error "There was no year zero" 31 2 4 23 10 abs zerop 100 400 365 (12 31 -1) calendar-current-date g-auth-ensure-token format "%s %s %s %s '%s%s' 2>/dev/null" "Auth" assoc 6 mapconcat #[(c) "\301U\2030\302\207\303Y\2030\304X\204,0\305Y\203 0\306X\204,0\307Y\20300\310X\20300\311!\207\312\313\"\226\207" [c 32 "+" 97 122 65 90 48 57 char-to-string format "%%%02x"] 3] "" "?orderby=starttime" "?orderby=starttime&start-min=%s&start-max=%s" get-buffer-create t kill-all-local-variables erase-buffer shell-command shell-command-on-region "%s %s - %s" " 2>/dev/null" replace month day day-of-year gcal-calendar-agenda-days start-max gcal-auth-handle g-curl-program g-curl-common-options auth-handle g-authorization-header-format name pair g-cookie-options calendar gcal-private-feed-url str gcal-calendar-view style command g-scratch-buffer buffer-undo-list buffer xsl end start g-xslt-program g-xslt-debug g-html-handler])(#$ . 35273) nil 13 (#$ . 34820) (list (if current-prefix-arg (read-from-minibuffer "Calendar URI:" (gcal-private-feed-url)) (gcal-private-feed-url)))])
#@20 Show event at URL.
(defalias 'gcal-show-event #[(url) #@698 ("\306!\210\307\310	\n\307\f\311\312\313H\"\211\205_0A+\")&\314!\315\212q\210\316 \210\317 \210\320p\"\210\203q0ed_ !\321! \307\322\"_#\203k0\323\202l0\324$\325$\210+$p!-\207" . [gcal-auth-handle g-curl-program g-curl-common-options auth-handle g-authorization-header-format name g-auth-ensure-token format "%s %s %s %s   %s 2>/dev/null" "Auth" assoc 6 get-buffer-create t kill-all-local-variables erase-buffer shell-command shell-command-on-region "%s %s - %s" " 2>/dev/null" "" replace pair g-cookie-options url gcal-event-view style command g-scratch-buffer buffer-undo-list buffer xsl end start g-xslt-program g-xslt-debug g-html-handler])(#$ . 38609) nil 11 (#$ . 38548) "sURL:"])
(define-prefix-command 'gcal-calendar-prefix-map)
#@43 Setup GCal keybindings in Emacs calendar.
(defalias 'gcal-emacs-calendar-setup #[nil #@259 ("\305\306\303#\210\307\310	:\203%0	@\305\n@\n\211A@)#\210	A\211\2020*\310\207" . [calendar-mode-map #1=#:--cl-var-- binding gcal-calendar-prefix-map x define-key "c" (("a" gcal-add-event) ("c" gcal-calendar-agenda) ("s" gcal-show-calendar)) nil])(#$ . 39496) nil 5 (#$ . 39404)])
(provide 'gcal)
