David <[email protected]> writes:

> Richard Riley <[email protected]> writes:
>> David <[email protected]> writes:
>>> Richard Riley <[email protected]> writes:
>>>> I was wondering if anyone has a solution for setting the
>>>> gnus-posting-style address based on a "email-from" field or similar on a
>>>> contacts bbdb record?
>>>
>>> Put the following function in your .gnus:
>>
>> Hi David,
>>
>> I got it going. Great. I did have to define my own symbol though e.g
>>
>> (setq email-type (make-symbol "email-type"))
>
> I don't understand why this would be necessary. What kind of error do
> you get when you omit this? 
>
> You have to create the field in the BBDB, of course.

Yup, something else must have been up - I removed it and it all works fine.

>
>> I understand that the first clause ",(rx.." produces a match string
>> (regexp) which is later evaluated against the group name. The second
>> searches for the email-type field and matches it is type "dev".
>>
>> But how could I combine them so as not to have to repeat the other
>> forms?
>
> You could try something like (untested)
>
> (setq gnus-posting-styles
>       '(
>         ((or (string-match (rx (or "DevelopmentEmail" "emacs" ))
>                             gnus-newsgroup-name)
>            (DE-bbdb-match-field-recipient 'email-type "GWDG"))
>         (name "Richard Riley")
>           (address "[email protected]")
>           (from "Richard Riley <[email protected]>"))))
>
> -David

Great - works wonderfully.

many thanks,

r.


-- 
 important and urgent problems of the technology of today are no longer the 
satisfactions of the primary needs or of archetypal wishes, but the reparation 
of the evils and damages by the technology of yesterday.  ~Dennis Gabor, 
Innovations:  Scientific, Technological and Social, 1970
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to