Gnus development mailing list
 help / color / mirror / Atom feed
From: Jack Vinson <jvinson@cheux.ecs.umass.edu>
Subject: Gnus Advice (was: stand-alone version of MH's rcvstore?)
Date: 15 Aug 1996 17:07:29 -0400	[thread overview]
Message-ID: <woafvwbbla.fsf_-_@cheux.ecs.umass.edu> (raw)
In-Reply-To: Paul Franklin's message of 15 Aug 1996 11:49:12 -0700

>>>>> "PF" == Paul Franklin <paul@transmeta.com> writes:

PF> In general, I think it'd be nice to have a few experts on using advice
PF> with gnus to achieve such things.  Then we just need an archive of
PF> useful advice snippets.

(I'll assume that was supposed to be "excerpts.")

I have used advice for a variety of things that frequently end up getting
made into functions/variables in Gnus.  However, one of my favorite pieces
of advice is one that changes the name of the signature file whenever I
insert the file into a document.  

;; random insertion of .signature file
;; Thanks to Glenn R Coombs: glenn@prl.philips.co.uk
(defvar grc-signature-dir   "~/.sig/" "Location of random signatures.")
(defvar grc-signature-base  "sig" "Beginning of all the random signatures.")

(defadvice message-insert-signature (before random-mail-sig-ag act comp)
  "Change the value of message-signature-file each time 
`message-insert-signature' is called."
  (let ((files (file-name-all-completions
                grc-signature-base (expand-file-name grc-signature-dir))))
    (if files (let ((file (nth (random (length files)) files)))
		(setq message-signature-file (concat grc-signature-dir file))
		))))


And another that plays with message.  

(defadvice message-resend (around gnus-inews-news-advice act comp)
  "Turn off ispell-message when re-routing mail.  It is inappropriate to 
spell check someone else's message."
  (let ((mail-send-hook (remove 'ispell-message mail-send-hook))
	)
    ad-do-it
    ))



-- 
   (      "Mmmmmm - coffee"               (   
   ))     Jack Vinson                     ))  
 C|~~|    jvinson@cheux.ecs.umass.edu   C|~~| 
  `--'                                   `--' 


      reply	other threads:[~1996-08-15 21:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-12 14:43 stand-alone version of MH's rcvstore? (using Gnus' one-message-per-file folders without full MH package) Jim Meyering
1996-08-12 15:20 ` Ulrich Drepper
1996-08-12 18:05   ` Lance A. Brown
1996-08-15  9:18 ` Kai Grossjohann
1996-08-15 12:37   ` David S. Goldberg
1996-08-15 15:49     ` Lars Magne Ingebrigtsen
1996-08-15 18:49       ` Paul Franklin
1996-08-15 21:07         ` Jack Vinson [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=woafvwbbla.fsf_-_@cheux.ecs.umass.edu \
    --to=jvinson@cheux.ecs.umass.edu \
    /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).