From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24075 Path: main.gmane.org!not-for-mail From: Bill White Newsgroups: gmane.emacs.gnus.general Subject: Re: Multiple signature files Date: 09 Jul 1999 13:44:24 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035161705 6756 80.91.224.250 (21 Oct 2002 00:55:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:55:05 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA24808 for ; Fri, 9 Jul 1999 14:44:44 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAB22320; Fri, 9 Jul 1999 13:44:40 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 09 Jul 1999 13:45:30 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA15026 for ; Fri, 9 Jul 1999 13:45:19 -0500 (CDT) Original-Received: from dragonfly.wolfram.com (root@dragonfly.wolfram.com [140.177.10.12]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA24788 for ; Fri, 9 Jul 1999 14:44:18 -0400 (EDT) Original-Received: from g.wolfram.com (billw@g.wolfram.com [140.177.4.48]) by dragonfly.wolfram.com (8.8.8/8.8.8) with ESMTP id NAA22469 for ; Fri, 9 Jul 1999 13:44:13 -0500 (CDT) Original-Received: (from billw@localhost) by g.wolfram.com (8.9.3/8.9.2) id NAA29413; Fri, 9 Jul 1999 13:44:24 -0500 Original-To: ding@gnus.org X-Liturgical-Date: Weekday -- Friday of the Fourteenth Week of Ordinary Time, A.D. 1999 In-Reply-To: Graham Todd's message of "Fri, 09 Jul 1999 17:58:36 GMT" Original-Lines: 166 User-Agent: Gnus/5.070092 (Pterodactyl Gnus v0.92) Emacs/20.3.11 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24075 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24075 In article , Graham Todd writes: gt> Having used e-mail packages in Emacs installations that have gt> been customised by others I'm not sure what is standard gt> behaviour. I seem to recall a similar feature but perhaps it gt> came from another package. gt> Is it possible to set up Gnus so that a standard signature is gt> inserted into messages but doing something like C-c C-w queries gt> for a signature file from a directory (and perhaps then removes gt> the standard .sig from the buffer and inserts the selected one gt> instead) ? I use a hacked version of Trey Jackson's sig-quote.el You could hack it further to do what you want. Here's my simple-minded hack to make it do what I want (query me for a quote type when I start a message, then produce random quotes from that quote type for my consideration): .gnus: ---------------------------------------------------------------------- (load-library "sig-quote") (setq message-signature '(sq-add-quote)) ---------------------------------------------------------------------- unified diff of my changes: ---------------------------------------------------------------------- --- sig-quote.el Thu Jun 24 12:11:50 1999 +++ sig-quote.orig.el Fri Jul 9 13:34:08 1999 @@ -627,7 +627,7 @@ (defun sq-send-without-quote (&optional prefix) "Send message and exit buffer without adding a quote." (interactive"P") -; (sq-assert-mode-on) + (sq-assert-mode-on) (if sq-quote-added-manually (sq-remove-quote)) (setq sq-quote-added-manually t) @@ -638,7 +638,7 @@ Non-nil optional argument causes email addresses to be ignored, and the user is prompted for a type of quote." (interactive) -; (sq-assert-mode-on) + (sq-assert-mode-on) (if (or (interactive-p) ignore-addresses (not sq-quote-added-manually)) @@ -663,7 +663,7 @@ "Remove the quote added after the signature. Optional argument NEW-QUOTE specifies what replaces the old quote." (interactive) -; (sq-assert-mode-on) + (sq-assert-mode-on) (and (interactive-p) (or (sq-valid-buffer-p) (error (format "Not in %s buffer." @@ -689,7 +689,7 @@ (defun sq-quote-types () "Display the types of quotes appropriate for this letter." (interactive) -; (sq-assert-mode-on) + (sq-assert-mode-on) (let ((type-string (sq-make-type-string (sq-generate-type-list (sq-header-addresses))))) (if type-string @@ -1130,33 +1130,24 @@ (addresses (sq-header-addresses))) ;; if no addresses - -; billw 24Jun99 - replacing this block with what I always choose. -; (if (and (not addresses) (not ignore-addresses)) -; (if (y-or-n-p -; "No email addresses to determine quote type! -- default to all? ") -; (setq type-list t)) -; (setq type-list (sq-generate-type-list addresses))) -; (setq type-list (sq-generate-type-list addresses)) + (if (and (not addresses) (not ignore-addresses)) + (if (y-or-n-p + "No email addresses to determine quote type! -- default to all? ") + (setq type-list t)) + (setq type-list (sq-generate-type-list addresses))) ;; if no common quote types amongst email addresses, ;; or if ignore-addresses -> chose a quote type - -; billw 24Jun99 - replacing block with what I always choose -; (if (or ignore-addresses -; (and (not type-list) -; sq-warn-if-no-quote -; (y-or-n-p -; "The email addresses have no common types, would you like to chose a type of quote? "))) -; (setq type-list (list (completing-read "Choose a quote type: " -; (mapcar 'list (sq-list-of-quote-types)) -; nil -; t))) -; (message nil)) - (setq type-list (list (completing-read "Choose a quote type: " - (mapcar 'list (sq-list-of-quote-types)) + (if (or ignore-addresses + (and (not type-list) + sq-warn-if-no-quote + (y-or-n-p +"The email addresses have no common types, would you like to chose a type of quote? "))) + (setq type-list (list (completing-read "Choose a quote type: " + (mapcar 'list (sq-list-of-quote-types)) nil t))) + (message nil)) (sq-filter-quotes (sq-list-of-quotes) type-list))) ---------------------------------------------------------------------- Part of my ~/.signature.quotes ---------------------------------------------------------------------- BEGIN QUOTE-TYPE: books -- Bill White . billw@wolfram.com . http://members.wri.com/billw "I always thought that Paradise would be a kind of library." -Jorge Luis Borges END QUOTE-TYPE BEGIN QUOTE-TYPE: me -- Bill White . billw@wolfram.com . http://members.wri.com/billw END QUOTE-TYPE BEGIN QUOTE-TYPE: poor -- Bill White . billw@wolfram.com . http://members.wri.com/billw "By experts in poverty I do not mean sociologists, but poor men." -G. K. Chesterton, Illustrated London News, 3/25/11 -----------------------------------------quote -- Bill White . billw@wolfram.com . http://members.wri.com/billw "If we want to give poor people soap we must set out deliberately to give them luxuries. If we will not make them rich enough to be clean, then empathically we must do what we did with the saints. We must reverence them for being dirty." -G. K. Chesterton, What's Wrong with the World -----------------------------------------quote -- Bill White . billw@wolfram.com . http://members.wri.com/billw "All but the hard hearted man must be torn with pity for this pathetic dilemma of the rich man, who has to keep the poor man just stout enough to do the work and just thin enough to have to do it." -G. K. Chesterton, Utopia of Usurers, 1917 -----------------------------------------quote -- Bill White . billw@wolfram.com . http://members.wri.com/billw "Only poor men get hanged." -G. K. Chesterton, Illustrated London News, 7/17/09 END QUOTE-TYPE ---------------------------------------------------------------------- enjoy - bw -- Bill White . billw@wolfram.com . http://members.wri.com/billw "Some people leave money for the improvement of public buildings. I can leave dynamite for the improvement of public buildings." -G. K. Chesterton, Illustrated London News, 3-17-06