From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84690 Path: news.gmane.org!not-for-mail From: albert+gnus@zeitkraut.de Newsgroups: gmane.emacs.gnus.general Subject: [PATCH 2/2] gnus.texi (Posting Styles): Document string replacement when matching against headers Date: Fri, 18 Jul 2014 09:29:43 +0200 Message-ID: <1405668583-14462-2-git-send-email-albert+gnus@zeitkraut.de> References: <1405668583-14462-1-git-send-email-albert+gnus@zeitkraut.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405668676 32211 80.91.229.3 (18 Jul 2014 07:31:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2014 07:31:16 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32934@lists.math.uh.edu Fri Jul 18 09:31:10 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X82dK-0001Hj-1t for ding-account@gmane.org; Fri, 18 Jul 2014 09:31:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1X82ch-0004H3-Rc; Fri, 18 Jul 2014 02:30:31 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1X82ce-0004Gg-AE for ding@lists.math.uh.edu; Fri, 18 Jul 2014 02:30:28 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1X82cc-0001Wv-S7 for ding@lists.math.uh.edu; Fri, 18 Jul 2014 02:30:28 -0500 Original-Received: from reynholm.zeitkraut.de ([89.238.65.123]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1X82cb-0000OQ-1V for ding@gnus.org; Fri, 18 Jul 2014 09:30:25 +0200 Original-Received: by reynholm.zeitkraut.de (Postfix, from userid 106) id 0DEBE2CA610C; Fri, 18 Jul 2014 07:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zeitkraut.de; s=mail; t=1405668652; bh=nkg8HfkMIGytRIMGw0O+pMEWPdHJcvwUB3eqLNJdtms=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cdm3byIiE23eEDlEOGF61atjYpwl+mkozmMkFRkQJ66lDo262BPhqmC5mof8rqP1M 8z/xl1d88pB127+y+DLdwpBJWxfYajceFeLwfWfpKbx/f/q94VXQaSyvQw1nYyjNoU xUUNBgmr5IsfOiTPRngG9gfjKJcokataJuh4IZWY= X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on reynholm.zeitkraut.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 Original-Received: from espresso.fritz.box (dslb-188-108-215-252.pools.arcor-ip.net [188.108.215.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by reynholm.zeitkraut.de (Postfix) with ESMTPSA id 7B4C32CA610B for ; Fri, 18 Jul 2014 07:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zeitkraut.de; s=mail; t=1405668650; bh=nkg8HfkMIGytRIMGw0O+pMEWPdHJcvwUB3eqLNJdtms=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RhsLIUoamiIIUnlzqBAa/vyY7ZJcjBR3sO61hrWERuGIFxvbQzL+o5/3nnMF3nezU 2l9fDXxqgbYhGzV7MAzcllqXgxZ1HfoLP6XpWEPMCMDkg3kKO3NM3d1a3Sw9rgtmwd xmlmTZoi/SqDfObjBjcy861v3muyzKKJNu4NXPm0= X-Mailer: git-send-email 2.0.1 In-Reply-To: <1405668583-14462-1-git-send-email-albert+gnus@zeitkraut.de> X-Spam-Score: -2.0 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84690 Archived-At: From: Albert Krewinkel --- 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 + + * gnus.texi (Posting Styles): Document the possibility to perform + string replacements when matching against headers. + 2014-06-11 Katsumi Yamaoka * 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