Mercurial > hg > xemacs
comparison diary.el @ 81:0020df783e55
try to get diary mail destination handling sorted
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Thu, 02 Jul 2026 10:08:21 +0100 |
| parents | 800f0f595127 |
| children |
comparison
equal
deleted
inserted
replaced
| 75:0508101db40f | 81:0020df783e55 |
|---|---|
| 225 article) | 225 article) |
| 226 (when (and (not no-edit) | 226 (when (and (not no-edit) |
| 227 (/= (length articles) 1)) | 227 (/= (length articles) 1)) |
| 228 (error "Editting multiple articles for diary not implemented yet")) | 228 (error "Editting multiple articles for diary not implemented yet")) |
| 229 (while (setq article (pop articles)) | 229 (while (setq article (pop articles)) |
| 230 (gnus-edit-and-move-to-diary_1 no-delete no-edit) | |
| 231 (when (memq article gnus-newsgroup-processable) | 230 (when (memq article gnus-newsgroup-processable) |
| 232 (gnus-summary-remove-process-mark article))) | 231 ;; do this first, because otherwise a digest is created |
| 232 (gnus-summary-remove-process-mark article)) | |
| 233 (gnus-edit-and-move-to-diary_1 no-delete no-edit)) | |
| 233 (if (and no-edit (not (gnus-summary-next-unread-article))) | 234 (if (and no-edit (not (gnus-summary-next-unread-article))) |
| 234 (gnus-summary-exit))) | 235 (gnus-summary-exit))) |
| 235 )) | 236 )) |
| 236 | 237 |
| 237 (defun gnus-edit-and-move-to-diary_1 (no-delete no-edit) | 238 (defun gnus-edit-and-move-to-diary_1 (no-delete no-edit) |
| 246 (unless (eq (gnus-summary-article-number) | 247 (unless (eq (gnus-summary-article-number) |
| 247 gnus-current-article) | 248 gnus-current-article) |
| 248 (gnus-summary-select-article t)) | 249 (gnus-summary-select-article t)) |
| 249 (gnus-article-date-original) | 250 (gnus-article-date-original) |
| 250 (message "About to forward. . .") | 251 (message "About to forward. . .") |
| 251 (gnus-summary-mail-forward 1) | 252 (let ((gnus-newsgroup-processable nil) ; prevent digest if |
| 253 ) | |
| 254 (gnus-summary-mail-forward 1)) | |
| 252 (message "Begin forward. . .") | 255 (message "Begin forward. . .") |
| 253 (goto-char (point-min)) | 256 (goto-char (point-min)) |
| 254 (re-search-forward "^To: " nil t) | 257 (re-search-forward "^To: " nil t) |
| 255 ;(forward-char 4) | 258 ;(forward-char 4) |
| 256 (insert "htcalendar@markup.co.uk") | 259 (insert "htcalendar@markup.co.uk") |
| 276 (save-excursion | 279 (save-excursion |
| 277 (goto-char (point-min)) | 280 (goto-char (point-min)) |
| 278 (setq sublp (search-forward "Subject: " nil t)) | 281 (setq sublp (search-forward "Subject: " nil t)) |
| 279 (delete-region (point)(progn (search-forward "] " nil t))) | 282 (delete-region (point)(progn (search-forward "] " nil t))) |
| 280 (if (not | 283 (if (not |
| 281 (looking-at "[123]?[0-9] [JFMASOND][a-z][a-z] (20)?[2-9][0-9] ")) | 284 (looking-at "[123]?[0-9] [JFMASOND][a-z][a-z] \\(20\\)?[2-9][0-9] ")) |
| 282 (save-excursion | 285 (save-excursion ; this is broken! |
| 283 (let ((try-date | 286 (let ((try-date |
| 284 (and | 287 (and |
| 285 (or (re-search-forward "^\r?$" nil 1) t) | 288 (or (re-search-forward "^\r?$" nil 1) t) |
| 286 (re-search-forward | 289 (re-search-forward |
| 287 "[0-9][-0-9 ]*[- ][jfmasondJFMASOND][a-zA-Z]*[- 0-9]*" | 290 "[0-9][-0-9 ]*[- ][jfmasondJFMASOND][a-zA-Z]*[- 0-9]*" |
| 612 (insert "DTSTAMP:")(insert | 615 (insert "DTSTAMP:")(insert |
| 613 (my-time-iso8601 (current-time))) | 616 (my-time-iso8601 (current-time))) |
| 614 (insert "Z\n") | 617 (insert "Z\n") |
| 615 (insert "DTSTART:")(insert start)(insert "Z\n") | 618 (insert "DTSTART:")(insert start)(insert "Z\n") |
| 616 (insert "DTEND:")(insert end)(insert "Z\n") | 619 (insert "DTEND:")(insert end)(insert "Z\n") |
| 617 (insert "SUMMARY:")(insert-encoded-maybe summary)(insert "\n") | 620 (insert "SUMMARY")(insert-encoded-maybe summary)(insert "\n") |
| 618 (insert "DESCRIPTION")(insert-folded description) | 621 (insert "DESCRIPTION")(insert-folded description) |
| 619 ; (insert "LOCATION")(insert-encoded-maybe location)(insert "\n") | 622 (insert "LOCATION")(insert-encoded-maybe location)(insert "\n") |
| 620 ;(insert "ORGANIZER")(insert-encoded-maybe org) | 623 ;(insert "ORGANIZER")(insert-encoded-maybe org) |
| 621 ; (insert org) | 624 ; (insert org) |
| 622 ; (insert "\n") | 625 ; (insert "\n") |
| 623 ; (insert "BEGIN:VALARM\nTRIGGER:-PT15M\nACTION:DISPLAY\nDESCRIPTION:Reminder\nEND:VALARM\n") | 626 ; (insert "BEGIN:VALARM\nTRIGGER:-PT15M\nACTION:DISPLAY\nDESCRIPTION:Reminder\nEND:VALARM\n") |
| 624 ; (insert "BEGIN:VALARM\nTRIGGER:-PT15M\nACTION:AUDIO\nDESCRIPTION:Reminder\nEND:VALARM\n") | 627 ; (insert "BEGIN:VALARM\nTRIGGER:-PT15M\nACTION:AUDIO\nDESCRIPTION:Reminder\nEND:VALARM\n") |
| 637 beg | 640 beg |
| 638 (point) | 641 (point) |
| 639 t | 642 t |
| 640 "^\000-\007\n\013\015-\037\200-\377=")) | 643 "^\000-\007\n\013\015-\037\200-\377=")) |
| 641 (goto-char (point-max))) | 644 (goto-char (point-max))) |
| 642 (insert "\n :") | 645 (insert ":") |
| 643 (insert string))) | 646 (insert string))) |
| 644 | 647 |
| 645 (defun insert-folded (string) | 648 (defun insert-folded (string) |
| 646 (insert "\n :") | 649 (insert "\n :") |
| 647 (let ((beg (point))) | 650 (let ((beg (point))) |
| 648 (insert string) | 651 (insert string) |
