On Sun, 22 Nov 2015 23:16:04 +0100,
Roland Winkler wrote:
> 
> > Side note: While implementing the support I noticed that the macro
> > 'bbdb-mua-wrapper' seems to be one important part that prevents
> > one from adding support for additional muas w/o patching bbdb
> > itself. You could rewrite the macro to simply use a dispatch table
> > to select an appropriate function to select buffer based on mua:
> [snip]
> > With this modified macro in place I was able to use BBDB with
> > Wanderlust only be modifying variables and advicing defuns [1]
> > since 2014.
> 
> Just to make sure I understand correctly: your proposed change to
> the macro bbdb-mua-wrapper does not solve all problems immediately.
> It also requires advicing defuns if one wants to add a new MUA.
> -- My point is that advicing defuns can make debugging very painful.
> So for issues of general interest I really would not want to
> advertise it as a strategy.

I agree: Advicing functions is definitely not a good general mechanism
to provide extensibility.

One way to provide a better way to extend bbdb-mua could be something
along this lines:

 - consistently use a lookup-table for all mua-specific stuff
   (functions, hooks, ...)
   
 - provide a function that mua-support-modules call in order to
   register themselves

The role of bbdb-mua-* would be to read the lookup-table and dispatch
to mua-specific functions if neccessary.

Is this a direction bbdb-mua could evolve?

Best,
  -- David

------------------------------------------------------------------------------
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to