On 17 Apr 2011, Roland Winkler spake thusly: > On Sun Apr 17 2011 Nix wrote: >> We could do the same job with a new hook which is called only once per >> record, no matter how many times it is spotted by a given call to >> bbdb-update-records, or with a new guarantee that the bbdb-notice-hook >> would only fire once per record per call to bbdb-update-records. But >> in the absence of that, an advisement is the only neat approach. > > First I wanted to say that bbdb-notice-hook is really in the wrong > place and that it might be better to move it elsewhere in the code. > > Yet the functions in this hook can refer to the particular email > address in a message which actually triggered the noticing of a > record (and maybe we have a message with two email addresses for the > same person, so that the same record is matched twice by one message). > So it seems to me it is useful to keep this hook where and what it is.
Yep. These are two different jobs, so they should probably be covered by two different hooks. > Yet it appears also useful beyond your particular problem to have a > hook which is called for each message only once per record. This (Actually I went further and had it work for each message *for each function*, so if you put it on the hook a dozen times it still only got called once. But this is a useless and arguably confusing side-effect of the behaviour I really wanted. If you only want your function called once, don't put it on the hook twice!) > could be done in bbdb-update-records, or probably yet better in > bbdb-mua-update-records. > > Do you have a good name for such a hook? I'd be inclined to say that the existing hook should have been called bbdb-notice-address-hook, so the new one could get called bbdb-notice-record-hook, but of course we can't rename that hook without breaking everyone's setups. > If you have not yet signed any paperwork, it is probably the easiest > if you simply say it is for Emacs and BBDB/Emacs. Sent. -- NULL && (void) ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/