Discussion:
[gnus git] branch master updated: m0-11-32-gc1f3ea3 =1= Allow list-valued gcc-self group params.
Tassilo Horn
2014-07-31 09:27:24 UTC
Permalink
via c1f3ea38e79a2e17c18c26dc0a117bc862cb34ac (commit)
from 541851107664081d96b3aca32582916a379fc455 (commit)


- Log -----------------------------------------------------------------
commit c1f3ea38e79a2e17c18c26dc0a117bc862cb34ac
Author: Tassilo Horn <***@gnu.org>
Date: Thu Jul 31 11:24:38 2014 +0200

Allow list-valued gcc-self group params.

* gnus-msg.el (gnus-inews-insert-gcc): Allow `gcc-self' to be a list of
groups and t.
* gnus.texi (Group Parameters): Document that `gcc-self' may also be a
list.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4769108..b870994 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-31 Tassilo Horn <***@gnu.org>
+
+ * gnus-msg.el (gnus-inews-insert-gcc): Allow `gcc-self' to be a list of
+ groups and t.
+
2014-07-22 Katsumi Yamaoka <***@jpl.org>

* gnus-utils.el (gnus-recursive-directory-files):
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 469b9d2..960168a 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -1726,7 +1726,20 @@ this is a reply."
(var (or gnus-outgoing-message-group gnus-message-archive-group))
(gcc-self-val
(and group (not (gnus-virtual-group-p group))
- (gnus-group-find-parameter group 'gcc-self)))
+ (gnus-group-find-parameter group 'gcc-self t)))
+ (gcc-self-get (lambda (gcc-self-val grouy)
+ (if (stringp gcc-self-val)
+ (if (string-match " " gcc-self-val)
+ (concat "\"" gcc-self-val "\"")
+ gcc-self-val)
+ ;; In nndoc groups, we use the parent group name
+ ;; instead of the current group.
+ (let ((group (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'parent-group)
+ group)))
+ (if (string-match " " group)
+ (concat "\"" group "\"")
+ group)))))
result
(groups
(cond
@@ -1777,19 +1790,11 @@ this is a reply."
(if gcc-self-val
;; Use the `gcc-self' param value instead.
(progn
- (insert
- (if (stringp gcc-self-val)
- (if (string-match " " gcc-self-val)
- (concat "\"" gcc-self-val "\"")
- gcc-self-val)
- ;; In nndoc groups, we use the parent group name
- ;; instead of the current group.
- (let ((group (or (gnus-group-find-parameter
- gnus-newsgroup-name 'parent-group)
- group)))
- (if (string-match " " group)
- (concat "\"" group "\"")
- group))))
+ (insert (if (listp gcc-self-val)
+ (mapconcat (lambda (val)
+ (funcall gcc-self-get val group))
+ gcc-self-val ", ")
+ (funcall gcc-self-get gcc-self-val group)))
(if (not (eq gcc-self-val 'none))
(insert "\n")
(gnus-delete-line)))
diff --git a/texi/ChangeLog b/texi/ChangeLog
index 0666dfd..168637a 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-31 Tassilo Horn <***@gnu.org>
+
+ * gnus.texi (Group Parameters): Document that `gcc-self' may also be a
+ list.
+
2014-07-18 Albert Krewinkel <albert+***@zeitkraut.de>

* gnus.texi (Posting Styles): Document the possibility to perform
diff --git a/texi/gnus.texi b/texi/gnus.texi
index 9601a53..6f47786 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -2880,12 +2880,17 @@ news group.
@item gcc-self
@cindex gcc-self
If @code{(gcc-self . t)} is present in the group parameter list, newly
-composed messages will be @code{Gcc}'d to the current group. If
+composed messages will be @code{gcc}d to the current group. If
@code{(gcc-self . none)} is present, no @code{Gcc:} header will be
-generated, if @code{(gcc-self . "string")} is present, this string will
-be inserted literally as a @code{gcc} header. This parameter takes
-precedence over any default @code{Gcc} rules as described later
-(@pxref{Archived Messages}), with the exception for messages to resend.
+generated, if @code{(gcc-self . "group")} is present, this string will
+be inserted literally as a @code{Gcc:} header. It should be a group
+name. The @code{gcc-self} value may also be a list of strings and
+@code{t}, e.g., @code{(gcc-self "group1" "group2" t)} means to
+@code{gcc} the newly composed message into the groups @code{"group1"}
+and @code{"group2"}, and into the current group. The @code{gcc-self}
+parameter takes precedence over any default @code{Gcc} rules as
+described later (@pxref{Archived Messages}), with the exception for
+messages to resend.

@strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
@code{nntp} groups (or the like) isn't valid. An @code{nntp} server

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
lisp/ChangeLog | 5 +++++
lisp/gnus-msg.el | 33 +++++++++++++++++++--------------
texi/ChangeLog | 5 +++++
texi/gnus.texi | 15 ++++++++++-----
4 files changed, 39 insertions(+), 19 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
--
Gnus Project
Loading...