Gnus development mailing list
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: didier@xemacs.org
Subject: [CODE] Adding a message to a nndiary group.
Date: Fri, 10 May 2002 17:23:35 +0200	[thread overview]
Message-ID: <vpqd6w4vxfs.fsf@montrose.imag.fr> (raw)

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)
  )




             reply	other threads:[~2002-05-10 15:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-10 15:23 Matthieu Moy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqd6w4vxfs.fsf@montrose.imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=didier@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).