Gnus development mailing list
 help / color / mirror / Atom feed
* [CODE] Adding a message to a nndiary group.
@ 2002-05-10 15:23 Matthieu Moy
  2002-05-14  9:56 ` Didier Verna
  2003-03-23 21:00 ` spam.el and bogofilter Jody Klymak
  0 siblings, 2 replies; 18+ messages in thread
From: Matthieu Moy @ 2002-05-10 15:23 UTC (permalink / raw)
  Cc: didier

Hi ! 

Here's a function to resend a message to a nndiary group. 

Typical  example  :  I  recieve  a  message from  xxx,  giving  me  an
appointment at 12 o'clock on May 24. 

While reading  the message,  I call this  function, which opens  a new
buffer with  this message, and all  the nndiary headers  ready. I give
the date  and time in  the headers, C-c  C-c, and the message  will go
into my diary.

This was in my opinion a cruelly missing feature in nndiary, except if
I missed something?

I've bound it to S D d, but  I'm not sure it's a good idea to use this
shortcut, for people who don't use nndiary. 

(define-key gnus-send-bounce-map
  "d" 'moy-gnus-summary-resend-message-to-diary
  )

-- 
Matthieu



(defvar nndiary-default-group-name "diary"
  "Name of the nndiary group to post to by default")

(defun moy-gnus-summary-resend-message-to-diary ()
  "Send current message to the group `nndiary-default-group-name'.
Typical example : I recieve a message from a friend, giving me an
appointment at 12 o'clock on May 24.

While reading the message, I call this function, which opens a new
buffer with this message, and all the nndiary headers ready. I give
the date and time in the headers, C-c C-c, and the message will go
into my diary, and come back to remind me on time."
  (interactive)
  (gnus-summary-resend-message-edit)
  (message-narrow-to-headers)
  (message-remove-header "^To:\\|^Cc:\\|^Bcc:" t)
  (insert (concat "Newsgroups: " nndiary-default-group-name "\n"))
  (insert "X-Diary-Minute: *
X-Diary-Hour: *
X-Diary-Dom: *
X-Diary-Month: *
X-Diary-Year: *
X-Diary-Dow: *
X-Diary-Time-Zone: *
")
  (re-search-backward "^X-Diary-Minute: ")
  (end-of-line)
  (widen)
  (setq gnus-newsgroup-name (concat "nndiary:" nndiary-default-group-name))
  (gnus-setup-message 'message)
  )




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

end of thread, other threads:[~2003-03-25 15:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-10 15:23 [CODE] Adding a message to a nndiary group Matthieu Moy
2002-05-14  9:56 ` Didier Verna
2002-05-14 12:06   ` Matthieu Moy
2002-05-14 12:21     ` Didier Verna
2002-05-14 12:47       ` Matthieu Moy
2002-05-14 12:57         ` Didier Verna
2002-05-14 13:30           ` Matthieu Moy
2002-05-14 16:45           ` Andreas Fuchs
2003-03-23 21:00 ` spam.el and bogofilter Jody Klymak
2003-03-23 23:03   ` Ted Zlatanov
2003-03-23 23:45     ` Jody Klymak
2003-03-24 15:07       ` Ted Zlatanov
2003-03-24 16:09         ` Jody Klymak
2003-03-24 19:24           ` Ted Zlatanov
2003-03-24 19:53             ` Jody Klymak
2003-03-25  8:18               ` Make.bat and info files (was: spam.el and bogofilter.) Frank Schmitt
2003-03-25 15:13                 ` Jody Klymak
2003-03-25 15:47                   ` Make.bat and info files Frank Schmitt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).