From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44789 Path: main.gmane.org!not-for-mail From: Matthieu Moy Newsgroups: gmane.emacs.gnus.general Subject: [CODE] Adding a message to a nndiary group. Date: Fri, 10 May 2002 17:23:35 +0200 Organization: Verimag Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021044295 23306 127.0.0.1 (10 May 2002 15:24:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 10 May 2002 15:24:55 +0000 (UTC) Cc: didier@xemacs.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 176CGN-00063n-00 for ; Fri, 10 May 2002 17:24:55 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 176CFx-0003AA-00; Fri, 10 May 2002 10:24:29 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 10 May 2002 10:24:45 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA22142 for ; Fri, 10 May 2002 10:24:34 -0500 (CDT) Original-Received: (qmail 24779 invoked by alias); 10 May 2002 15:24:13 -0000 Original-Received: (qmail 24774 invoked from network); 10 May 2002 15:24:13 -0000 Original-Received: from imag.imag.fr (129.88.30.1) by gnus.org with SMTP; 10 May 2002 15:24:13 -0000 Original-Received: from montrose.imag.fr (root@montrose.imag.fr [129.88.43.123]) by imag.imag.fr (8.11.6/8.11.6) with ESMTP id g4AFNZk10874; Fri, 10 May 2002 17:23:38 +0200 (MEST) Original-Received: (from moy@localhost) by montrose.imag.fr (8.9.3/8.9+/ImagV2.feuille) id RAA02852; Fri, 10 May 2002 17:23:35 +0200 X-Authentication-Warning: montrose.imag.fr: moy set sender to Matthieu.Moy@imag.fr using -f Original-To: ding@gnus.org X-Face: %xEb27l:C~bcH,tGGRk8m'o_}XBMb*NoIbS$sp(:3s+l@PwMH+C*7Vf@Y_]%rP)*/'`Lpt[O9C;jbVo?Qp X-Url: http://www-verimag.imag.fr/~moy/ Mail-Copies-To: never Mail-Followup-To: ding@gnus.org, didier@xemacs.org Original-Lines: 59 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44789 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44789 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) )