Gnus development mailing list
 help / color / mirror / Atom feed
* using bbdb in split methods
@ 2011-09-05  7:49 Eric S Fraga
  2011-09-05 10:13 ` Eric Abrahamsen
  2011-09-27 21:39 ` Ted Zlatanov
  0 siblings, 2 replies; 10+ messages in thread
From: Eric S Fraga @ 2011-09-05  7:49 UTC (permalink / raw)
  To: ding

Hello,

I get way too much email (don't we all?) but using gnus with splitting
helps tremendously in tackling this problem.  I use fancy splitting and
everything works just fine.  The majority of my emails get sent to
appropriate mail folders (work colleagues, mailing lists, etc.) and I'm
pretty happy with his.  However, I still have a "catch all" folder that
takes any emails that have not been split off.  This still ends up being
too big and I'm forced to look at it more often than I would like.

I would like to further split emails that would end up here without
having to write any more rules based on specific "from" entries.  What I
would like ideally is to be able to split off emails if the "from" or
even the "to" addresses are one that are known to BBDB, implying
messages from or to people I know or that I have corresponded with in
the past.

Is this possible?  Has anybody done this already?  Any pointers to how
to do this would be very welcome!  I assume that something should be
possible using the "(: FUNCTION args...)" form but this is where I get
stuck.  Maybe I need help from somebody with BBDB expertise?

Many thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 + No Gnus v0.18



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-05  7:49 using bbdb in split methods Eric S Fraga
@ 2011-09-05 10:13 ` Eric Abrahamsen
  2011-09-05 13:02   ` Eric S Fraga
  2011-09-06  7:55   ` Eric S Fraga
  2011-09-27 21:39 ` Ted Zlatanov
  1 sibling, 2 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2011-09-05 10:13 UTC (permalink / raw)
  To: ding

On Mon, Sep 05 2011, Eric S Fraga wrote:

> Hello,
>
> I get way too much email (don't we all?) but using gnus with splitting
> helps tremendously in tackling this problem.  I use fancy splitting and
> everything works just fine.  The majority of my emails get sent to
> appropriate mail folders (work colleagues, mailing lists, etc.) and I'm
> pretty happy with his.  However, I still have a "catch all" folder that
> takes any emails that have not been split off.  This still ends up being
> too big and I'm forced to look at it more often than I would like.
>
> I would like to further split emails that would end up here without
> having to write any more rules based on specific "from" entries.  What I
> would like ideally is to be able to split off emails if the "from" or
> even the "to" addresses are one that are known to BBDB, implying
> messages from or to people I know or that I have corresponded with in
> the past.
>
> Is this possible?  Has anybody done this already?  Any pointers to how
> to do this would be very welcome!  I assume that something should be
> possible using the "(: FUNCTION args...)" form but this is where I get
> stuck.  Maybe I need help from somebody with BBDB expertise?
>
> Many thanks,
> eric

Unless I'm misunderstanding you, this is already built into BBDB. Give
any BBDB record a "gnus-private" field with a gnus group name (ie
"mail.myfriend"). Then set the following two variables:

(setq nnmail-split-methods 'bbdb/gnus-split-method
      bbdb/gnus-split-nomatch-function 'nnmail-split-fancy)

Splits will happen for BBDB records first, and then fall through to
nnmail-split-fancy. That ought to do it…

E




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-05 10:13 ` Eric Abrahamsen
@ 2011-09-05 13:02   ` Eric S Fraga
  2011-09-06  7:55   ` Eric S Fraga
  1 sibling, 0 replies; 10+ messages in thread
From: Eric S Fraga @ 2011-09-05 13:02 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> On Mon, Sep 05 2011, Eric S Fraga wrote:
>
>> Hello,
>>
>> I get way too much email (don't we all?) but using gnus with splitting
>> helps tremendously in tackling this problem.  I use fancy splitting and
>> everything works just fine.  The majority of my emails get sent to
>> appropriate mail folders (work colleagues, mailing lists, etc.) and I'm
>> pretty happy with his.  However, I still have a "catch all" folder that
>> takes any emails that have not been split off.  This still ends up being
>> too big and I'm forced to look at it more often than I would like.
>>
>> I would like to further split emails that would end up here without
>> having to write any more rules based on specific "from" entries.  What I
>> would like ideally is to be able to split off emails if the "from" or
>> even the "to" addresses are one that are known to BBDB, implying
>> messages from or to people I know or that I have corresponded with in
>> the past.
>>
>> Is this possible?  Has anybody done this already?  Any pointers to how
>> to do this would be very welcome!  I assume that something should be
>> possible using the "(: FUNCTION args...)" form but this is where I get
>> stuck.  Maybe I need help from somebody with BBDB expertise?
>>
>> Many thanks,
>> eric
>
> Unless I'm misunderstanding you, this is already built into BBDB. Give
> any BBDB record a "gnus-private" field with a gnus group name (ie
> "mail.myfriend"). Then set the following two variables:
>
> (setq nnmail-split-methods 'bbdb/gnus-split-method
>       bbdb/gnus-split-nomatch-function 'nnmail-split-fancy)
>
> Splits will happen for BBDB records first, and then fall through to
> nnmail-split-fancy. That ought to do it…
>
> E

Brilliant.  Thanks for this Eric!  This should do the trick.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 + No Gnus v0.18



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-05 10:13 ` Eric Abrahamsen
  2011-09-05 13:02   ` Eric S Fraga
@ 2011-09-06  7:55   ` Eric S Fraga
  2011-09-07  2:24     ` Eric Abrahamsen
  2011-09-07 15:03     ` David Engster
  1 sibling, 2 replies; 10+ messages in thread
From: Eric S Fraga @ 2011-09-06  7:55 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> Unless I'm misunderstanding you, this is already built into BBDB. Give
> any BBDB record a "gnus-private" field with a gnus group name (ie
> "mail.myfriend"). Then set the following two variables:
>
> (setq nnmail-split-methods 'bbdb/gnus-split-method
>       bbdb/gnus-split-nomatch-function 'nnmail-split-fancy)
>
> Splits will happen for BBDB records first, and then fall through to
> nnmail-split-fancy. That ought to do it…
>
> E
>
>

Eric,

just to confirm that this works perfectly.  I now have the best of both
worlds.  Many thanks for pointing this out.  There's much to learn in
bbdb (and gnus)!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 + No Gnus v0.18



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-06  7:55   ` Eric S Fraga
@ 2011-09-07  2:24     ` Eric Abrahamsen
  2011-09-07  8:08       ` Eric S Fraga
  2011-09-07 15:03     ` David Engster
  1 sibling, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2011-09-07  2:24 UTC (permalink / raw)
  To: ding

On Tue, Sep 06 2011, Eric S Fraga wrote:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> [...]
>
>> Unless I'm misunderstanding you, this is already built into BBDB. Give
>> any BBDB record a "gnus-private" field with a gnus group name (ie
>> "mail.myfriend"). Then set the following two variables:
>>
>> (setq nnmail-split-methods 'bbdb/gnus-split-method
>>       bbdb/gnus-split-nomatch-function 'nnmail-split-fancy)
>>
>> Splits will happen for BBDB records first, and then fall through to
>> nnmail-split-fancy. That ought to do it…
>>
>> E
>>
>>
>
> Eric,
>
> just to confirm that this works perfectly.  I now have the best of both
> worlds.  Many thanks for pointing this out.  There's much to learn in
> bbdb (and gnus)!

There certainly is! If you're considering digging in, be aware that BBDB
3, which contains significant improvements over the last version, is
trundling towards readiness. It introduces some fairly large changes and
is currently lacking much documentation -- if you're interested in going
deeper you might consider waiting for that, or digging into its code.

E




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-07  2:24     ` Eric Abrahamsen
@ 2011-09-07  8:08       ` Eric S Fraga
  2011-09-07 11:00         ` Rasmus
  0 siblings, 1 reply; 10+ messages in thread
From: Eric S Fraga @ 2011-09-07  8:08 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> On Tue, Sep 06 2011, Eric S Fraga wrote:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>> [...]
>>
>>> Unless I'm misunderstanding you, this is already built into BBDB. Give
>>> any BBDB record a "gnus-private" field with a gnus group name (ie
>>> "mail.myfriend"). Then set the following two variables:
>>>
>>> (setq nnmail-split-methods 'bbdb/gnus-split-method
>>>       bbdb/gnus-split-nomatch-function 'nnmail-split-fancy)
>>>
>>> Splits will happen for BBDB records first, and then fall through to
>>> nnmail-split-fancy. That ought to do it…
>>>
>>> E
>>>
>>>
>>
>> Eric,
>>
>> just to confirm that this works perfectly.  I now have the best of both
>> worlds.  Many thanks for pointing this out.  There's much to learn in
>> bbdb (and gnus)!
>
> There certainly is! If you're considering digging in, be aware that BBDB
> 3, which contains significant improvements over the last version, is
> trundling towards readiness. It introduces some fairly large changes and
> is currently lacking much documentation -- if you're interested in going
> deeper you might consider waiting for that, or digging into its code.
>
> E
>
>

Yes, I've been aware of bbdb 3 for a long time and, partly, this is why
I have resisted getting too much into the current bbdb... but that's
probably just an excuse for procrastination! :-(

Thanks again,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 + No Gnus v0.18



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-07  8:08       ` Eric S Fraga
@ 2011-09-07 11:00         ` Rasmus
  0 siblings, 0 replies; 10+ messages in thread
From: Rasmus @ 2011-09-07 11:00 UTC (permalink / raw)
  To: ding

Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Yes, I've been aware of bbdb 3 for a long time and, partly, this is why
> I have resisted getting too much into the current bbdb... but that's
> probably just an excuse for procrastination! :-(

I haven't used bbdb2 (I used org-contacts before) but bbdb3 is pretty
straight forward. 

Here is my bbdb3 setup

–Rasmus

#+begin_src org
* TODO BBDB 3
BBDB is the Insidious Big Brother Database for GNU Emacs. It
provides an address book for email and snail mail addresses, phone
numbers and the like. It can be linked with various Emacs mail
clients (Message and Mail mode, Rmail, Gnus, MH-E, and VM).
BBDB is fully customizable.
** Load stuff
#+begin_src emacs-lisp
(add-to-list 'load-path "~/.emacs.d/bbdb/lisp/")
(require 'bbdb)
(bbdb-initialize 'gnus)
(bbdb-mua-auto-update-init 'gnus)
#+end_src

** Sanitizing the BBDB
Wouldn't it be nice if it showed Danish addresses correctly?
#+begin_src emacs-lisp
(add-to-list 'bbdb-address-format-list '(("Denmark" "Danmark")
					 "spcC"
					 "@%s\n@%p @%c@ (%S)@\n%C@"
					 "@%c@"))

(add-to-list 'bbdb-phone-label-list "mobil")
#+end_src


I don't care about people from usenet. Don't ask me! Always ask in all
other cases. (This is somewhat annoying behavior that needs to be looked
further into) 

#+begin_src emacs-lisp
(defun bbdb/gnus-update-selectively ()
  "Update BBDB record selectively"
  (interactive)
  (if
      (gnus-news-group-p gnus-newsgroup-name)
      (setq bbdb/gnus-update-records-p nil)
    (setq bbdb/gnus-update-records-p 'query)
    ))

(add-hook 'gnus-summary-prepare-hook 'bbdb/gnus-update-selectively)

#+end_src

** Settings
There is a post about various settings at [[http://emacs-fu.blogspot.com/2009/08/managing-e-mail-addresses-with-bbdb.html][emacs-fu]] but it is probably
for the v2 branch of BBDB

#+begin_src emacs-lisp
  ;; for sending mails...
  (add-hook 'message-setup-hook 'bbdb-get-mail-aliases)
  (setq
   bbdb-electric nil
   bbdb-default-country "Denmark"
   bbdb-mail-user-agent 'gnus-user-agent
   bbdb-phone-style nil
   bbdb-completion-display-record nil
   bbdb-pop-up-layout 'one-line
   bbdb-pop-up-window-size 2
   bbdb-complete-mail-allow-cycling t
   bbdb-horiz-pop-up-window-size '(112 .1))

  (setq bbdb-mail-allow-redundancy 'mail-only)
#+end_src

#+end_src












^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-06  7:55   ` Eric S Fraga
  2011-09-07  2:24     ` Eric Abrahamsen
@ 2011-09-07 15:03     ` David Engster
  1 sibling, 0 replies; 10+ messages in thread
From: David Engster @ 2011-09-07 15:03 UTC (permalink / raw)
  To: ding

Eric S. Fraga writes:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> [...]
>
>> Unless I'm misunderstanding you, this is already built into BBDB. Give
>> any BBDB record a "gnus-private" field with a gnus group name (ie
>> "mail.myfriend"). Then set the following two variables:
>>
>> (setq nnmail-split-methods 'bbdb/gnus-split-method
>>       bbdb/gnus-split-nomatch-function 'nnmail-split-fancy)
>>
>> Splits will happen for BBDB records first, and then fall through to
>> nnmail-split-fancy. That ought to do it…
>>
>> E
>>
>>
>
> Eric,
>
> just to confirm that this works perfectly.  I now have the best of both
> worlds.  Many thanks for pointing this out.  There's much to learn in
> bbdb (and gnus)!

I've also written down my setup here:

http://www.randomsample.de/dru5/node/57
http://www.randomsample.de/dru5/node/59
http://www.randomsample.de/dru5/node/60

-David




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-05  7:49 using bbdb in split methods Eric S Fraga
  2011-09-05 10:13 ` Eric Abrahamsen
@ 2011-09-27 21:39 ` Ted Zlatanov
  2011-09-28 15:10   ` Eric S Fraga
  1 sibling, 1 reply; 10+ messages in thread
From: Ted Zlatanov @ 2011-09-27 21:39 UTC (permalink / raw)
  To: ding

On Mon, 05 Sep 2011 08:49:41 +0100 Eric S Fraga <e.fraga@ucl.ac.uk> wrote: 

ESF> I get way too much email (don't we all?) but using gnus with splitting
ESF> helps tremendously in tackling this problem.  I use fancy splitting and
ESF> everything works just fine.  The majority of my emails get sent to
ESF> appropriate mail folders (work colleagues, mailing lists, etc.) and I'm
ESF> pretty happy with his.  However, I still have a "catch all" folder that
ESF> takes any emails that have not been split off.  This still ends up being
ESF> too big and I'm forced to look at it more often than I would like.

ESF> I would like to further split emails that would end up here without
ESF> having to write any more rules based on specific "from" entries.  What I
ESF> would like ideally is to be able to split off emails if the "from" or
ESF> even the "to" addresses are one that are known to BBDB, implying
ESF> messages from or to people I know or that I have corresponded with in
ESF> the past.

Eric, after the BBDB split you can split further with the Gnus registry,
using the parent message-ID from the references, then the subject and
the sender and the recipients.  It works well for me though of course I
still have leftovers.  The parent splitting is absolutely essential.

Ted




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: using bbdb in split methods
  2011-09-27 21:39 ` Ted Zlatanov
@ 2011-09-28 15:10   ` Eric S Fraga
  0 siblings, 0 replies; 10+ messages in thread
From: Eric S Fraga @ 2011-09-28 15:10 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Mon, 05 Sep 2011 08:49:41 +0100 Eric S Fraga <e.fraga@ucl.ac.uk> wrote: 
>
> ESF> I get way too much email (don't we all?) but using gnus with splitting
> ESF> helps tremendously in tackling this problem.  I use fancy splitting and
> ESF> everything works just fine.  The majority of my emails get sent to
> ESF> appropriate mail folders (work colleagues, mailing lists, etc.) and I'm
> ESF> pretty happy with his.  However, I still have a "catch all" folder that
> ESF> takes any emails that have not been split off.  This still ends up being
> ESF> too big and I'm forced to look at it more often than I would like.
>
> ESF> I would like to further split emails that would end up here without
> ESF> having to write any more rules based on specific "from" entries.  What I
> ESF> would like ideally is to be able to split off emails if the "from" or
> ESF> even the "to" addresses are one that are known to BBDB, implying
> ESF> messages from or to people I know or that I have corresponded with in
> ESF> the past.
>
> Eric, after the BBDB split you can split further with the Gnus registry,
> using the parent message-ID from the references, then the subject and
> the sender and the recipients.  It works well for me though of course I
> still have leftovers.  The parent splitting is absolutely essential.

Ted,

thanks for this.  I guess it's time I started looking at the registry,
one of the aspects of gnus that I have yet to investigate.

Nevertheless, being able to split using bbdb has made all the
difference!  I am less concerned about the left over entries now.

Thanks again,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 + No Gnus v0.18



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-28 15:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05  7:49 using bbdb in split methods Eric S Fraga
2011-09-05 10:13 ` Eric Abrahamsen
2011-09-05 13:02   ` Eric S Fraga
2011-09-06  7:55   ` Eric S Fraga
2011-09-07  2:24     ` Eric Abrahamsen
2011-09-07  8:08       ` Eric S Fraga
2011-09-07 11:00         ` Rasmus
2011-09-07 15:03     ` David Engster
2011-09-27 21:39 ` Ted Zlatanov
2011-09-28 15:10   ` Eric S Fraga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).