From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38603 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: [ANNOUNCE] NNDiary, a diary backend for Gnus. Date: Tue, 04 Sep 2001 18:37:50 +0200 Message-ID: References: <66azf0m8.fsf@oce.orst.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174440 23392 80.91.224.250 (21 Oct 2002 04:27:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:20 +0000 (UTC) Cc: Gnus Beta Testers Return-Path: Return-Path: Original-Received: (qmail 20353 invoked from network); 4 Sep 2001 16:38:20 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 4 Sep 2001 16:38:20 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien.cs.uni-dortmund.de [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id SAA17045; Tue, 4 Sep 2001 18:37:51 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id SAA08970; Tue, 4 Sep 2001 18:37:51 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 0D21120B0; Tue, 4 Sep 2001 18:37:50 +0200 (CEST) Original-To: Jody Klymak In-Reply-To: <66azf0m8.fsf@oce.orst.edu> (Jody Klymak's message of "Tue, 04 Sep 2001 08:15:43 -0700") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 Original-Lines: 33 Xref: main.gmane.org gmane.emacs.gnus.general:38603 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38603 Jody Klymak writes: > (defun gnus-diary-add-header () > "Add nndiary compatible headers to the current buffer" > (interactive "*") > ; Add an nndiary compatible header to a message > (save-excursion > (save-restriction > (goto-char (point-min)) > (cond ((re-search-forward "^Subject: " nil t) > (goto-line (+ 1 (line-number))) > (let* ((heads nndiary-headers)) > (while heads > (setq head (car heads)) > (setq heads (cdr heads)) > (insert (format "X-Diary-%s: *\n" (car head)))))) > (t (message "Not a mail message"))) > ))) May I humbly suggest the following as an alternative to inserting the headers? (unless (eq major-mode 'message-mode) (error "Not a mail message")) (mapcar (lambda (head) (message-add-header "X-Diary-%s: *" (car head))) nndiary-headers) What do you think? kai -- Symbol's function definition is void: signature