Gnus development mailing list
 help / color / mirror / Atom feed
From: albert+gnus@zeitkraut.de
To: ding@gnus.org
Subject: [PATCH 2/2] gnus.texi (Posting Styles): Document string replacement when matching against headers
Date: Fri, 18 Jul 2014 09:29:43 +0200	[thread overview]
Message-ID: <1405668583-14462-2-git-send-email-albert+gnus@zeitkraut.de> (raw)
In-Reply-To: <1405668583-14462-1-git-send-email-albert+gnus@zeitkraut.de>

From: Albert Krewinkel <albert@zeitkraut.de>

---
 texi/ChangeLog |  5 +++++
 texi/gnus.texi | 14 ++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/texi/ChangeLog b/texi/ChangeLog
index 530ff58..0666dfd 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-18  Albert Krewinkel  <albert+gnus@zeitkraut.de>
+
+	* gnus.texi (Posting Styles): Document the possibility to perform
+	string replacements when matching against headers.
+
 2014-06-11  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* Makefile.in (.texi, makeinfo): Don't split info files.
diff --git a/texi/gnus.texi b/texi/gnus.texi
index 9165112..9601a53 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -12813,10 +12813,12 @@ variable, which is a vector of the following headers: number subject
 from date id references chars lines xref extra.
 
 In the case of a string value, if the @code{match} is a regular
-expression, a @samp{gnus-match-substitute-replacement} is proceed on
-the value to replace the positional parameters @samp{\@var{n}} by the
-corresponding parenthetical matches (see @xref{Replacing Match,,
-Replacing the Text that Matched, elisp, The Emacs Lisp Reference Manual}.)
+expression, or if it takes the form @code{(header @var{match}
+@var{regexp})}, a @samp{gnus-match-substitute-replacement} is proceed
+on the value to replace the positional parameters @samp{\@var{n}} by
+the corresponding parenthetical matches (see @xref{Replacing Match,,
+Replacing the Text that Matched, elisp, The Emacs Lisp Reference
+Manual}.)
 
 @vindex message-reply-headers
 
@@ -12848,6 +12850,10 @@ So here's a new example:
         ;; @r{If I'm replying to Larsi, set the Organization header.}
         ((header "from" "larsi.*org")
          (Organization "Somewhere, Inc."))
+        ;; @r{Reply to a message from the same subaddress the message}
+        ;; @r{was sent to.}
+        ((header "x-original-to" "me\\(\\+.+\\)@@example.org")
+         (address "me\\1@@example.org"))
         ((posting-from-work-p) ;; @r{A user defined function}
          (signature-file "~/.work-signature")
          (address "user@@bar.foo")
-- 
2.0.1




  reply	other threads:[~2014-07-18  7:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 13:26 [PATCH] gnus-msg.el (gnus-configure-posting-style): Allow string replacement when matching headers albert+gnus
2014-07-17 15:58 ` Andreas Schwab
2014-07-17 23:47 ` Katsumi Yamaoka
2014-07-18  5:03   ` Albert Krewinkel
2014-07-18  7:29   ` [PATCH 1/2] " albert+gnus
2014-07-18  7:29     ` albert+gnus [this message]
2014-07-18  8:20       ` [PATCH 2/2] gnus.texi (Posting Styles): Document string replacement when matching against headers Katsumi Yamaoka

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=1405668583-14462-2-git-send-email-albert+gnus@zeitkraut.de \
    --to=albert+gnus@zeitkraut.de \
    --cc=ding@gnus.org \
    /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).