On 17 May 2001, Jack Twilley wrote:

>>>>>> "Kai" == Kai Gro�johann <[EMAIL PROTECTED]>
>>>>>> writes:
> 
> [...]
> 
> Kai> Hm.  Looking at the docs for bbdb/gnus-split-method, I see that
> Kai> it claims to return a list of groups.  That's not so good for
> Kai> this application.  So maybe you want to return the car of that
> Kai> list, only?
> 
> bbdb/gnus-split-method returns ("group-name") -- shouldn't it return
> "group-name"?

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

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

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

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

kai
-- 
The passive voice should never be used.

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

Reply via email to