On 17 Apr 2011, Roland Winkler stated: > On Sun Apr 17 2011 Nix wrote: >> >> (I'll also see if bbdb-expire works with v3.0x and make it work if >> >> it doesn't.) >> > >> > I believe this was some kind of add-on for BBDB. >> >> It was, making heavy use of advisements to do its job. If it isn't >> broken I'd be astonished. :)
This was a lie caused by my forgetting all about earlier improvements done around the days of BBDB 2.34. It *used* to make heavy use of advisements and engaged in actual redefinition of BBDB functions. Nowadays we get away with a single advisement: everything else is done via hooking. We rely on the bbdb-notice-hook's precise semantics: actually those semantics are not quite right for us so we modify them via the one piece of advice. > If possible, I'd like to avoid using advice in any released code. If > you find anything missing in the new BBDB that allowed bbdb-expire > to work without advice, it's probably much cleaner to go that route! Oh, agreed. I just didn't want to require changes to BBDB for something as piddly as this. We're binding a variable to nil around the call to bbdb-update-records is called, then jamming things into that variable from various functions we add to the update-records hook so as to ensure that each such function is called only once per BBDB record, even if bbdb-update-records spots the same record a dozen times. (We use this to expire records that have been hit only once earlier than other records, on the grounds that they are probably spammers or flyby question-askers who don't need to be remembered for long.) 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. > Please see the questionaire below. (The package name is BBDB/EMACS.) I might as well sign one for all of Emacs: I have a bunch of patches to that queued up for when the git repo ever unjams (if it ever does, sigh, maybe I'll be forced to use bloody bzr: but last time I tried to branch the emacs repo using that awful VCS I gave up after five hours). If I do an Emacs-wide one, will it apply to BBDB as well? (Sorry for the stupid question, but the packages are so tightly related...) -- 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/