• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/calendar/

Lines Matching +defs:entry +defs:format

43 ;;  0.06: Bugfixes regarding icalendar-import-format-*.
47 ;; 0.05: New import format scheme: Replaced icalendar-import-prefix-*,
49 ;; icalendar-import-separator with icalendar-import-format(-*).
75 ;; + Need more properties for icalendar-import-format
115 (defcustom icalendar-import-format
120 %c Class, see `icalendar-import-format-class'
121 %d Description, see `icalendar-import-format-description'
122 %l Location, see `icalendar-import-format-location'
123 %o Organizer, see `icalendar-import-format-organizer'
124 %s Summary, see `icalendar-import-format-summary'
125 %t Status, see `icalendar-import-format-status'
126 %u URL, see `icalendar-import-format-url'"
130 (defcustom icalendar-import-format-summary
138 (defcustom icalendar-import-format-description
146 (defcustom icalendar-import-format-location
154 (defcustom icalendar-import-format-organizer
162 (defcustom icalendar-import-format-url
170 (defcustom icalendar-import-format-status
178 (defcustom icalendar-import-format-class
394 "Return ISODATETIMESTRING in format like `decode-time'.
446 "Convert ISODURATIONSTRING into format provided by `decode-time'.
523 "Convert the decoded DATETIME to non-european-style format.
526 Non-European format: \"month day year\"."
528 (format "%d%s%d%s%d" (nth 4 datetime) ;month
537 "Convert the decoded DATETIME to European format.
540 European format: (day month year).
543 (format "%d%s%d%s%d" (nth 3 datetime) ;day
552 "Convert the decoded DATETIME to diary format.
562 "Extract the time part of a decoded DATETIME into 24-hour format.
564 (format "%02d:%02d" (nth 2 datetime) (nth 1 datetime)))
618 (format "%04d%02d%02d" (nth 2 mdy) (nth 0 mdy) (nth 1 mdy))))
677 (format "%04d%02d%02d" (nth 2 mdy) (nth 0 mdy) (nth 1 mdy)))
689 (format "T%04d00" starttimenum))
710 "Export diary file to iCalendar format.
712 format. The result is appended to the file ICAL-FILENAME."
724 "Export region in diary file to iCalendar format.
726 converted to iCalendar format. The result is appended to the file
735 (entry-main "")
736 (entry-rest "")
754 (setq entry-main (match-string 1))
756 (setq entry-rest (match-string 2))
757 (setq entry-rest ""))
758 (setq header (format "\nBEGIN:VEVENT\nUID:emacs%d%d%d"
765 (icalendar--convert-to-ical nonmarker entry-main))
767 (concat entry-main entry-rest)))
797 (insert (format "Error in line %d -- %s: `%s'\n"
800 entry-main))))))
818 (defun icalendar--convert-to-ical (nonmarker entry-main)
819 "Convert a diary entry to icalendar format.
821 entries. ENTRY-MAIN is the first line of the diary entry."
824 (icalendar--convert-anniversary-to-ical nonmarker entry-main)
826 (icalendar--convert-cyclic-to-ical nonmarker entry-main)
828 (icalendar--convert-date-to-ical nonmarker entry-main)
830 (icalendar--convert-float-to-ical nonmarker entry-main)
832 (icalendar--convert-block-to-ical nonmarker entry-main)
834 (icalendar--convert-sexp-to-ical nonmarker entry-main)
836 (icalendar--convert-weekly-to-ical nonmarker entry-main)
838 (icalendar--convert-yearly-to-ical nonmarker entry-main)
841 (icalendar--convert-ordinary-to-ical nonmarker entry-main)
844 (error "Could not parse entry")))
849 (let* ((s icalendar-import-format)
850 (p-cla (or (string-match "%c" icalendar-import-format) -1))
851 (p-des (or (string-match "%d" icalendar-import-format) -1))
852 (p-loc (or (string-match "%l" icalendar-import-format) -1))
853 (p-org (or (string-match "%o" icalendar-import-format) -1))
854 (p-sum (or (string-match "%s" icalendar-import-format) -1))
855 (p-sta (or (string-match "%t" icalendar-import-format) -1))
856 (p-url (or (string-match "%u" icalendar-import-format) -1))
879 (concat "\\(" icalendar-import-format-summary "\\)?"))
881 (concat "\\(" icalendar-import-format-class "\\)?"))
883 (concat "\\(" icalendar-import-format-description "\\)?"))
885 (concat "\\(" icalendar-import-format-location "\\)?"))
887 (concat "\\(" icalendar-import-format-organizer "\\)?"))
889 (concat "\\(" icalendar-import-format-status "\\)?"))
891 (concat "\\(" icalendar-import-format-url "\\)?"))))
932 (defun icalendar--convert-ordinary-to-ical (nonmarker entry-main)
933 "Convert \"ordinary\" diary entry to icalendar format.
935 entries. ENTRY-MAIN is the first line of the diary entry."
943 entry-main)
944 (let* ((datetime (substring entry-main (match-beginning 1)
952 (substring entry-main
957 (substring entry-main
963 (substring entry-main
968 (substring entry-main
973 (substring entry-main (match-beginning 8)
975 (icalendar--dmsg "ordinary %s" entry-main)
984 (setq endtimestring (format "T%06d"
1002 (defun icalendar--convert-weekly-to-ical (nonmarker entry-main)
1003 "Convert weekly diary entry to icalendar format.
1005 entries. ENTRY-MAIN is the first line of the diary entry."
1015 entry-main)
1017 (substring entry-main (match-beginning 1)
1020 (substring entry-main (match-beginning 1)
1024 (substring entry-main
1029 (substring entry-main
1035 (substring entry-main
1040 (substring entry-main
1045 (substring entry-main (match-beginning 8)
1047 (icalendar--dmsg "weekly %s" entry-main)
1054 (setq endtimestring (format "T%06d"
1062 (format
1070 (format
1082 (defun icalendar--convert-yearly-to-ical (nonmarker entry-main)
1083 "Convert yearly diary entry to icalendar format.
1085 entries. ENTRY-MAIN is the first line of the diary entry."
1097 entry-main)
1100 (day (read (substring entry-main
1104 (substring entry-main
1109 (substring entry-main
1114 (substring entry-main
1120 (substring entry-main
1125 (substring entry-main
1130 (substring entry-main (match-beginning 9)
1132 (icalendar--dmsg "yearly %s" entry-main)
1139 (setq endtimestring (format "T%06d"
1144 (format "1900%02d%02d" month day)
1155 (format "%2d" month)
1157 (format "%2d" day))
1162 (defun icalendar--convert-sexp-to-ical (nonmarker entry-main)
1163 "Convert complex sexp diary entry to icalendar format -- unsupported!
1168 entries. ENTRY-MAIN is the first line of the diary entry."
1171 entry-main)
1172 ;; simple sexp entry as generated by icalendar.el: strip off the
1174 (icalendar--dmsg "diary-sexp from icalendar.el %s" entry-main)
1178 (substring entry-main (match-beginning 1) (match-end 1))
1179 (substring entry-main (match-beginning 2) (match-end 2)))))
1182 entry-main)
1183 (icalendar--dmsg "diary-sexp %s" entry-main)
1189 (defun icalendar--convert-block-to-ical (nonmarker entry-main)
1190 "Convert block diary entry to icalendar format.
1192 entries. ENTRY-MAIN is the first line of the diary entry."
1201 entry-main)
1202 (let* ((startstring (substring entry-main
1205 (endstring (substring entry-main
1216 (substring entry-main
1221 (substring entry-main
1227 (substring entry-main
1232 (substring entry-main
1237 (substring entry-main (match-beginning 9)
1239 (icalendar--dmsg "diary-block %s" entry-main)
1245 (setq endtimestring (format "T%06d"
1265 (defun icalendar--convert-float-to-ical (nonmarker entry-main)
1266 "Convert float diary entry to icalendar format -- unsupported!
1271 entries. ENTRY-MAIN is the first line of the diary entry."
1274 entry-main)
1276 (icalendar--dmsg "diary-float %s" entry-main)
1281 (defun icalendar--convert-date-to-ical (nonmarker entry-main)
1282 "Convert `diary-date' diary entry to icalendar format -- unsupported!
1287 entries. ENTRY-MAIN is the first line of the diary entry."
1290 entry-main)
1292 (icalendar--dmsg "diary-date %s" entry-main)
1297 (defun icalendar--convert-cyclic-to-ical (nonmarker entry-main)
1298 "Convert `diary-cyclic' diary entry to icalendar format.
1300 entries. ENTRY-MAIN is the first line of the diary entry."
1309 entry-main)
1310 (let* ((frequency (substring entry-main (match-beginning 1)
1312 (datetime (substring entry-main (match-beginning 2)
1322 (substring entry-main
1327 (substring entry-main
1333 (substring entry-main
1338 (substring entry-main
1343 (substring entry-main (match-beginning 9)
1345 (icalendar--dmsg "diary-cyclic %s" entry-main)
1351 (setq endtimestring (format "T%06d"
1371 (defun icalendar--convert-anniversary-to-ical (nonmarker entry-main)
1372 "Convert `diary-anniversary' diary entry to icalendar format.
1374 entries. ENTRY-MAIN is the first line of the diary entry."
1382 entry-main)
1383 (let* ((datetime (substring entry-main (match-beginning 1)
1391 (substring entry-main
1396 (substring entry-main
1402 (substring entry-main
1407 (substring entry-main
1412 (substring entry-main (match-beginning 8)
1414 (icalendar--dmsg "diary-anniversary %s" entry-main)
1420 (setq endtimestring (format "T%06d"
1522 (defun icalendar--format-ical-event (event)
1524 (let ((string icalendar-import-format)
1526 '(("%c" CLASS icalendar-import-format-class)
1527 ("%d" DESCRIPTION icalendar-import-format-description)
1528 ("%l" LOCATION icalendar-import-format-location)
1529 ("%o" ORGANIZER icalendar-import-format-organizer)
1530 ("%s" SUMMARY icalendar-import-format-summary)
1531 ("%t" STATUS icalendar-import-format-status)
1532 ("%u" URL icalendar-import-format-url))))
1533 ;; convert the specifiers in the format string
1537 (format (car (cddr i)))
1545 (symbol-value format)
1643 (format "......"))))
1671 (icalendar--format-ical-event e)))
1673 ;; add entry to diary and store actual name of diary
1676 (icalendar--add-diary-entry diary-string diary-file
1681 (format "%s\nCannot handle this event:%s"
1688 (setq error-string (format "%s\n%s\nCannot handle this event: %s"
1710 "Convert recurring icalendar event E to diary format.
1713 START-T is the event's start time in diary format.
1714 END-T is the event's end time in diary format."
1784 (format
1794 (format "%%%%(and (diary-cyclic %d %s))"
1804 (format
1820 (format
1830 (setq result (format
1841 (setq result (format
1850 (format
1865 (format
1873 (format
1888 (format
1903 "Convert non-recurring icalendar EVENT to diary format.
1909 (format "%%%%(and (diary-block %s %s))" start-d end-d))
1915 "Convert recurring icalendar EVENT to diary format.
1919 START-T is the event's start time in diary format.
1920 END-T is the event's end time in diary format."
1923 (format "%s %s-%s"
1928 (format "%s %s"
1933 (defun icalendar--add-diary-entry (string diary-file non-marking
1936 STRING must be a properly formatted valid diary entry. NON-MARKING
1939 entry. In this case the user will be asked whether he wants to insert
1940 the entry."
1942 (y-or-n-p (format "Add appointment for `%s' to diary? "
1946 (y-or-n-p (format "Make appointment non-marking? "))))
1951 ;; Note: make-diary-entry will add a trailing blank char.... :(
1952 (make-diary-entry string non-marking diary-file)))