From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/16830 Path: main.gmane.org!not-for-mail From: Manoj Srivastava Newsgroups: gmane.emacs.gnus.general Subject: Re: fortune on the end of .signature Date: 09 Sep 1998 11:05:37 -0500 Organization: Manoj Srivastava's Home Sender: owner-ding@hpc.uh.edu Message-ID: <87af4946ge.fsf@tiamat.datasync.com> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035155637 30102 80.91.224.250 (20 Oct 2002 23:13:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:13:57 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA28441 for ; Wed, 9 Sep 1998 12:09:28 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id KAF00149; Wed, 9 Sep 1998 10:40:12 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 09 Sep 1998 11:08:55 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id LAA27996 for ; Wed, 9 Sep 1998 11:08:45 -0500 (CDT) Original-Received: from tiamat.datasync.com (root@tiamat.datasync.com [206.96.246.252]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA28404 for ; Wed, 9 Sep 1998 12:08:36 -0400 (EDT) Original-Received: (from srivasta@localhost) by tiamat.datasync.com (8.9.1a/8.9.1/Debian/GNU) id LAA09172; Wed, 9 Sep 1998 11:05:37 -0500 X-Time: Wed Sep 9 11:05:27 1998 X-Mail-System: Vm 6.61 for GNU Emacs 19.34.1 Mail-Copies-To: never Original-To: Phil Humpherys In-Reply-To: Phil Humpherys's message of "08 Sep 1998 22:59:55 -0600" Original-Lines: 42 X-Mailer: Gnus v5.6.42/Emacs 19.34 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:16830 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:16830 Hi, >>"Phil" == Phil Humpherys writes: Phil> What's the lisp that I would use to have gnus append an Phil> invocation of the fortune program on the end of each article or Phil> email I send out? I use cookie.el (a standard emacs feature), which has the advantage of caching all the cookies (I have a superset of fortune in there) at startup; since I leave emacs up for weeks on end, this is not a problem. manoj ______________________________________________________________________ (defun mail-insert-cookie () "Adds a cookie to a newly formatted mail buffer." (interactive) (require 'cookie1) (save-excursion (goto-char (point-min)) (if (not (re-search-forward "^-- *$" (point-max) t)) (progn (message-insert-signature t) (goto-char (point-min)) (re-search-forward "^-- *$" (point-max) 'max) )) (newline 1) (cookie-insert "/usr/local/lib/cookie" 1 "start" "end") (kill-line) )) ;;; add cookie (add-hook 'mail-setup-hook 'mail-insert-cookie) (add-hook 'message-setup-hook 'mail-insert-cookie) ______________________________________________________________________ -- "The woman of my dreams knows how to break into systems." Doug Tygar Manoj Srivastava Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E