From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/10088 Path: main.gmane.org!not-for-mail From: "St. Suika Roberts" Newsgroups: gmane.emacs.gnus.general Subject: Re: letting message-signature-file be a function Date: Wed, 5 Mar 1997 08:40:08 -0600 Message-ID: <199703051440.IAA22666@rs5.tcs.tulane.edu> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035150015 22318 80.91.224.250 (20 Oct 2002 21:40:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:40:15 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id GAA14597 for ; Wed, 5 Mar 1997 06:59:47 -0800 Original-Received: from rs5.tcs.tulane.edu (rs5.tcs.tulane.edu [129.81.224.56]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Wed, 5 Mar 1997 15:39:47 +0100 Original-Received: (wrobert2@localhost) by rs5.tcs.tulane.edu (8.6.12/8.5) id IAA22666; Wed, 5 Mar 1997 08:40:08 -0600 Original-To: ding@ifi.uio.no Xref: main.gmane.org gmane.emacs.gnus.general:10088 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:10088 > It would be nice if the content of message-signature-file could be a > function that could evaluate to the signature file name. IWBNI the documentation also mentioned that one needs to set message-signature-file to nil if one wants to have message-signature be a function. It took me longer than I thought it should to figure out that that was why I was getting double signatures when I first set message-signature to call my sigrandomizer and insert the text instead of changing the contents of ~/.signature (which speeded things up a little bit). (also it might be nice to have either an example function in the documentation, and/or a function & variable so that one can specify just the function to be inserted, and not worry about inserting the ^-- \n ) (defun sig () "call sigrnd" (interactive) (goto-char (point-max)) ;; Insert the signature. (unless (bolp) (insert "\n")) (insert "\n-- \n") (call-process "sigrnd" nil t) ;; have this line be an if, and when one ;; has the varible set, use the specified ;; function, else use ;; message-signature-file (goto-char (point-max)) (or (bolp) (insert "\n"))) (in case you can't tell, this is the message-signature-file insertion function, hacked a bit, and I just coppied it out of my .emacs, so I haven't tried the above modification) Thanks, Suika -- wrobert2@mailhost.tcs.tulane.edu "Amazing what caffeine and no sense of self-preservation can do..." lists