diff 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
line wrap: on
line diff
--- a/diary.el	Mon Jun 09 13:40:01 2025 +0100
+++ b/diary.el	Thu Jul 02 10:08:21 2026 +0100
@@ -227,9 +227,10 @@
 		 (/= (length articles) 1))
 	(error "Editting multiple articles for diary not implemented yet"))
       (while (setq article (pop articles))
-	(gnus-edit-and-move-to-diary_1 no-delete no-edit)
 	(when (memq article gnus-newsgroup-processable)
-	  (gnus-summary-remove-process-mark article)))
+	  ;; do this first, because otherwise a digest is created
+	  (gnus-summary-remove-process-mark article))
+	(gnus-edit-and-move-to-diary_1 no-delete no-edit))
       (if (and no-edit (not (gnus-summary-next-unread-article)))
 	  (gnus-summary-exit)))
     ))
@@ -248,7 +249,9 @@
       (gnus-summary-select-article t))
     (gnus-article-date-original)
     (message "About to forward. . .")
-    (gnus-summary-mail-forward 1)
+    (let ((gnus-newsgroup-processable nil) ; prevent digest if 
+	  )
+      (gnus-summary-mail-forward 1))
     (message "Begin forward. . .")
     (goto-char (point-min))
     (re-search-forward "^To: " nil t)
@@ -278,8 +281,8 @@
 	(setq sublp (search-forward "Subject: " nil t))
 	(delete-region (point)(progn (search-forward "] " nil t)))
 	(if (not
-	     (looking-at "[123]?[0-9] [JFMASOND][a-z][a-z] (20)?[2-9][0-9] "))
-	    (save-excursion
+	     (looking-at "[123]?[0-9] [JFMASOND][a-z][a-z] \\(20\\)?[2-9][0-9] "))
+	    (save-excursion		; this is broken!
 	      (let ((try-date
 		     (and
 		      (or (re-search-forward "^\r?$" nil 1) t)
@@ -614,9 +617,9 @@
       (insert "Z\n")
       (insert "DTSTART:")(insert start)(insert "Z\n")
       (insert "DTEND:")(insert end)(insert "Z\n")
-      (insert "SUMMARY:")(insert-encoded-maybe summary)(insert "\n")
+      (insert "SUMMARY")(insert-encoded-maybe summary)(insert "\n")
       (insert "DESCRIPTION")(insert-folded description)
-;      (insert "LOCATION")(insert-encoded-maybe location)(insert "\n")
+      (insert "LOCATION")(insert-encoded-maybe location)(insert "\n")
       ;(insert "ORGANIZER")(insert-encoded-maybe org)
 ;      (insert org)
 ;      (insert "\n")
@@ -639,8 +642,8 @@
 	   t
 	   "^\000-\007\n\013\015-\037\200-\377="))
 	(goto-char (point-max)))
-	(insert "\n :")
-	(insert string)))
+    (insert ":")
+    (insert string)))
 
 (defun insert-folded (string)
   (insert "\n :")