Re: [BBDB] ChangeLog 2011-02-27
27/02/11 18:28, Roland Winkler I have now given the command bbdb-complete-mail (formerly bbdb-complete-name) a well-defined return value. It is non-nil only if the string preceding point is a valid completion so that the above problem should not exist anymore. Great, thanks! On Sun Feb 13 2011 Antoine Levitt wrote: 13/02/11 15:31, Roland Winkler I think the let should be before the if in bbdb-mua-pop-up-bbdb-buffer. Or even better, bbdb-insinuate would hook a function to notice contacts, independently from pop-ups. I guess from your perspective bbdb-mua-pop-up-bbdb-buffer is, first of all, a misnomer. The main action is hidden in bbdb-mua-update-records. -- I'll look into this. Yes. Maybe there should be two separate functions added to the hook, one for noticing and the other for displaying the popup. Two functions would duplicate things, which is something I'd like to avoid. Instead, I renamed bbdb-mua-pop-up-bbdb-buffer to bbdb-mua-auto-update, which, I believe, gives a much clearer idea what the main purpose of this function is. And bbdb-mua-pop-up-bbdb-buffer is tested after calling bbdb-mua-update-records. In a similar spirit, I also renamed bbdb-mua-pop-up-init to bbdb-mua-auto-update-init. Also, I extended the doc strings for bbdb-mua-auto-update-init and bbdb-initialize, because at a first glance, it is a bit confusing that these two functions appear to do similar things. Perfect, I just tried it and it works very nicely. There's a typo though: Index: bbdb-mua.el === RCS file: /sources/bbdb/bbdb/lisp/bbdb-mua.el,v retrieving revision 1.5 diff -r1.5 bbdb-mua.el 776,777c776,777 Call this function in you init file to use the auto update feature with MUAS. This function is seaparate from the general function `bbdb-initialize' --- Call this function in your init file to use the auto update feature with MUAS. This function is separate from the general function `bbdb-initialize' Antoine -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: BBDB ELPA-style packaging
On Sun, 27 Feb 2011 15:48:38 -0600 Roland Winkler wink...@gnu.org wrote: RW On Wed Feb 23 2011 Ted Zlatanov wrote: On Sat, 22 Jan 2011 10:54:12 -0600 Roland Winkler wink...@gnu.org wrote: Could you consider moving to Git or Bazaar for development? CVS is very inconvenient. I can't use it from work, for instance (pserver is blocked, only http and https work). If you like Git, I can host the repository or you can use Github or your own server. I personally don't like to depend on Github but many do. For Bazaar, I think you can use a Savannah repository but I don't know what setup is needed. RW In principle, I am open here. I have used CVS for bbdb quite simply RW because I know how I can do the few things that I want/need to do. I RW haven't found the time to sit down and figure out how git and bzr RW are working, though this is on my todo list, too. Git is pretty simple to use on a basic level. Basically you edit the file, then git add, then git commit, then git push. You can play around with a repository before pushing your changes, so unless you completely screw things up, you can back out of most problems. magit is a nice package that abstracts most of the command-line stuff. And of course the Emacs VC package will work as you'd expect. If you want, I can convert the current CVS history of BBDB as you have it into a Git repository. It's pretty trivial; see http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html for a quick guide. Then you can simply clone that repository and use it on Savannah's Git servers or Github or whatever you like. You can keep serving CVS out of it but I would recommend cutting off CVS instead. I can probably do most of this if you add me to the admin list on Savannah so I can update the web pages as I go. The BBDB web page is outdated and should probably at least mention version 3. RW Which web page? The one on savannah? I started with a rather RW rudimentary web page. As things progress, it might be good to update RW it, too. (I cannot do anything about the old sourceforge page.) You can probably get the old sourceforge page transferred or redirected. But I'm sure this is a hassle for you. Ted -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-complete-name return value
On Mon, 28 Feb 2011 00:17:05 -0500 Stefan Monnier monn...@iro.umontreal.ca wrote: TZ Maybe accept the score as a property to the candidate strings and use TZ that property, if it exists, instead of the string length? TZ That would side-step the current completion mechanism nicely, requiring TZ little extra code except in the final sort of candidates. If the TZ strings aren't mangled by the completion mechanism, of course--but I TZ don't think they are after a quick scan. SM That would work. It's a quicksimple solution (i.e. generally a good SM sign), but it has one drawback: the properties will be often added SM without being used, since the list of completions is used not only to SM build the *Completions* buffer or to cycle through completions but also SM to do TAB completion (often just handled by try-completion, but with SM substring completion it instead needs to get the all-completions list SM and then weed it out). SM So it has a performance downside (which means, it's not the last word in SM this respect), but I'd probably accept a patch to add such a feature to SM minibuffer.el since the performance impact is only incurred by SM completion tables that really use the feature and it's unlikely to be SM a serious maintenance problem in the future. So something like this would work in `completion-all-sorted-completions': (or (get-text-property 0 :completion-score (propertize hello :completion-score 100)) 0) = 100 ...and we're adding an extra `get-text-property' call to all the sorts: (or (get-text-property 0 :completion-score hello) 0) = 0 ...which should not be a big deal since it's just a plist lookup. The only thing I need to clarify is sorting. Right now shorter string wins. In the new method, higher score should win. So I propose these rules: - if both have the :completion-score property, sort by highest score first - if one has it, put it first - if neither has it, shorter string wins Let me know if you agree and I'll propose the code+doc patch. Thanks Ted -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-complete-name return value
The only thing I need to clarify is sorting. Right now shorter string wins. In the new method, higher score should win. I think it's easier if lower scores win, so it's consistent with the current use of `length'. It's really not a big issue: just negate the values you put on the property and you're done. Stefan -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
bbdb anniversaries [was: BBDB ELPA-style packaging]
On Sun Feb 27 2011 Roland Winkler wrote: On Wed Feb 23 2011 Ted Zlatanov wrote: RW I'll try to make some kind of table that shows how the functionality RW in the current code (functions and variables) relates to the old RW BBDB code. Then hopefully it will become more clear to what extent RW which parts of BBDB still contain old code. Then we can go from there. Any updates? Unfortunately, I need to say that my time for such things is limited. I am doing my best, but it's hard to make more specific predictions. All I can say is that right now my schedule is filled yet more with other stuff. I thought I could / should also mention here: Various changes and extensions that I added to BBDB took me further away from the original code. So I want to mention that I have one more somewhat larger idea in the back of my mind. Currently, it is required that the values of BBDB note fields are strings. It would be nice if these fields could be made more flexible by allowing them to have values that can be any lisp object suitable for a particular field. More specifically, I have in mind that one could define handlers which include a list of functions that allow one to create, edit, and format a particular note field, such as `foo'. If such a handler is defined, it will be used for handling a note field. Otherwise, it will be assumed that the field has the conventionel string format. One particular application I have in mind here are anniversaries associated with a record. There was an old extension `bbdb-anniv.el' for adding anniversaries to BBDB records written by Ivar Rummelhoff. Here the value of the anniversary field was a conventionel string that was parsed in a sophisticated way to extract a list of anniversaries that was then fed into the emacs diary. It seems to me that it would be much cleaner to store such anniversaries using a list of numbers similar to the argument list used by the diary-anniversary function. Such a feature would provide a proof of concept for the more general note handlers. Once this is working properly, maybe other people have more ideas for adding other note handlers. Comments and suggestions welcome! Once this last larger project on my bbdb todo list has been added, it might be more meaningful to check carefully to what extent the new and old bbdb share the same code. Roland -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/