Gnus development mailing list
 help / color / mirror / Atom feed
From: Manoj Srivastava <srivasta@datasync.com>
Cc: ding@gnus.org
Subject: Re: fortune on the end of .signature
Date: 09 Sep 1998 11:05:37 -0500	[thread overview]
Message-ID: <87af4946ge.fsf@tiamat.datasync.com> (raw)
In-Reply-To: Phil Humpherys's message of "08 Sep 1998 22:59:55 -0600"

Hi,
>>"Phil" == Phil Humpherys <phumpherys@utah-inter.net> 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  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


      parent reply	other threads:[~1998-09-09 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-09  4:59 Phil Humpherys
1998-09-09  5:42 ` Kees de Bruin
1998-09-09  7:44 ` Kai Grossjohann
1998-09-09 12:44 ` Vladimir Volovich
1998-09-09 16:05 ` Manoj Srivastava [this message]

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=87af4946ge.fsf@tiamat.datasync.com \
    --to=srivasta@datasync.com \
    --cc=ding@gnus.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).