From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2514 Path: news.gmane.org!not-for-mail From: Andrew Markebo Newsgroups: gmane.emacs.gnus.user Subject: Re: randomsig.el and Random Signatures Date: Sun, 18 May 2003 08:07:06 GMT Organization: Telia Internet Message-ID: References: <87u1btouvk.fsf@cecilia.trollope.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138668919 15412 80.91.229.2 (31 Jan 2006 00:55:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:55:19 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:30:49 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!uninett.no!news.algonet.se!algonet!news-stob.telia.net!telia.net!217.209.241.173.MISMATCH!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:Lw0mtouW7E6j5Vln42yTmKneDyc= Original-NNTP-Posting-Host: 213.66.142.146 Original-X-Complaints-To: abuse@telia.com Original-X-Trace: newsc.telia.net 1053245226 213.66.142.146 (Sun, 18 May 2003 10:07:06 CEST) Original-NNTP-Posting-Date: Sun, 18 May 2003 10:07:06 CEST Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2654 Original-Lines: 26 X-Gnus-Article-Number: 2654 Tue Jan 17 17:30:49 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2514 Archived-At: Hi! Not really an answer to your question, but it is how I do random sigs.. (defvar grc-signature-dir "~/.sigs/") (defvar grc-signature-base "sig") (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)) )))) Here it randomly picks the contents of a file whose name begins with "sig" from the subdir "~/.sigs/".. /Andy -- Everything that was magical was just a way of describing the world in words it couldn't ignore. - "Pyramids" by Terry Pratchett