Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Giacomo Boffi <giacomo.boffi@polimi.it>
Subject: TINY signature randomizer
Date: Thu, 20 Apr 2006 17:54:13 +0200	[thread overview]
Message-ID: <n9mzmig6y56.fsf@boffi95.stru.polimi.it> (raw)

;; At present, it works with a "~/.signature" file, where (possibly
;; multiline) stuff is separated by a line containing ONLY a "%"
;;
;; Change the filename in expand-file-name and the separator in
;; split-string below as you feel appropriate, and drop in your
;; "~/.gnus"
;;
(defun sig_rand ()
  (with-temp-buffer
    (insert-file-contents-literally (expand-file-name "~/.signature"))
    (let ((lista (split-string (buffer-string (current-buffer)) "\n%\n")))
      (elt lista (random (length lista))))))
(setq message-signature 'sig_rand)
-- 
sapete contare fino a venticinque?
Olimpia Milano Jugoplastika Split Partizan Beograd
Roberto Premier Duska Ivanovic Zarko Paspalj

             reply	other threads:[~2006-04-20 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 15:54 Giacomo Boffi [this message]
2006-05-05 10:24 ` Giacomo Boffi

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=n9mzmig6y56.fsf@boffi95.stru.polimi.it \
    --to=giacomo.boffi@polimi.it \
    /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).