>>>>> "Kai" == Kai Großjohann <[EMAIL PROTECTED]> writes:

[...]

Jack> bbdb/gnus-split-method returns ("group-name") -- shouldn't it
Jack> return "group-name"?

Kai> I see.  Well, if it's documented to return a list, then it's okay
Kai> to do that.  Two ideas, both untested:

Kai> (defun jt-bbdb-gnus-split-method-wrapper-1 () "Returns first
Kai> element of bbdb/gnus-split-method or nil."  (let ((x
Kai> (bbdb/gnus-split-method))) (when x (car x))))

Kai> (defun jt-bbdb-gnus-split-method-wrapper-2 () "Returns fancy
Kai> split expression for bbdb/gnus-split-method."  (let ((x
Kai> (bbdb/gnus-split-method))) (when x (cons '& x))))

Here's what's currently in use:

(defun jmt-bbdb-gnus-split-fancy () 
  "this is just a boring wrapper function"
  (car (bbdb/gnus-split-method)))

This does *not* deal with folks who have bbdb entries but no
gnus-private values, and it does *not* deal nicely with multiple
returns.  Basically, I want gnus-public entries to be of a greater
precedence than gnus-private entries, but multiple gnus-public entries
should be respected -- if a message is mailed to the ding list and the
ipfilter list, a copy of the message should be filed in each list's
folder.  I'm probably going to give Kai's second suggestion a try,
since it should solve both of my problems.

I also have another idle fantasy while we're on this topic.

Right now, if a user on a mailing list sends a message to me and to
the list, both copies get sent to the mailing list folder, which is
annoying as heck.  I'd like to either only get one reply (preferably
to the list) or have the messages deposited in (possibly) two folders,
one for the user (if gnus-private exists, else mail.misc) and one for
the list.  Is this possible?

Kai> These functions are intended to be used instead of
Kai> bbdb/gnus-split-method.  The first one just returns the first
Kai> string in the list, so if bbdb/gnus-split-method always returns
Kai> at most one string, that's the right approach.  The second one
Kai> returns (& "group1" "group2" ...) which tells Gnus to split the
Kai> message into all the groups.

Yeah, I'll definitely try the second one.

Kai> kai -- The passive voice should never be used.

Jack.
-- 
Jack Twilley
jmt at twilley dot org
http colon slash slash www dot twilley dot org slash tilde jmt slash

_______________________________________________
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to