Gnus development mailing list
 help / color / mirror / Atom feed
From: Bill White <billw@wolfram.com>
Subject: Re: Multiple signature files
Date: 09 Jul 1999 13:44:24 -0500	[thread overview]
Message-ID: <ruoyagpwtmf.fsf@g.wolfram.com> (raw)
In-Reply-To: Graham Todd's message of "Fri, 09 Jul 1999 17:58:36 GMT"

In article <x6lncphf8z.fsf@ninga.ellerbeck.org>, Graham Todd <gtodd@yorku.ca> 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
<url:http://bmrc.berkeley.edu/~trey/emacs/sig-quote.html>

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


  reply	other threads:[~1999-07-09 18:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-09 17:58 Graham Todd
1999-07-09 18:44 ` Bill White [this message]
1999-07-10 18:28 ` Jack Vinson
1999-07-09 19:12   ` Graham Todd
1999-07-09 19:38     ` Lars Magne Ingebrigtsen
1999-07-09 19:45       ` François Pinard

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=ruoyagpwtmf.fsf@g.wolfram.com \
    --to=billw@wolfram.com \
    /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).