info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concat signatures.


From: Reiner Steib
Subject: Re: Concat signatures.
Date: Fri, 11 Feb 2005 14:49:13 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

On Fri, Feb 11 2005, François LAGARDE wrote:

> I would like to concat differents signature-file in my
> posting-style. Ideally I would lile something like that:
> (setq gnus-posting-styles
>        '((".*"
>          (signature (concat "my_first_file" "my_second_file")))
>          (".*afield.*"
>          (signature (concat "my_first_file" "my_third_file")))
>          )
> )
>
> Any idea.

(defun rs-gnus-signature-files-to-string (&rest files)
  "Concat FILES and return a string."
  (with-temp-buffer
    (dolist (f files)
      (insert-file-contents f))
    ;; Borrowed from `gnus-configure-posting-styles':
    (buffer-substring (point-min)
                      (progn
                        (goto-char (point-max))
                        (if (zerop (skip-chars-backward "\n"))
                            (point)
                          (1+ (point)))))))

(setq gnus-posting-styles
      `((".*"
         (signature ,(rs-gnus-signature-files-to-string
                      "my_first_file" "my_second_file")))
        (".*test.*"
         (signature ,(rs-gnus-signature-files-to-string
                      "my_first_file" "my_third_file")))))

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]