Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+from-uce@imap.cc>
Subject: Re: Concat signatures.
Date: Fri, 11 Feb 2005 14:49:13 +0100	[thread overview]
Message-ID: <v9is4zfbqe.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <m2acqb45w5.fsf@spam.fr>

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	other threads:[~2005-02-11 13:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 12:50 François LAGARDE
2005-02-11 13:49 ` Reiner Steib [this message]

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=v9is4zfbqe.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+from-uce@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /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).