* fortune on the end of .signature
@ 1998-09-09 4:59 Phil Humpherys
1998-09-09 5:42 ` Kees de Bruin
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Phil Humpherys @ 1998-09-09 4:59 UTC (permalink / raw)
What's the lisp that I would use to have gnus append an
invocation of the fortune program on the end of each article or
email I send out?
--
Phil Humpherys <phumpherys@utah-inter.net> DriverSoft
Unix Systems Administrator Mobile: +1.801.725.3257
WWW/PGPkeys: http://www.spire.com/~humphery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fortune on the end of .signature
1998-09-09 4:59 fortune on the end of .signature Phil Humpherys
@ 1998-09-09 5:42 ` Kees de Bruin
1998-09-09 7:44 ` Kai Grossjohann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kees de Bruin @ 1998-09-09 5:42 UTC (permalink / raw)
Cc: ding
Phil Humpherys writes:
> What's the lisp that I would use to have gnus append an
> invocation of the fortune program on the end of each article or
> email I send out?
The quote within the square brackets at the end of my signature is randomly
generated from a file with quotes using the following setup:
(setq message-signature-file (expand-file-name "~/.signature")
message-signature 'kdb/gnus-select-signature
)
(defun kdb/gnus-select-signature ()
(interactive)
(kdb/generate-signature)
t)
(defun kdb/generate-signature ()
(interactive)
;; stuff to generate your signature is ~/.signature
)
All you have to do is create the function `kdb/generate-signature' to
generate a proper ~/.signature file.
--
Kees de Bruin Software Engineer
---------------------------------------------------------------------------
E-mail: kees_de_bruin@tasking.com Tasking Software BV
Voice: +31-33-455 85 84 Plotterweg 31
Fax: +31-33-455 00 03 3821 BB Amersfoort
WWW: http://www.tasking.com The Netherlands
---[ A hen is only an egg's way of making another egg -- Samuel Butler ]---
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fortune on the end of .signature
1998-09-09 4:59 fortune on the end of .signature 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
3 siblings, 0 replies; 5+ messages in thread
From: Kai Grossjohann @ 1998-09-09 7:44 UTC (permalink / raw)
Cc: ding
>>>>> On 08 Sep 1998, Phil Humpherys said:
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
Phil> or email I send out?
Untested:
(defun my-message-do-fortune ()
(save-excursion
(message-goto-signature)
(forward-line 3) ; change this according to length of sig!
(call-process "/usr/bin/fortune" nil t nil)))
(add-hook 'message-setup-hook 'my-message-do-fortune)
kai
--
OOP: object oriented programming; OOPS: object oriented mistakes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fortune on the end of .signature
1998-09-09 4:59 fortune on the end of .signature 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
3 siblings, 0 replies; 5+ messages in thread
From: Vladimir Volovich @ 1998-09-09 12:44 UTC (permalink / raw)
"PH" == Phil Humpherys writes:
PH> What's the lisp that I would use to have gnus append an
PH> invocation of the fortune program on the end of each article or
PH> email I send out?
I'm using the following one:
(setq message-signature
'(lambda ()
(goto-char (point-max))
(insert "\n\tBest regards, -- Vladimir.\n-- \n")
(goto-char (point-max))
(call-process "/usr/games/fortune" nil t nil "-s")))
Best regards, -- Vladimir.
--
Please help keep the world clean: others may wish to use it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fortune on the end of .signature
1998-09-09 4:59 fortune on the end of .signature Phil Humpherys
` (2 preceding siblings ...)
1998-09-09 12:44 ` Vladimir Volovich
@ 1998-09-09 16:05 ` Manoj Srivastava
3 siblings, 0 replies; 5+ messages in thread
From: Manoj Srivastava @ 1998-09-09 16:05 UTC (permalink / raw)
Cc: ding
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-09-09 16:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-09 4:59 fortune on the end of .signature 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 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).