Re: bbdb3 manual
Saša Janiškawrites: > kensubu...@gmail.com writes: > > Hello, > >> I second that! I would love a manual for V3. If I can help let me know. > > sometime ago I switched from Vim, first to Spacemacs and now I’m on > ’plain’ Emacs…using Gnus, org-mode etc. > > I sync my phone contacts/calendars by using DAVdroid app which syncs > with my instance of ownCloud – calendars are synced with the org-caldav > and I tried to use org-vcard to import my contacts into org-mode’s > org-contacts, but, somehow, completion withing Gnus does not work well > and it looks it does not scale – both my and my wife have few hundred > contacts. > > Then I tried to import my contacts into BBDB (v3) via bbdb-vcard (there > are some glitches to make Emacs very busy), but I’ve feeling that BBDB > is much better solution for my contacts, but there is no manual at all. > > So, wondering whether the manual for old V2 can be still consulted? Have you taken a look at this link? https://www.emacswiki.org/emacs/UpgradeBBDB It's only the bare minimum of information, but if you start trying to sort things out using BBDB v3, and things go wrong, this page can often be useful. Also, people don't often realize that the README in the codebase, and the code comments themselves, are actually fairly clear and informative. It's not ideal, but it's pretty useful. -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb3 manual
Christian Egli <christian.e...@sbs.ch> writes: > Eric Abrahamsen <e...@ericabrahamsen.net> writes: > >> Glyn Millington <glyn.milling...@gmail.com> writes: >> >>> I think Eric's suggestion/hint/encouragement about a bbdb(3) manual is >>> probably the answer, but I'm not remotely qualified to tackle such a >>> thing. I find that Google plus a certain amount of grubbing round in >>> the source code usually get me there. >> >> I wrote about a third of one and then ran out of steam. Maybe I can dig >> that up and provide it as a start... > > I'm trying to set up my bbdb address book again and in the course of > that I stumbled upon the manual that comes with the melpa package. This > prompted me to start a draft for a bbdb manual[1]. Can you please dig up > the stuff you have so I can merge this with mine so we have at least a > bare bones manual. The README in the BBDB repo might be a good place to start. -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb3 manual
Christian Egli <christian.e...@sbs.ch> writes: > Eric Abrahamsen <e...@ericabrahamsen.net> writes: > >> Glyn Millington <glyn.milling...@gmail.com> writes: >> >>> I think Eric's suggestion/hint/encouragement about a bbdb(3) manual is >>> probably the answer, but I'm not remotely qualified to tackle such a >>> thing. I find that Google plus a certain amount of grubbing round in >>> the source code usually get me there. >> >> I wrote about a third of one and then ran out of steam. Maybe I can dig >> that up and provide it as a start... > > I'm trying to set up my bbdb address book again and in the course of > that I stumbled upon the manual that comes with the melpa package. This > prompted me to start a draft for a bbdb manual[1]. Can you please dig up > the stuff you have so I can merge this with mine so we have at least a > bare bones manual. Hmm, I've checked around, and I think the manual was in a branch of a long-deleted repository. I've got one other computer I can check, but I'm not optimistic. I'd be happy to contribute, though! E -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: can I auto save the bbdb file after each change?
Alan Schmittwrites: > Hello, > > Is there a way to automatically save the bbdb file after each change? > I searched for `bbdb*save' but could not find anything relevant. You'll probably want one of the hooks: look for bbdb-*-hook. I think `bbdb-after-change-hook' should do it. Yours, Eric -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: EIEIO version of BBDB
Eric Abrahamsen <e...@ericabrahamsen.net> writes: > "Roland Winkler" <wink...@gnu.org> writes: > >> On Thu Dec 24 2015 Eric Abrahamsen wrote: >>> A while ago there was a very brief exchange about the possibility of a >>> version of BBDB refactored on top of the EIEIO object orientation >>> library. I've been thinking about that for a while, and recently wrote >>> a sort of prototype. I'd like to share it with everyone, either as an >>> attachment to the list, or I guess preferably by pushing a branch to >>> the git repo. >>> >>> There isn't anything particularly wrong with BBDB that needs fixing, >>> but an OO version of the database does lots of good things, mostly in >>> the direction of extension and customization. It also gets us free >>> file serialization courtesy of eieio-persistent, and I've added in >>> support for multiple databases. Anyhoo, I'm going to post the code sketch as it stands for anyone who's interested in looking: https://ericabrahamsen.net/bbdb-eieio.el The file requires bbdb, but also clobbers some of its functions. It's best to start an "emacs -Q", make sure BBDB proper is on the load path, then require the above file. Then it's `bbdb-load' to start things off, and `bbdb-create-record' to make records (try it with and without a prefix arg). Once there are a few records, take a look at the `bbdb-record-tracker' variable, as well as `bbdb-db-list', then call `bbdb-save' to save. Most of the work has gone into maintaining integrity when there are multiple databases, and when records can be moved between databases. It's even possible to have single records stored in more than one database -- duplicates are identified by uuid and merged. I'll probably just continue pottering with this slowly. E -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: EIEIO version of BBDB
"Roland Winkler" <wink...@gnu.org> writes: > On Thu Dec 24 2015 Eric Abrahamsen wrote: >> A while ago there was a very brief exchange about the possibility of a >> version of BBDB refactored on top of the EIEIO object orientation >> library. I've been thinking about that for a while, and recently wrote >> a sort of prototype. I'd like to share it with everyone, either as an >> attachment to the list, or I guess preferably by pushing a branch to >> the git repo. >> >> There isn't anything particularly wrong with BBDB that needs fixing, >> but an OO version of the database does lots of good things, mostly in >> the direction of extension and customization. It also gets us free >> file serialization courtesy of eieio-persistent, and I've added in >> support for multiple databases. > > I don't know much about EIEIO, but I am not sure it would benefit > BBDB so much to add an extra layer of abstraction. Correct me if I > am wrong, but what kind of problem can really be solved cleaner and > how? It's not really about abstraction, but the way that classes and methods are modular, and "pluggable". Some examples below. > Extensions and customizations of BBDB should use a high-level API, > which does not expose the details of how things are implemented. > Currently, a good example for this is the function > bbdb-record-set-field. Anyone wanting to extend or customize BBDB > should not call the low-level functions that do the real work inside > bbdb-record-set-field, because the low-level implementation might > change at some point for whatever reason. How could EIEIO possibly > provide a better solution (better in what sense)? Extension/customization would be a result not of exposing BBDB's inner workings, but of making database/record/field classes responsible for their own behavior, and allowing external code to replace or alter that behavior. For example, adding a new field to a record. What the code does is pick up the current record, then prompt the user for the field class to insert. Then it passes the field class to the record's `bbdb-record-insert-field' method. The record itself decides if it can accept this field. If it can, the record calls the field class's `bbdb-read' method, which prompts the user for values, and returns an actual field object. The record then puts this object in the appropriate slot, and calls a method on its database to let it know it's done. All this happens in methods belonging to the various classes. Users have customization options saying what default classes they want to use -- they can change the behavior by changing the default classes. Or they can load libraries that override the basic methods, changing behavior without having to change any of BBDB's internal code, or their own init options. I've tried to set it up this way for most aspects of BBDB's internal behavior: The classes themselves are responsible for creation/set-up, deletion/tear-down, "noticing"... In other words, the API we're "exposing" to developers isn't BBDB's internals at all, but the method signatures of the various classes. Other possibilities: 1. Funky database subclasses. A database backend that reads from/writes to a VCARD file, or a remote CardDav server. These backends would be a lot of work to write, obviously, but they could be written and plugged in without having to modify the existing codebase at all. 2. A "more international" BBDB. Users load an additional library, say "bbdb-i18n.el", containing new `bbdb-read' and `bbdb-display' methods for the name, phone and address field classes that are more internationally aware. For instance, when a phone field is created, it would first prompt for a country name. The country code would then be automatically added, and the phone number displayed in the proper format for that country. A Hong Kong address would not ask you for a postcode. Etc. From the user's point of view, all they had to do was (require 'bbdb-i18n). 3. Newer versions of EIEIO support dispatch on multiple arguments, and dispatch using `eql'. That means field display could be completely modular. For instance, the way a phone field displays in the one-line format is a method with this signature: (cl-defmethod bbdb-display ((field bbdb-field-phone) (format (eql one-line Overriding these methods would provide very fine-grained control over how the BBDB buffer looks. You could even register a new display symbol and write your own display routine. I definitely understand the wariness over letting people run amok in the guts of BBDB. But the great thing about generic functions is that you can just load them on top of existing code, either replacing or augmenting it. A last example of customizability: I live and work in China, and have
EIEIO version of BBDB
And while we're all here... A while ago there was a very brief exchange about the possibility of a version of BBDB refactored on top of the EIEIO object orientation library. I've been thinking about that for a while, and recently wrote a sort of prototype. I'd like to share it with everyone, either as an attachment to the list, or I guess preferably by pushing a branch to the git repo. There isn't anything particularly wrong with BBDB that needs fixing, but an OO version of the database does lots of good things, mostly in the direction of extension and customization. It also gets us free file serialization courtesy of eieio-persistent, and I've added in support for multiple databases. One semi-serious problem is that EIEIO is under development, and a bit of a moving target. This version of BBDB would likely only reliably work with a development version of Emacs. But if we're considering bundling BBDB with Emacs anyway, that might be okay. Right now it's kind of a code sketch. You can load it, and it works fine in an IELM session, it's just very rudimentary. Basically I put in enough effort that it can serve as the basis for a design discussion, but not so much that I would feel bad about dumping large parts of the code, or scrapping it altogether. Anyway, if there's interest, I can push a branch or something... Thanks, Eric -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb prevents mu4e from sending a message
"Roland Winkler"writes: > On Mon Dec 21 2015 Michael Strey wrote: >> ((vm vm-mode vm-virtual-mode vm-summary-mode vm-presentation-mode) >> (gnus gnus-summary-mode gnus-article-mode gnus-tree-mode) >> (rmail rmail-mode rmail-summary-mode) >> (mh mhe-mode mhe-summary-mode mh-folder-mode) >> (message notmuch-message-mode message-mode) > > Yes, if notmuch-message-mode is likewise derived from message-mode, > the above should work for notmuch, too. > > Are there yet more modes "out in the wild" which are derived from > message-mode (or mail-mode, though I guess mail-mode is really > getting replaced by message-mode)? There's also notmuch-message-mode. I'm actually fairly annoyed that notmuch tries to take over my whole mua setup, when all I want to do is use it to search, but it would be nice to also let this one pass. -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb prevents mu4e from sending a message
Michael Streywrites: > Hi Alan, > > On Mo, 2015-12-21 at 09:14, Alan Schmitt wrote: > > [...] > >> I tried adding the 'mu4e symbol to both lines and it's not changing >> anything. I don't necessarily want BBDB to work with mu4e: I want to be >> able to send messages with mu4e while still using BBDB with gnus. Is >> this possible? >> >> I asked this question on the mu4e mailing list, and it seems that the >> problems comes from the hook bbdb adds to message mode, which is run in >> mu4e-compose-mode as it extends message mode. > > I finally gave up trying to use mu4e in parallel to gnus for the same reason. BBDB checks current modes against the bbdb-muda-mode-alist variable, which you should be able to add to. It comes with (mu4e mu4e-view-mode) in there, maybe you can add something like (mu4e-message-mode message-mode) to the list and see if that works? I haven't looked exactly at how that variable is queried, but I'll bet you can trick BBDB into letting it pass. E -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: eudc conversion to bbdb (in bbdb3.1.2?)
Roland Winkler <wink...@gnu.org> writes: > On Sat, Nov 21 2015, Eric Abrahamsen wrote: >> I might add to this a clearer API for the "noticing" functionality of >> BBDB -- ie, make it easier to write the hooks for "doing things to >> BBDB records when you receive mails from/compose mails to those >> records. > > I didn't see your posting on the bbdb mailing list. But I am replying > only to this list because it appears to me that you are talking about > something internal to bbdb and not related to other packages. That's odd, I sent it to both, and set the followups-to header to this list, for the same reason you mentioned. > What do you have in mind? What is your (intended) usage scenario that > you are struggling with? I myself hardly use the noticing feature. So > I do not know what might be missing / what can be improved. Noticing records seems to be the main point of interaction between BBDB and the MUA. I've used it to add links to recent messages to a BBDB record field, and I'm also working on a feature to add Org-mode tags to BBDB records. It's hard to know whether the API should be improved, or just the documentation. The docs for `bbdb-notice-record-hook' are fairly clear, but I've found `bbdb-auto-notes-rules' pretty hard to understand. The two things seem almost redundant together -- by the time you've figured out how to use the auto notes rules, you might as well just write a hook and set the fields manually. I'd be curious to know how many people have actually made use of either the hook or the rules. Eric -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [AUCTeX] AUCTeX support in lettre
Vincent Belaïchewrites: > Hello Mosè, > > BBDB is some sort of phone book (well, it means insidious Big-Bother > Data Base). My intention is to have functions to read the to-address with > auto-completion by getting the data from BBDB by means of name or > organisation. Are you intending to provide support for some/all of the existing auto-completion packages (ac, helm, company, etc), or home-roll something of your own? Just curious, as I'm still fooling around with BBDB and completion. I use helm, and recently replaced auto-complete with company-mode, which I generally like better. But helm-bbdb is unmaintained (I asked, and was told I could have it!) and while company-mode completes fine on the To header in message-mode, it seems to have somehow broken cycling on the From header. Anyhow... this is a bit off-topic, so I won't follow up to the auctex list. E > It is not that simple because the way you present the address in a > postal sending may need some formatting dependent on the country, so > probably a defcustom is needed to make this more open. There may also be > some dependance on the LaTeX extension (koma-script, letter or lettre), > I have not investigated kom-script yet, but letter and lettre are quite > similar. > > The same recipient name may also be associated with several snail mail > address, so there also needs to be some selection mechanism for this > case. > > Concerning the place where to put the Elisp code, well I don't know > where the best place is, probably some new tex-bbdb.el would be a good > alternative. > > VBR, > Vincent Belaïche > > PS: CC to BBDB list. > >> From: m...@gnu.org >> Date: Fri, 13 Nov 2015 12:23:13 +0100 >> Subject: Re: [AUCTeX] AUCTeX support in lettre >> To: vincent@hotmail.fr >> CC: auc...@gnu.org >> >> Hi Vincent, >> >> 2015-11-12 23:23 GMT+01:00 Vincent Belaïche : >>> Dear AUCTeX experts, >>> >>> For your information I intend to add AUCTeX support to package lettre of >>> which I am the maintainer. >>> >>> Here is a preliminary verison, comments/brickbats welcome... >>> >>> http://svn.gna.org/viewcvs/lettre_observatoire/trunk/source/latex/lettre/lettre.el?revision=177=markup >> >> Just a comment: please use `TeX-read-string' instead of `read-string' ;-) >> >>> My intention is to add BBDB support, I have seen that this is also >>> in the TODO list of AUCTeX for class letter. I think that it would >>> be a good idea if some code could be commonalized for all letter >>> supporting classes (the three main ones, AFAIK, are letter, lettre, >>> and koma-script). >> >> I don't know what BBDB actually does, could you please briefly explain >> which features provides and how do you plan to integrate with your >> package? >> >>> Any idea how to do that ? Any suggestion where to start ? >> >> Do you mean how to commonalize the functions used in those style >> files? If so, indeed we don't have a real place where to put >> functions that should be used only in style files, they simply go in >> tex.el or latex.el, where appropriate. tex-style.el has been used so >> far only for variables (as stated also in the header). >> >> Bye, >> Mosè > > -- > ___ > bbdb-info@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bbdb-info > BBDB Home Page: http://bbdb.sourceforge.net/ -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2015-09-10
"Roland Winkler" <wink...@gnu.org> writes: > On Wed Sep 9 2015 Eric Abrahamsen wrote: >> "Roland Winkler" <wink...@gnu.org> writes: >> > You mean having two newline characters for the new `record' rule in >> > bbdb-separator-alist? Yes, I think that makes sense. >> >> Yup. Obviously it's a very small issue, but personally I'd prefer >> that. > > Done. > > Also, I have updated the lisp files to conform to the Emacs Lisp > package format convention. (Bug#45910) Good to see progress! Thanks, E -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2015-09-07 (new command bbdb-copy-fields-as-kill)
"Roland Winkler" <wink...@gnu.org> writes: > On Sun Sep 6 2015 Eric Abrahamsen wrote: >> Okay, here's a new version of the patch that does that. > > Please check my slightly different version of bbdb-copy-fields-as-kill. > I tried to avoid hard-coded formatting rules, but instead I added new > rules to the user variable bbdb-separator-alist. > > The other changes listed below are rather minor. > > 2015-09-07 Roland Winkler <wink...@gnu.org> > * lisp/bbdb-com.el (bbdb-search-changed): Fix docstring. > > 2015-09-07 Roland Winkler <wink...@gnu.org> > * lisp/bbdb-com.el (bbdb-delete-field-or-record): Use delete for > phone and address fields. > > 2015-09-07 Roland Winkler <wink...@gnu.org> > * lisp/bbdb-com.el (bbdb-copy-records-as-kill): Fix docstring. > Delete unused local variable marker. > > 2015-09-07 Roland Winkler <wink...@gnu.org> > * lisp/bbdb-com.el (bbdb-copy-fields-as-kill): New command. > * lisp/bbdb.el (bbdb-separator-alist, bbdb-mode-map): Update > accordingly. Looks good! I'd still personally prefer two newlines between records, but that's not a big deal. Thanks, Eric -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [PATCH] Function for copying field values
"Roland Winkler" <wink...@gnu.org> writes: > On Sat Sep 5 2015 Roland Winkler wrote: >> On Thu Sep 3 2015 Eric Abrahamsen wrote: >> > Basically it does what it says: if point is on a record name, the >> > whole record is copied, like before. If point is on a particular >> > field, the value (but not label) of that field is copied. >> >> I am just trying to understand a typical usage pattern for the >> extended code. I understand that it can make sense for a single >> record to grab the value of only one field. Yet what would this be >> good for with multiple records? It seems to me that with multiple >> records, this would make sense only if it included also the name of >> the record. > > One more thought: Why treat names special? The only field, where it > appears to make sense to grab its value from multiple records > without including some "identifier", would be the name field. > > Then, treating all fields the same way might work best with a > separate command bbdb-copy-field-as-kill instead of extending the > functionality of bbdb-copy-records-as-kill. The prefix arg could > then possibly be used in a different way: with prefix arg the > command could also grab the name field. (Or: include the name field > whenever this command operates on more than one record?) Yup, I asked myself many of these same questions, and I'm not really sure why I settled on the current behavior. All I really need is a quick way to copy and share addresses, phone numbers, and mails from my contacts -- usually just one, and I don't need the name attached. Beyond that, I'm happy to work this however seems most useful. Your last suggestion seems as good as anything I could come up with: why don't we do a separate function that only copies fields. If the name was included automatically when copying multiple records, then the prefix arg could be saved for selecting members from a list value, like it does now. Mostly that's useful when people have a million different email addresses. E -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
[PATCH] Function for copying field values
I've always wanted a function for easily copying the values of record fields. The attached patch replaces the `bbdb-copy-records-as-kill' function with a new function, `bbdb-copy-records-or-fields-as-kill'. Basically it does what it says: if point is on a record name, the whole record is copied, like before. If point is on a particular field, the value (but not label) of that field is copied. If the "*" prefix is given, the field value is copied from all records. If point is on a field that has a label (ie phones or addresses), only phones/addresses with the same label are copied from other records. Lastly, a numeric prefix argument will select the corresponding item from a field with a list value. If the field under point isn't a list, the argument is ignored. The implementation, while it seems to work just fine, is pretty ugly, particularly working around the various types and labels. I would love to know if this could be cleared up somehow. Also I just realized I didn't make a ChangeLog note -- if this patch is acceptable, I can send another version with the note included. Thanks, Eric >From 195e25433ecc4c092f25b1f71c59d2749a954045 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen <e...@ericabrahamsen.net> Date: Thu, 3 Sep 2015 14:25:30 +0800 Subject: [PATCH] New function for copying value of record fields * lisp/bbdb-com.el (bbdb-copy-records-or-fields-as-kill): Replace old function `bbdb-copy-records-as-kill' with new function `bbdb-copy-records-or-fields-as-kill'. * lisp/bbdb.el (bbdb-mode-map): Add new function to `bbdb-mode-map'. --- lisp/bbdb-com.el | 79 +--- lisp/bbdb.el | 2 +- 2 files changed, 71 insertions(+), 10 deletions(-) diff --git a/lisp/bbdb-com.el b/lisp/bbdb-com.el index 6074bab..8137f22 100644 --- a/lisp/bbdb-com.el +++ b/lisp/bbdb-com.el @@ -2548,20 +2548,81 @@ Default is the first URL." ;;; Copy to kill ring ;;;###autoload -(defun bbdb-copy-records-as-kill (records) +(defun bbdb-copy-records-or-fields-as-kill (records which) "Copy displayed RECORDS to kill ring. + +If point is on the record name, copy the whole record. If point +is on a particular field, copy only the value of that field. + Interactively, use BBDB prefix \ -[bbdb-do-all-records], see `bbdb-do-all-records'." - (interactive (list (bbdb-do-records t))) - (let (drec marker) +[bbdb-do-all-records], see +`bbdb-do-all-records'. If point is on a record name, all records +will be copied. If point is on a record field, the value of this +field for all records will be copied. If point is on a field +with a label, only field values with the same label will be +copied. + +If a numeric prefix is given, and the field being copied has a +list value, copy the list item at the index of the prefix +argument." + (interactive (list (bbdb-do-records t) + (and current-prefix-arg + (prefix-numeric-value current-prefix-arg + (let* ((field (bbdb-current-field)) + (field-name (car-safe field)) + (field-type (when field-name + (cond + ((eq 'xfields field-name) + (caadr field)) + ((memq field-name '(phone address)) + (cons field-name (aref (cadr field) 0))) + (t field-name + drec) (dolist (record (bbdb-record-list records t)) - (push (buffer-substring (nth 2 record) - (or (nth 2 (car (cdr (memq record bbdb-records - (point-max))) -drec)) + (if (or (eq field-name 'name) + (not field-name)) + ;; Copy the whole record. + (push (buffer-substring (nth 2 record) + (or (nth 2 (car (cdr (memq record bbdb-records + (point-max))) + drec) + ;; Or just the one field. + (let ((val (bbdb-record-field + (car record) + (cond ((symbolp field-type) + field-type) + ((consp field-type) + (car field-type)) + (when (memq field-name '(phone address)) + (dolist (v val) + ;; Only take phones and addresses with the proper label. + (setq val + (when (equal (aref v 0) (cdr field-type)) + v))) + ;; Format phones and addresses properly. + (when val + (setq val + (if (eq field-name 'phone) + (bbdb-phone-string val) + (bbdb-format-address-default val) + ;; Prefix arg `which' asks for a specific element from a + ;; list value + (when (and which + (listp val)) + (setq val (nth which val))) + (when val + (push val drec) (kill-new (replace-regexp-in-string "[ \t\n]*\\'" "\n" - (mapconcat 'identity (nreverse drec) "") + (mapconcat (lambda (v) + (if (stringp v) +v + (mapconcat #'identity + v + (nth 1 (or (cdr (assq field bbdb-separator-alist)) + bbdb-default-separator) + (nreverse drec) "\n"))) +(message "
Re: BBDB to the-rest-of-the-world
Didier Verna did...@xemacs.org writes: Hi, I know this is a recurrent topic, but what is your advice for exporting BBDB to google contacts and Mac Contacts ? I don't even need full synchronization, I usually only modify BBDB and propagate. I was using Asynk until recently, but it has never really worked, and now it doesn't work at all (when from 404 on some google page to no module named atom in the latest version). Back in the days, I was using a third-party thingy called bbdb-vcard-export (IIRC). Is there something like this for BBDB 3 ? There's a bbdb-vcard package in the package repositories, and I believe I've gotten that to work just fine with BBDB 3. Yours, Eric -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Update records in some Gnus groups
Eric Abrahamsen e...@ericabrahamsen.net writes: Phil Hudson phil.hud...@iname.com writes: On Thu, 30 Apr 2015 at 7:27:02 am BST, Glyn Millington glyn.milling...@gmail.com wrote: Nikolaus Rath nikol...@rath.org writes: On Apr 29 2015, Nikolaus Rath nikol...@rath.org wrote: Hello, Is there a way to have bbdb3 automatically update the records in some (but not all) Gnus (imap) groups? I tried writing a custom function for bbdb-mua-auto-update-p whose return value depends on the active group but I've had no luck (it seems this variable is just completely ignored). Glyn figured out the problem (see other thread). With bbdb/gnus-update-records-p set to nil, I can set bbdb-mua-auto-update-p to something like defun my-bbdb-select-message () Add people to bbdb when in certain groups. (cond ((string-match ^nnimap:INBOX gnus-newsgroup-name) (bbdb-select-message)) ((eq major-mode 'message-mode) (bbdb-select-message)) (t 'update))) ...and it actually takes effect. Problem solved :-). Result! And thank you for the function - I propose to steal that one! Let's all try to remember to record all our BBDB folklore on Emacswiki for posterity. Better yet, let's write a manual for BBDB version 3... Best yet, let's simplify BBDB's whole noticing mechanism, and _then_ write a manual for it. *ducks* -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Update records in some Gnus groups
Phil Hudson phil.hud...@iname.com writes: On Thu, 30 Apr 2015 at 7:27:02 am BST, Glyn Millington glyn.milling...@gmail.com wrote: Nikolaus Rath nikol...@rath.org writes: On Apr 29 2015, Nikolaus Rath nikol...@rath.org wrote: Hello, Is there a way to have bbdb3 automatically update the records in some (but not all) Gnus (imap) groups? I tried writing a custom function for bbdb-mua-auto-update-p whose return value depends on the active group but I've had no luck (it seems this variable is just completely ignored). Glyn figured out the problem (see other thread). With bbdb/gnus-update-records-p set to nil, I can set bbdb-mua-auto-update-p to something like defun my-bbdb-select-message () Add people to bbdb when in certain groups. (cond ((string-match ^nnimap:INBOX gnus-newsgroup-name) (bbdb-select-message)) ((eq major-mode 'message-mode) (bbdb-select-message)) (t 'update))) ...and it actually takes effect. Problem solved :-). Result! And thank you for the function - I propose to steal that one! Let's all try to remember to record all our BBDB folklore on Emacswiki for posterity. Better yet, let's write a manual for BBDB version 3... -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb3 won't stop auto-updating records
Glyn Millington glyn.milling...@gmail.com writes: Phil Hudson phil.hud...@iname.com writes: On Tue, 28 Apr 2015 at 10:34:32 am BST, Phil Hudson phil.hud...@iname.com wrote: The term mail alias itself seems to me to be poorly chosen, Replying to myself... I've thought of one, namely Gnus' use of group (meaning/derived from newsgroup) for what most MUAs call mailbox, folder or label. So... how about substituting mailing-list for mail-alias throughout? Both list and group lose the sense that alias has of being applicable to either an individual or a group. Maybe that's a reason for keeping mail-alias. Now I'm leaning toward declaring a matching *-mailing-list-* (Lisp) alias for each *-mail-alias-* declaration, without declaring anything obsolete. I would add (that is, a mailing list) or the moral equivalent to each occurrence of mail alias in the doc strings. This is tricky stuff. I don't want to make things worse with an ill-considered change. Maybe I should let it drop for now. Terminological changes can be tricky, and seem to provoke very long threads on other emacs-related groups! I think Eric's suggestion/hint/encouragement about a bbdb(3) manual is probably the answer, but I'm not remotely qualified to tackle such a thing. I find that Google plus a certain amount of grubbing round in the source code usually get me there. I wrote about a third of one and then ran out of steam. Maybe I can dig that up and provide it as a start... -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb3 won't stop auto-updating records
Phil Hudson phil.hud...@iname.com writes: On Tue, 28 Apr 2015 at 2:09:26 am BST, Eric Abrahamsen e...@ericabrahamsen.net wrote: Phil Hudson phil.hud...@iname.com writes: On Mon, 27 Apr 2015 at 5:59:07 pm BST, Glyn Millington glyn.milling...@gmail.com wrote: (add-hook 'message-setup-hook 'bbdb-mail-aliases) This led me to the documentation for bbdb-mail-aliases, which leads me to ask for an explanation of what a mail alias is. My guess is that it's either a unique nickname for a mail recipient, or a group name for multiple mail recipients, or possibly both/either. I've just checked, and as I thought, mail-alias is an unknown field type which I am asked to define. Before I go ahead, what does defining a field type involve? Defining a field type just means you're using a non-builtin field type for the first time, and BBDB is checking to make sure that you really wanted to do that. Once one of your records has this kind of field, you won't be asked again, and the field will be available as a completion option when adding fields to other contacts. That's all! Thanks for the explanation. That's no problem as far as it goes, but I wonder whether something with API support shouldn't be built-in and available by default? There's a certain impedance mismatch there, it seems to me. So, that's an RFE from me: don't ask the user to define the mail-alias type, have it ready for use out of the box, please. FWIW, I agree that fields that already have defined behavior should probably be pre-installed. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-record-set-field, strings, and 'eq
Eric Abrahamsen e...@ericabrahamsen.net writes: Roland Winkler wink...@gnu.org writes: On Tue Mar 10 2015 Eric Abrahamsen wrote: When `bbdb-record-set-field' is setting a phone or address field, it adds the new label to the list of existing labels like this: (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq) The labels are strings, and 'eq comparison means they're never equal Thank you, that's a bug, though fortunately one that does not affect daily usage of BBDB too much. I guess I thought these labels were symbols when I wrote this code. The same problem exists with bbdb-address-label-list. Yeah, I figured they were probably symbols at some point. And no, it certainly never became an issue -- I wouldn't have even noticed if I hadn't tried to upgrade helm-bbdb. I have several (more or less minor) patches for BBDB waiting, where lately I was too busy with other things to install them. I hope that soon I'll find the time to do that. Let us know if you want any help. I ought to have push access to the savannah repo, if it's just a matter of formatting some patches and throwing them up there. For this issue, this patch ought to do it. E From 0c5e9862df8cd3e8fd8a6844f34f7b3e614f06ac Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen e...@ericabrahamsen.net Date: Wed, 11 Mar 2015 18:03:29 +0800 Subject: [PATCH] Compare phone/address labels using equal * lisp/bbdb.el (bbdb-record-set-field, bbdb-parse-records): When collecting labels for phone and address fields, add-to-list should compare with equal. --- lisp/bbdb.el | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/bbdb.el b/lisp/bbdb.el index f32a74b..88725fc 100644 --- a/lisp/bbdb.el +++ b/lisp/bbdb.el @@ -2831,7 +2831,7 @@ See also `bbdb-record-field'. value 'equal))) (if check (bbdb-check-type value (bbdb-record-phone record-type) t)) (dolist (phone value) - (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq)) + (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'equal)) (bbdb-record-set-phone record value)) ;; Address @@ -2840,7 +2840,7 @@ See also `bbdb-record-field'. value 'equal))) (if check (bbdb-check-type value (bbdb-record-address record-type) t)) (dolist (address value) - (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'eq) + (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'equal) (mapc (lambda (street) (bbdb-add-to-list 'bbdb-street-list street)) (bbdb-address-streets address)) (bbdb-add-to-list 'bbdb-city-list (bbdb-address-city address)) @@ -3263,9 +3263,9 @@ If `bbdb-file' uses an outdated format, it is migrated to `bbdb-file-format'. ;; Set the completion lists (dolist (phone (bbdb-record-phone record)) -(add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq)) +(add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'equal)) (dolist (address (bbdb-record-address record)) -(add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'eq) +(add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'equal) (mapc (lambda (street) (bbdb-add-to-list 'bbdb-street-list street)) (bbdb-address-streets address)) (bbdb-add-to-list 'bbdb-city-list (bbdb-address-city address)) -- 2.3.2 -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-record-set-field, strings, and 'eq
Roland Winkler wink...@gnu.org writes: On Wed Mar 11 2015 Eric Abrahamsen wrote: For this issue, this patch ought to do it. The optional arg COMPARE-FN of add-to-list defaults to equal. So it does! Here's another. From 49be4b2f1e22075eb41c29a6e9e3e37fe23dc255 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen e...@ericabrahamsen.net Date: Wed, 11 Mar 2015 18:03:29 +0800 Subject: [PATCH] Compare phone/address labels as strings * lisp/bbdb.el (bbdb-record-set-field, bbdb-parse-records): When collecting labels for phone and address fields, add-to-list should use the default equal test for comparison. --- lisp/bbdb.el | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/bbdb.el b/lisp/bbdb.el index f32a74b..62dfc92 100644 --- a/lisp/bbdb.el +++ b/lisp/bbdb.el @@ -2831,7 +2831,7 @@ See also `bbdb-record-field'. value 'equal))) (if check (bbdb-check-type value (bbdb-record-phone record-type) t)) (dolist (phone value) - (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq)) + (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil)) (bbdb-record-set-phone record value)) ;; Address @@ -2840,7 +2840,7 @@ See also `bbdb-record-field'. value 'equal))) (if check (bbdb-check-type value (bbdb-record-address record-type) t)) (dolist (address value) - (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'eq) + (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil) (mapc (lambda (street) (bbdb-add-to-list 'bbdb-street-list street)) (bbdb-address-streets address)) (bbdb-add-to-list 'bbdb-city-list (bbdb-address-city address)) @@ -3263,9 +3263,9 @@ If `bbdb-file' uses an outdated format, it is migrated to `bbdb-file-format'. ;; Set the completion lists (dolist (phone (bbdb-record-phone record)) -(add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq)) +(add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil)) (dolist (address (bbdb-record-address record)) -(add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'eq) +(add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil) (mapc (lambda (street) (bbdb-add-to-list 'bbdb-street-list street)) (bbdb-address-streets address)) (bbdb-add-to-list 'bbdb-city-list (bbdb-address-city address)) -- 2.3.2 -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-record-set-field, strings, and 'eq
Roland Winkler wink...@gnu.org writes: On Tue Mar 10 2015 Eric Abrahamsen wrote: When `bbdb-record-set-field' is setting a phone or address field, it adds the new label to the list of existing labels like this: (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq) The labels are strings, and 'eq comparison means they're never equal Thank you, that's a bug, though fortunately one that does not affect daily usage of BBDB too much. I guess I thought these labels were symbols when I wrote this code. The same problem exists with bbdb-address-label-list. Yeah, I figured they were probably symbols at some point. And no, it certainly never became an issue -- I wouldn't have even noticed if I hadn't tried to upgrade helm-bbdb. I have several (more or less minor) patches for BBDB waiting, where lately I was too busy with other things to install them. I hope that soon I'll find the time to do that. Let us know if you want any help. I ought to have push access to the savannah repo, if it's just a matter of formatting some patches and throwing them up there. Eric -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
bbdb-record-set-field, strings, and 'eq
When `bbdb-record-set-field' is setting a phone or address field, it adds the new label to the list of existing labels like this: (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq) The labels are strings, and 'eq comparison means they're never equal, so duplicate strings are added each time: (length bbdb-phone-label-list) - 197 (length (delete-dups bbdb-phone-label-list)) - 7 I'm assuming it should just be using 'equal instead -- is there any reason for the duplication? Eric -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Wrong type argument:arrayp, nil
Enrico Pirani enrico.pir...@gmail.com writes: BBDB suddenly is giving me this error when I try to search a string. The database is located in Dropobx directory. I am using the BBDB installed from melpa on a MacOSX (Emacs installed with Mac Ports). I have a Linux with the same configuration which is working with no errors. This is my config regarding on init.el: ;; BDB setup (bbdb-initialize 'gnus 'message) (bbdb-insinuate-message) (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) (setq bbdb-file ~/Dropbox/bbdb) (setq bbdb-send-mail-style 'gnus) (setq bbdb-complete-name-full-completion t) (setq bbdb-completion-type 'primary-or-name) (setq bbdb-complete-name-allow-cycling t) (setq bbdb-offer-save 1 bbdb-use-pop-up t bbdb-electric-p t bbdb-popup-target-lines 1 ) Hi Enrico, It would be helpful if you could call `toggle-debug-on-error', then reproduce the error, and post the resulting backtrace here. That will make it much easier for people to help you. Eric -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: *M-x bbdb-print
rene jl...@yahoo.com writes: Roland Winkler winkler at gnu.org writes: On Sun Aug 31 2014 Rene wrote: When using *M-x bbdb-print or even M-x bbdb-print I only get a TeX file containing the current displayed record (the one my pointer is on in the *BBDB* buffer). All these commands use the prefix `*', see the docstring of bbdb-print. Strange thing. The prefix `*' (bbdb-do-all-records) works alright for commands like *t or *m. On the other hand, the prefix doesn't seem to be working with *M-x bbdb-print. I keep getting a TeX file holding only the record my pointer is on. How is that possible? Any idea about how to fix that? I don't think the * prefix works if you're using M-x to call a command. Maybe try binding `bbdb-print' to a key, then using the * prefix with that key? Eric -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
[PATCH] custom format functions -- don't use dynamic variable access
Attached is a patch that changes how variables are accessed by custom field formatting functions. We've been relying on dynamic variable access by those functions, but the variables should probably be passed in as arguments instead. Eric From 8233febf7614290f3375c56ef4be4ceceb9da196 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen e...@ericabrahamsen.net Date: Thu, 20 Nov 2014 12:31:07 +0800 Subject: [PATCH] Pass dynamic vars to custom format functions * lisp/bbdb.el (bbdb-display-record-multi-line): Custom field-formatting functions should receive relevant variables as arguments, not access them dynamically. Proofing for lexical binding. --- lisp/bbdb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/bbdb.el b/lisp/bbdb.el index ba7423a..f32a74b 100644 --- a/lisp/bbdb.el +++ b/lisp/bbdb.el @@ -3789,7 +3789,7 @@ FIELD-LIST is the list of actually displayed FIELDS. (setq start (point)) (cond (;; customized formatting (setq formatfun (intern-soft (format bbdb-display-%s-multi-line field))) - (funcall formatfun record)) + (funcall formatfun record indent fmt start)) ;; phone ((eq field 'phone) (dolist (phone (bbdb-record-phone record)) -- 2.1.3 -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-print and utf8 bbdb file
die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes: Hello list, my bbdb file is encoded in utf8 and when I try to print entries and converting the resulting bbdb.tex file, I'm getting weird characters in either the .dvi and .pdf file. How would you deal with the situation? I've never even gotten bbdb-print to work, it's always complained about undefined control sequences or something. The tex code is very old, and doesn't make any provisions for non-latin characters. Probably the easiest stop-gap would be to change bbdb-print-prolog and bbdb-print-epilog to wrap the whole thing in latex statements or what have you, either make use of babel, or xelatex. I don't know if that would be enough to do the trick, but if it worked it would be the simplest solution. Eric -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: BBDBv3 will lost record when snarf an exist email to database.
Roland Winkler wink...@gnu.org writes: On Sat Aug 2 2014 stardiviner wrote: When I use =bbdb-snarf= to add email to a new record. report error: When I try to re-add this email, after lost the record, it report error: =(error BBDB: marker absent)= I think BBDB show check the database before really do write action. If database has exist the email, then raise exist record, or raise error. BTW, BBDB will raise error when move to next record which is already at last record. I think BBDB should not raise this error, just a message in minibuffer is fine. I am sorry, can you provide a more accurate recipe for how to reproduce the bug you observe? See the emacs manual for reporting bugs. This thread reminded me of the existence of bbdb-snarf (it's still fairly useful for simple name/email combinations), and I started using it, and I hit the same bug. bbdb-snarf checks if the snarfed record already exists, and merges the old and new, if so. The new record needs to be fully created (with `bbdb-change-record', with the NEW argument true) before that happens. Otherwise, when it's passed to `bbdb-merge-record', it eventually gets created with a call to `bbdb-change-record' where the NEW argument is false. That makes a sort of Frankenstein record with no cache, and that causes problems. Anyhow, I think the solution is as simple as the attached patch, which always calls (bbdb-change-record record t t) whether or not the new record is going to be merged. E From 610a4f8e2e8ae403aeb443a0602534d44e40dbe5 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen e...@ericabrahamsen.net Date: Sat, 9 Aug 2014 16:40:11 +0800 Subject: [PATCH] Fully create snarfed records before merging them * lisp/bbdb-snarf.el (bbdb-snarf): When snarfing a record that may already exist, `bbdb-snarf' uses `bbdb-merge-records' to merge them. Merging won't work unless the new record is fully created (ie cached). --- lisp/bbdb-snarf.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/bbdb-snarf.el b/lisp/bbdb-snarf.el index aa3f00a..9c39f6c 100644 --- a/lisp/bbdb-snarf.el +++ b/lisp/bbdb-snarf.el @@ -318,10 +318,10 @@ See `bbdb-snarf-rule-alist' for details. (bbdb-record-firstname record) (bbdb-record-lastname record)) (car (bbdb-record-mail record)) + ;; create new record + (bbdb-change-record record t t) (if old-record (bbdb-merge-records old-record record) -;; create new record -(bbdb-change-record record t t) (bbdb-display-records (list record)) record -- 2.0.4 -- ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: define faces for variant BBDB field names
stardiviner numbch...@gmail.com writes: I try to define custom faces to be applied in variable =bbdb-name-face-alist= for variant field names. Here is my try: #+BEGIN_SRC emacs-lisp ;;; define variant faces for variant xfields ;; TODO: improve it (setq bbdb-name-face-alist '((mail . bbdb-field-mail) (mail-alias . bbdb-field-mail-alias))) (defface bbdb-field-mail '((t (:inherit bbdb-field-name :foreground green yellow))) Face used for BBDB fields. :group 'bbdb-faces) (defface bbdb-field-mail-alias '((t (:inherit bbdb-field-name :foreground yellow))) Face used for BBDB fields. :group 'bbdb-faces) #+END_SRC But this seems does not work. I checked the docstring of =bbdb-name-face-alist=. I think this is just a misunderstanding about what `bbdb-name-face-alist' does. It *only* provides font-locking for the actual name of the record, not the other fields. You give the record an xfield called 'name-face, and the *value* of that field points to one of the keys of `bbdb-name-face-alist'. Then the specified face is used to format the name of the record, none of its other fields. HTH, Eric Description about the ~KEY~. #+BEGIN_QUOTE the xfield name-face of this record should have the value KEY. The value of name-face may also be a face which is then used directly. If none of these schemes succeeds, the face `bbdb-name' is used. #+END_QUOTE I think maybe I do not have the ~KEY~ (like ~mail~, ~mail-alias~) defined. So How to defined those key automatically based on the BBDB database? If it's not what I'm thinking. Then what it is? -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/ -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb-do-all-records with mail-alias
die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes: Hello, is it normal that bbdb-do-all-records is *not* working for all entries in conjunction with mail-aliases *a, only the entry where the cursor is sitting? I'm using emacs 24.3.92.2 and bbdb 3.1.2... Thanks Dieter Unfortunately, it looks like adding fields to multiple records with the * prefix isn't supported... -- Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071iu=/4140/ostg.clktrk ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: %%(org-bbdb-anniversaries)
Steven Arntson ste...@stevenarntson.com writes: My previous issues with BBDB suddenly not working are resolved, thanks to this list! And I'm now persevering into the world of linking my BBDB anniversaries fields with my org-agenda. I've got a diary.org file set up, which I added to my agenda files. I added the following lines to diary.org: * Anniversaries #+CATEGORY: Anniv %%(org-bbdb-anniversaries) However, when I try to bring up my org-agenda now (M-x org-agenda a), the message I receive is: Bad sexp at line 13 in /home/steven/diary.org: (org-bbdb-anniversaries) Line #13 is the final line in the excerpt above. Does anyone know why I'm getting this error? Thank you! Steven Arntson There might be more than one way to address this, but what I do is give my BBDB contacts an anniversary field, like: anniversary: 1948-03-08 birthday Then in my Org setup: (setq org-agenda-include-diary t) And in my BBDB setup: (require 'bbdb-anniv) (add-hook 'diary-list-entries-hook 'bbdb-anniv-diary-entries) Am I missing anything? I think that's all the relevant stuff. I like this because the anniversaries are on the contacts themselves, where (I feel) they belong, and I don't need a diary.org file. They just show up in the agenda where they're supposed to. Hope that works! Eric -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2014-05-06
Barak A. Pearlmutter ba...@cs.nuim.ie writes: I'd check for the function. Seems more robust. (E.g., if someone forks an older version and updates the date string, or if the function is renamed or removed in the future.) If there's a bug you need to check for you can always complicate the guard later. --Barak. Fair enough! I'll give it a crack that way for now. Thanks, Eric -- HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing Easy Data Exploration http://p.sf.net/sfu/hpccsystems ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
add bbdb-mail-aliases to bbdb-insinuate-gnus?
For a year or more I've been mildly curious about why mail aliases didn't work in BBDB -- nothing ever expanded. I finally tried to figure out why, and realized you have to manually call `bbdb-mail-aliases' in order to make it work. It seems like this is something that should happen on (bbdb-initialize 'gnus), doesn't it? Inside `bbdb-insinuate-gnus' (or somewhere else appropriate) couldn't we check to see if any records have a mail-alias field, and automatically set up the mail aliases, if so? I'd be happy to provide a patch. Eric -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2014-05-06
Roland Winkler wink...@gnu.org writes: (1) BBDB now allows arbitrary lisp expressions as values of xfields. Interactively, you can call bbdb-insert-field or bbdb-edit-field with a prefix arg for this. If the value of an xfield is not a string, it is displayed using the same pretty-printer used by describe-variable. There might still be some rough edges with this new feature that I have overlooked. Please report them here. Very cool! Thanks! (2) Do not treat bbdb-change-hook special when inside bbdb-notice-mail-hook or bbdb-notice-record-hook. 2014-05-06 Roland Winkler wink...@gnu.org Do not treat bbdb-change-hook special when inside bbdb-notice-mail-hook or bbdb-notice-record-hook. * lisp/bbdb.el (bbdb-notice-mail-hook, bbdb-notice-record-hook): Update docstring. (bbdb-notice-hook-pending): Remove. (bbdb-change-record): Always call bbdb-change-hook if a record was changed. * lisp/bbdb-mua.el (bbdb-update-records, bbdb-annotate-message): Change accordingly. 2014-05-06 Roland Winkler wink...@gnu.org Allow arbitrary lisp expressions as values of xfields. * lisp/bbdb.el (bbdb-record-type): Update accordingly. (bbdb-string-trim): New optional arg null. (bbdb-record-xfield-intern): Return xfield value unmodified if it is not a string. (bbdb-record-xfield-string): New function. (bbdb-record-xfield-split): Throw error if xfield value is not a string. (bbdb-record-set-xfield, bbdb-record-set-field) (bbdb-merge-xfield, bbdb-display-record-one-line) (bbdb-display-record-multi-line) * lisp/bbdb-com.el (bbdb-search, bbdb-read-field) (bbdb-edit-field, bbdb-read-xfield): Allow xfield values that are not a string. (bbdb-add-mail-alias): Simplify. 2014-05-06 Roland Winkler wink...@gnu.org * lisp/bbdb.el (bbdb-parse-postcode): Finish immediately if one test succeeds. BBDB is available at http://savannah.nongnu.org/projects/bbdb/ -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3 signs your SCM is hindering your productivity #149; Requirements for releasing software faster #149; Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/ -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3 signs your SCM is hindering your productivity #149; Requirements for releasing software faster #149; Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Compose mail to everyone whose record is displayed, including all addresses in the net field?
Roland Winkler wink...@gnu.org writes: On Sun May 4 2014 Eric Abrahamsen wrote: kid name net: m...@gmail.com, d...@gmail.com AKA: family name mail-alias: soccer_team_name I would ideally like to list all email addresses in each BBDB tuple in the To: field of the email using one command on the *BBDB* buffer. Check the docstring for bbdb-mail, which is the function that starts mail composition from the BBDB buffer. Looks like if you give it a C-u prefix, it will use all of the mail addresses. If you're combining this with the * prefix to act on all the visible records, you've got to hit the * before the C-u prefix key. The above reply refers to BBDB 3. It seems that Marc is using BBDB 2. I do not know about the latter. Marc, can you switch to BBDB 3? Whoops, should have noticed that... -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Compose mail to everyone whose record is displayed, including all addresses in the net field?
Marc D Ronell mron...@alumni.upenn.edu writes: Hi, Apologies if this is well documented, but I seem to be blind to the entries. I have bbdb entries with multiple addresses in the net field as a comma separated list of email addresses (see net: m...@gmail.com, d...@gmail.com below). The BBDB entries are often tagged as either a single family name or the name my kid's team members (See 'kid name' below from *BBDB* buffer). The net list field often has the email addresses of two separate parents. If I search the bbdb dB and create a list of matching tuples, can I then easily create an email which includes *all* of the entries (ie not just the first) from the net field for each BBDB tuple? kid name net: m...@gmail.com, d...@gmail.com AKA: family name mail-alias: soccer_team_name In the case above, if I have a list of 12 families, having used the mail-alias soccer_team_name, can I ensure that both m...@gmail.com and d...@gmail.com emails are included in that list when I use something like *m in the *BBDB* entry buffer? I would ideally like to list all email addresses in each BBDB tuple in the To: field of the email using one command on the *BBDB* buffer. Thanks, Marc Check the docstring for bbdb-mail, which is the function that starts mail composition from the BBDB buffer. Looks like if you give it a C-u prefix, it will use all of the mail addresses. If you're combining this with the * prefix to act on all the visible records, you've got to hit the * before the C-u prefix key. Hope that helps, Eric -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: xfield with non-string value?
Roland Winkler wink...@gnu.org writes: On Thu Apr 24 2014 Eric Abrahamsen wrote: I'm trying to create a custom xfield for records that is a list, not a string. So far as I can tell, it's only possible for xfield values to be strings. Is that correct? Is it possible to circumvent this at the moment? By default, the values ox xfields should be strings. Nonetheless, there are various ways to go beyond that: - bbdb-record-xfield-intern returns the interned value (i.e., a symbol) of an xfield LABEL - bbdb-record-xfield-split splits the value as a list of strings. (See the source code of BBDB for how these functions are used in various places.) - If you want to go beyond the constraint that the stored values of an xfield should be strings, this requires more of an effort. You need to define functions bbdb-display-XFIELD-LAYOUT and bbdb-read-xfield-XFIELD, plus possibly modifications elsewhere. I have not tried that myself as I did not find it necessary for anything I wanted to do with BBDB. The problem is that then your bbdb-file can be handled only if your customizations are first properly loaded. This can make debugging more difficult. Roland Thanks for this! Very useful starting places. Something I've wanted to do for a long time is make an xfield that stores pointers to the N most recently received mails (in Gnus) from the record in question. I don't necessarily expect it will work, but I wanted to give it a shot. Thanks again, Eric -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: xfield with non-string value?
Gijs Hillenius g...@hillenius.net writes: On 24 Apr 2014, Eric Abrahamsen wrote: Roland Winkler wink...@gnu.org writes: On Thu Apr 24 2014 Eric Abrahamsen wrote: I'm trying to create a custom xfield for records that is a list, not a string. So far as I can tell, it's only possible for xfield values to be strings. Is that correct? Is it possible to circumvent this at the moment? By default, the values ox xfields should be strings. Nonetheless, there are various ways to go beyond that: - bbdb-record-xfield-intern returns the interned value (i.e., a symbol) of an xfield LABEL - bbdb-record-xfield-split splits the value as a list of strings. (See the source code of BBDB for how these functions are used in various places.) - If you want to go beyond the constraint that the stored values of an xfield should be strings, this requires more of an effort. You need to define functions bbdb-display-XFIELD-LAYOUT and bbdb-read-xfield-XFIELD, plus possibly modifications elsewhere. I have not tried that myself as I did not find it necessary for anything I wanted to do with BBDB. The problem is that then your bbdb-file can be handled only if your customizations are first properly loaded. This can make debugging more difficult. Roland Thanks for this! Very useful starting places. Something I've wanted to do for a long time is make an xfield that stores pointers to the N most recently received mails (in Gnus) from the record in question. I don't necessarily expect it will work, but I wanted to give it a shot. In BBDB v2 there was a function that allowed the storing of Subject lines and information about the mail client. I don't yet remember its name/the names. But that could be a start? It wouldn't be hard to store information about a *single* message: you could concatenate message id, subject, group name, and whatever else into a single string, if necessary. But to be really useful, I was hoping to get a value like: '(((234234 323423) Message subject 87k3aelq1m@ericabrahamsen.net gnus:org-syntax-link) ((657465 234232) Other subject 87y4z0l0xi@talktalk.net gnus:org-syntax-link)) I've got the easy part done: collecting this information in a notice hook and getting ready to do an xfield save -- but that's where it gets difficult! Eric -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2014-04-12
Roland Winkler wink...@gnu.org writes: John Smith; John Smith, Jr; J. Smith, Esquire I guess we have no shortage in such examples requiring something like `;' instead of `,'. Besides AKAs / names, we may also have organization: HAL, Inc.; Smith, Miller Davis; Company 17 Yet worse mail: sm...@example.com; Smith, John smit...@smith.com; jsm...@foo.com One proper solution to all this (plus a few other nuisances) could be an interface for editing BBDB records similar to the widget-based interface for customizing Emacs user variables. Or to store the value as a list of strings, and make users loop through each string with RET when they edit the value. Sort of like what happens now when you edit a name that distinguishes between surname and given name. It sounds a bit bothersome, but I think in practice it wouldn't be that difficult. I can't stand the widget system, but that's just one opinion, obviously... E -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: newbie question
Steven Arntson ste...@stevenarntson.com writes: I'm using gnus to read emails with POP functionality. I'm a little confused about how the mails I send to people are saved. When I send new mail from within the gnus buffer with 'm' the message seems to get archived in a place like nnfolder+archive:sent.2014-04. But when I send a new mail from another buffer using C-x m, that mail seems to disappear without getting saved anywhere. I'd like to save those, if they aren't saved--preferably the same way the others are. Unless I am completely misunderstanding what's going on! Thank you, steven Hi Steve, Try this: (setq mail-user-agent 'gnus-user-agent) That will tell the generic message functions to take their behavior from the gnus setup. Give it a shot! (PS, you probably want to send queries like this to the gnus.general list, not to the bbdb list) Yours, Eric -- Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: BBDB anniversaries in the calendar/diary
Roland Winkler wink...@gnu.org writes: On Thu Nov 28 2013 Uwe Brauer wrote: I use (require 'bbdb-anniv) (add-hook 'list-diary-entries-hook #'bbdb-include-anniversaries) In my 2.35 bbdb version and I do see the anniversaries marked in the calendar. Are you saying this is not possible in vs 3? You are talking about which version of bbdb-anniv.el and which version of Emacs? For bbdb 2.35, I only know bbdb-anniv.el by Ivar Rummelhoff (dated 1998). This code uses add-to-diary-list to communicate with diary, and this function is also used by bbdb-anniv.el in BBDB 3. With recent versions of GNU Emacs, add-to-diary-list only works with the diary buffer, but -to the best of my knowledge- it cannot mark these entries in the calendar buffer. I'd certainly be glad to know if and how this approach can also be extended to marking entries in the calendar buffer. Roland It might be worth looking at the code in org-bbdb.el: org-bbdb-make-anniv-hash builds a hash table of all anniversaries in the BBDB, which would be a useful starting place. Key is (month date), value is ((year record-name anniversary-type) (year record-name anniversary-type) etc). Load org-bbdb.el and populate the hash with org-bbdb-make-anniv-hash. Then some setup: (add-hook 'calendar-move-hook (lambda () (maphash (lambda (k v) (calendar-mark-visible-date `(,(car k) ,(cadr k) ,displayed-year)) ; later add custom face org-bbdb-anniv-hash))) And then this, a mashup of calendar-cursor-holidays and bbdb-anniv-diary-entries: (defun bbdb-anniv-cursor-anniv (optional date) (interactive) (or date (setq date (calendar-cursor-to-date t))) (let* ((date-string (calendar-date-string date)) (m (car date)) (d (second date)) (anniv-list (gethash (list m d) org-bbdb-anniv-hash)) leaps msg) ;; leap year handling from bbdb-anniv (when (and (= m 3) (= d 1) (not (null (gethash (list 2 29) org-bbdb-anniv-hash))) (not (calendar-leap-year-p y))) (setq leaps (gethash (list 2 29) org-bbdb-anniv-hash)) (mapcar (lambda (l) (push l anniv-list)) leaps)) (when anniv-list (setq msg (format %s: %s date-string (mapconcat (lambda (a) (let ((form (cdr (assoc (intern (nth 2 a)) bbdb-anniv-alist))) yy text ord) (setq yy (if (car a) (- (calendar-extract-year date) (car a)) 100) ord (when ( yy 0) (diary-ordinal-suffix yy)) text (or form unspecified for %n) text (replace-regexp-in-string \\`[ \t]+ text) text (replace-regexp-in-string [ \t]+\\' text) text (replace-regexp-in-string %n (nth 1 a) text)) (if (and yy ord) (format text yy ord) text))) anniv-list ; ))) (message %s msg (add-hook 'calendar-mode-hook (lambda () (define-key calendar-mode-map (kbd b) 'bbdb-anniv-cursor-anniv))) This is the simplest hack, but obviously we wouldn't want to borrow org code, and bbdb-anniv could probably use some refactoring. But it's a starting place. Would a separate anniversary hash table be something desirable in BBDB itself? Or Anyway, food for thought. Eric -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: BBDB anniversaries in the calendar/diary
Roland Winkler wink...@gnu.org writes: On Sun Dec 1 2013 Eric Abrahamsen wrote: It might be worth looking at the code in org-bbdb.el: org-bbdb-make-anniv-hash builds a hash table of all anniversaries in the BBDB, which would be a useful starting place. Key is (month date), value is ((year record-name anniversary-type) (year record-name anniversary-type) etc). Load org-bbdb.el and populate the hash with org-bbdb-make-anniv-hash. There are various possibilities to achieve such a goal in more or less dirty ways using different hooks, see also GNU Emacs bug#15987. (I do not see the need to populate a hash table as an intermediate step, as it requires more coding efforts to keep such a hash table up to date when BBDB records get modified.) Yet I wish that, first of all, diary/calendar would officially support such a thing so that BBDB and org-mode need not hook into diary/calendar in some dirty ways. As a general strategy, with the new BBDB I want to avoid trying to be smarter than the main Emacs which BBDB builds upon. In my humble opinion, the old BBDB contained too many patches of that kind. Oh sure, I don't think this is a good solution by any means. It just presented itself as the shortest distance from here to there, at present. I hadn't read the conversation on the bug report. My 2 cents is that the calendar and the diary ought to be separate or at least separable things. I want to use the calendar; I have no need for the diary. Org mode users, in particular, will be using org to do what diary does, and my guess is most of us would like the bbdb-to-calendar integration to be separate from the diary. As you mention in the report, there's really no reason for an intermediate file. That's why `calendar-mark-visible-date' seemed like the best entry point: it's actually quite clean. But the rest of the code (including population of org-bbdb-anniv-hash) only works because org-bbdb loads diary-lib and does all the diary-related stuff for us. Does calendar/diary separation seem like a good idea? I could possibly chime in on the bug report... E -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: sharing data between bbdb records
Roland Winkler wink...@gnu.org writes: On Tue May 28 2013 Eric Abrahamsen wrote: Yup, I think changes would be confined to bbdb.el. ...and bbdb-com.el The latter contains the user interface for creating and editing BBDB records, and this is possibly the trickier part. Having fancy editing and printing functions is one thing. But establishing a user interface that uses the right functions in the right moment without too much extra effort could be much trickier. Currently such thoughts have a rather low priority on my agenda. No surprise there -- plenty of time. -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: sharing data between bbdb records
Roland Winkler wink...@gnu.org writes: On Tue May 28 2013 Eric Abrahamsen wrote: Could the organization field, instead of being a string, actually be a link (or a search-string) to a separate record? Then when you display an individual record that links to that organization, there could be a display-only, virtual work address shown for that individual. Gets you partway there, anyway. I guess that a proper solution to this problem could be some sort of this kind. But I'd prefer to have such a solution not only for the organization field but, say, for addresses too. In any case, links go beyond the currently supported format of the database file. That's why all this goes beyond what is currently possible. I once half-jokingly suggested rewriting BBDB to use the EIEIO object system. The joke part was only because it would be a hell of a lot of work: actually I think an OO-type system is pretty much ideal for what BBDB does. Advantages I can think of: 1. Probably a much smaller codebase, at least for bbdb.el, also clearer and easier to maintain. 2. You'd get multiple databases (and I think remote databases) for free with eieio-persistent 3. Incoming data checking/cleaning/validation becomes methods on field classes 4. Inheritance of field classes means it becomes very easy for users to create new kinds of fields 5. Printing methods on field types means users can override how existing fields are displayed in the *BBDB* buffer 6. I'm pretty sure those same printing methods could be used to store text properties and other fancy display stuff along with the data 7. Reading/printing methods for the database as a whole would make it easier to write importers/exporters for BBDB. Database printers could (I think) also override existing field printers, so users could run an existing LaTeX exporter (for instance), but just override how some of the fields were converted to latex. 8. It would be easier to attach arbitrary methods to certain field types, to make them do things, ie notify a birthday, send an IM, etc. It's still more or less pie-in-the-sky, but I think it makes a lot of sense in principle. Eric -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: sharing data between bbdb records
Roland Winkler wink...@gnu.org writes: On Tue May 28 2013 Eric Abrahamsen wrote: I once half-jokingly suggested rewriting BBDB to use the EIEIO object system. The joke part was only because it would be a hell of a lot of work: actually I think an OO-type system is pretty much ideal for what BBDB does. Advantages I can think of: Actually, without knowing too much about EIEIO, I believe that such a thing would be doable. I already tried to separate different layers of the code as much as possible. Not sure. Many nitty-gritty details of BBDB internals are related to the MUA interfaces of BBDB. Yup, I think changes would be confined to bbdb.el. It's still more or less pie-in-the-sky, but I think it makes a lot of sense in principle. Well, this could become BBDB v4 I had imagined you'd find that thought somewhat exhausting, having only just finished v3, but if not that's great! E -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: sharing data between bbdb records
Roland Winkler wink...@gnu.org writes: On Mon May 27 2013 Gijs Hillenius wrote: Very happy user of bbdb, but one with a one long-standing question. Consider two or three records, that share some information, Me too, I have been annoyed by this. Yet you did not miss anything. Currently BBDB does not allow that multiple records share some information so that this can be entered and updated only once. Such a feature reqires substantial modifications of BBDB internals, including the data format. Could the organization field, instead of being a string, actually be a link (or a search-string) to a separate record? Then when you display an individual record that links to that organization, there could be a display-only, virtual work address shown for that individual. Gets you partway there, anyway. -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: setting bbdb-mua-pop-up to horiz
Roland Winkler wink...@gnu.org writes: On Tue Apr 16 2013 Eric Abrahamsen wrote: Right now, setting bbdb-mua-pop-up to 'horiz splits the *Summary* buffer horizontally, not the *Article* buffer! Perhaps because point is in the *Summary* buffer when *BBDB* is popped? My *Summary* buffer takes up much less of the frame than *Article*, so I would have thought `bbdb-pop-up-window' would have identified that as the proper candidate for splitting. Anyhow, I see that `bbdb-pop-up-window' doesn't do anything mua-specific (but looking at the mailing-list that appears to have been intentional). The horizontal splitting is controlled by the arg HORIZ-P of bbdb-pop-up-window. This is a predicate generated by calling bbdb-mua-window-p. Essentially, this says that BBDB will split *a* window used by your MUA that is big enough for splitting. (The concept used here by bbdb v3 is the same used by v2.) You could try instead something like (untested) (defun bbdb-mua-window-p () Return lambda function matching the selected MUA window. This return value can be used as arg HORIZ-P of `bbdb-display-records'. `(lambda (window) (eq window ,(selected-window Whoo, that was confusing! This works for gnus: (defun bbdb-mua-window-p () Return lambda function matching the selected MUA window. This return value can be used as arg HORIZ-P of `bbdb-display-records'. `(lambda (window) (or (eq (window-buffer window) (get-buffer ,gnus-article-buffer)) (eq window ,(selected-window) Obviously this clobbers whatever was in bbdb-mua-mode-alist, and while I was hoping the second `or' clause would allow it to work for message mode as well, message mode still pops up with a vertical split, at the bottom. But at least this works for gnus... E -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
setting bbdb-mua-pop-up to horiz
I'm using dev versions of gnus and bbdb. When looking through a gnus group, bbdb pops up its window at the bottom of the frame, ie I have *Summary*, *Article*, and *BBDB* in three layers, one on top of the other. I just realized this makes little sense: most of the articles I read are line-wrapped, and *BBDB* usually isn't very wide either, so it would make much more sense to have *Summary* on top, then below that *Article* on the left and *BBDB* on the right. Right now, setting bbdb-mua-pop-up to 'horiz splits the *Summary* buffer horizontally, not the *Article* buffer! Perhaps because point is in the *Summary* buffer when *BBDB* is popped? My *Summary* buffer takes up much less of the frame than *Article*, so I would have thought `bbdb-pop-up-window' would have identified that as the proper candidate for splitting. Anyhow, I see that `bbdb-pop-up-window' doesn't do anything mua-specific (but looking at the mailing-list that appears to have been intentional). Is there anything I can do to get this working? It would be great to have this work on message-mode composition buffers as well.. E -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [PATCH] TAB completion for organization field
Roland Winkler wink...@gnu.org writes: On Fri Dec 28 2012 Stefan Monnier wrote: rewrite. But I believe it does not (yet?) offer completion when the result of the completion is supposed to be a list of values. IIUC completing-read-multiple should do what you want (and has been included in Emacs for a while, at least since Emacs-22 if not longer). The keymap used by completing-read-multiple binds SPC to crm-complete-word. For users not expecting completion, this has two consequence that might appear counterintuitive: - If one string in the list of return values is supposed to contain the SPC character (which I do not find unusual in the context of, say, the organization field of BBDB), this requires C-q SPC. - In BBDB, the list of organizations is displayed with the two-character string , as separator. Likewise, this list of organizations is generated from the return value of read-string using split-string with separator [ \t\n]*[;,][ \t\n]*. Such regexps are not supported by crm-separator. (The latter must be a single character string). I still believe that completing-read-multiple is a cool feature and I might like to use it myself for entering organizations into BBDB. Yet I do not know whether all users will be happy with this feature in the context of BBDB's organization field. So it might be better to make it customizable whether BBDB uses read-string or completing-read-multiple. Yeah, I've been poking at it and you're right it would be hard to integrate it seamlessly, without any surprises to the user. Let me see if I can come up with an okay compromise. -- Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [PATCH] TAB completion for organization field
Roland Winkler wink...@gnu.org writes: On Fri Dec 28 2012 Eric Abrahamsen wrote: Yup, I thought of this problem but it seems like it's fudged in other places (ie you can't complete on subsequent values in an AKA field) so I figured this was good enough for now. It's different in the sense that the values of the organization field are shared more often among different records. For something like AKA this would be odd. But AKAs are used in the MUA interface. For the organization field this would not be possible. Ultimately, this defines the difference between these fields from a more conceptual point of view. Yes, I guess it's sort of the same idea in reverse. Anyhow in this case Stefan's suggestion of `completing-read-multiple' works. I've tried using that in `bbdb-read-string' and it works as advertised. Looking through the code, the only thing this would screw up would be completing labels for phones and addresses -- suddenly it would be possible to add multiple labels to phones/addresses, which would be nonsensical. There would be a number of relatively simple ways around that, though. I can make a record for an organization, with its organization name in the name field, and say an office front desk number in the phone field, etc, but them is there a way of indicating that a separate record (for a person), works there? I can't fill the person's organization field with a foreign key to the organization record, right? I realize this is approaching a relational database model, and is a can of worms that's probably not worth opening. I was just curious. Ultimately this is not so different from, say, families of friends. In a a way, families are just small organizations. It would be nice if such records could share fields like the mailing address and home phone numbers. But I have no clue how to implement that within BBDB. Probably you'd end up using EIEIO to make different classes for people, phones, addresses and organizations, and linking them together. I've thought before (in a very idle way) that the structs BBDB currently uses might be better replaced by classes. Awful lot of work, though. -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Announcing BBDB records in the Gnus summary buffer
Ivan Kanis ivan.ka...@googlemail.com writes: Roland Winkler wink...@gnu.org wrote: bbdb-gnus.el contains some code for announcing BBDB records in the summary buffer. It includes the user variables bbdb/gnus-summary-mark-known-posters bbdb/gnus-summary-show-bbdb-names bbdb/gnus-summary-prefer-bbdb-data bbdb/gnus-summary-prefer-real-names controling what is actually displayed and when. Is anyone using this? I found that it is rather difficult to figure out how these four variables control the announcements. Hi Roland, I am not using any of this. I'm not either, and wouldn't like to override names in the From header, but I would definitely use 'mark-known-posters' if it was easy to configure. -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
[PATCH] TAB completion for organization field
No one asked for this, but it's something I've wanted for a while, so I did it, and am attaching a patch if it's of general interest. I often add multiple records for different people at the same organization, and have wanted tab completion when creating/editing the organization field. This patch creates and populates a bbdb-organization-list variable on startup, and offers completion from that list when editing or creating organization fields. Two things it doesn't do: 1. Offer completion at the '/ o' search prompt -- this might be a bad idea anyway. 2. Update bbdb-organization-list when the database is saved. I could add this functionality, and might do so on my own regardless. If the general idea here is acceptable but there's something wrong with the implementation, let me know and I'll be happy to edit. But it seemed pretty straightforward. Just out of curiosity, has there ever been a plan to make organizations first-class citizens in the database? Eric From d886366b44d453454a06493c3ffa80009493972b Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen e...@ericabrahamsen.net Date: Fri, 28 Dec 2012 11:37:03 +0800 Subject: [PATCH] TAB completion for editing/creating organization fields --- lisp/bbdb-com.el | 13 - lisp/bbdb.el | 9 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lisp/bbdb-com.el b/lisp/bbdb-com.el index 79e2e7e..8623507 100644 --- a/lisp/bbdb-com.el +++ b/lisp/bbdb-com.el @@ -618,7 +618,7 @@ but does ensure that there will not be name collisions. (setq name (bbdb-read-name first-and-last)) (bbdb-check-name (car name) (cdr name))) (let ((organizations (bbdb-split 'organization - (bbdb-read-string Organizations: ))) + (bbdb-read-string Organizations: nil bbdb-organization-list))) ;; mail (mail (bbdb-split 'mail (bbdb-read-string E-Mail Addresses: ))) ;; address @@ -847,7 +847,7 @@ value of \\, the default) means do not alter the address. (cond (;; affix (eq field 'affix) (bbdb-read-string Affix: init)) ;; organization -((eq field 'organization) (bbdb-read-string Organization: init)) +((eq field 'organization) (bbdb-read-string Organization: init bbdb-organization-list)) ;; mail ((eq field 'mail) (let ((mail (bbdb-read-string Mail: init))) @@ -939,7 +939,9 @@ a phone number or address with VALUE being nil. ((eq field 'address) (unless value (error No address specified)) (bbdb-record-edit-address value nil flag)) - ((setq edit-str (assq field '((affix . Affix) + ((setq collection (if (eq field 'organization) +bbdb-organization-list nil) + edit-str (assq field '((affix . Affix) (organization . Organization) (mail . Mail) (aka . AKA (bbdb-record-set-field @@ -947,8 +949,9 @@ a phone number or address with VALUE being nil. (bbdb-split field (bbdb-read-string (format %s: (cdr edit-str)) (bbdb-concat field (funcall (intern (format bbdb-record-%s field)) - record)) - (t ; xfield + record)) + collection + (t; xfield (bbdb-record-set-xfield record field (bbdb-read-string (format %s: field) diff --git a/lisp/bbdb.el b/lisp/bbdb.el index fdb9883..72aa144 100644 --- a/lisp/bbdb.el +++ b/lisp/bbdb.el @@ -1533,6 +1533,11 @@ In the *BBDB* buffers it includes the records that are actually displayed and its elements are (RECORD DISPLAY-FORMAT MARKER-POS).) (make-variable-buffer-local 'bbdb-records) +(defvar bbdb-organization-list nil + All organizations currently using in the database, for use as + completion candidates when adding or editing records' + organization field.) + (defvar bbdb-changed-records nil List of records that has been changed since BBDB was last saved.) @@ -2789,6 +2794,10 @@ If `bbdb-file' uses an outdated format, it is migrated to `bbdb-file-format'. (dolist (xfield (bbdb-record-xfields record)) (unless (memq (setq label (car xfield)) bbdb-xfield-label-list) (push label bbdb-xfield-label-list))) + ;; populate bbdb-organization-list + (dolist (organization (bbdb-record-organization record)) + (unless (member organization bbdb-organization-list) + (push organization bbdb-organization-list))) (let ((name (bbdb-concat 'name-first-last (bbdb-record-firstname record) -- 1.8.0.2 -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js
Re: [PATCH] TAB completion for organization field
Roland Winkler wink...@gnu.org writes: On Fri Dec 28 2012 Eric Abrahamsen wrote: No one asked for this, but it's something I've wanted for a while, so I did it, and am attaching a patch if it's of general interest. I often add multiple records for different people at the same organization, and have wanted tab completion when creating/editing the organization field. This patch creates and populates a bbdb-organization-list variable on startup, and offers completion from that list when editing or creating organization fields. Thanks. Me too, I thought about this. So far, I did not implement this because the organization field holds a list of values. This makes tab completion more tricky if one wants to put multiple entries into this field. Yup, I thought of this problem but it seems like it's fudged in other places (ie you can't complete on subsequent values in an AKA field) so I figured this was good enough for now. That would be very cool if the completing-read engine grew the ability to deal with this. Just out of curiosity, has there ever been a plan to make organizations first-class citizens in the database? What's that? - The organization field holds (a list of) ATTRIBUTES for a record. If a record should refer to a (single) organization instead of a person such that the organization is not the attribute for something else, I suggest that the name of that organization should go into the name field. I think that anything else asks for trouble. (Say, typically multiple records will have the same entries in the organization field for all your friends / colleagues in an organization.) Not quite sure I understood that... I was under the impression that the organization field just holds a list of strings: the names of various organizations. Is that what you meant by attributes for a record? I can make a record for an organization, with its organization name in the name field, and say an office front desk number in the phone field, etc, but them is there a way of indicating that a separate record (for a person), works there? I can't fill the person's organization field with a foreign key to the organization record, right? I realize this is approaching a relational database model, and is a can of worms that's probably not worth opening. I was just curious. E -- Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: First and last names
On Wed, Aug 08 2012, Julien Cubizolles wrote: I just realized that I switched first and last names in my bbdb records : I used to use the first field for the last name... Is there an easy way to make the switch back on a record, something like a bbdb-switch-first-last-name ? I'm pretty sure you'd have to write this yourself… Also, how to tell where the first name ends and where the last name starts when there are spaces in the fields (like John Jack Mc Something) ? It seems that bbdb-create prompts for a complete name (both first and last names) See the variable `bbdb-read-name-format', you can set it to ask for first and last separately. Eric Julien. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: bbdb3 and duplicates
On Wed, Aug 08 2012, Julien Cubizolles wrote: I recently switched to bbdb3 and couldn't find the function to merge duplicates shown by bbdb-search-duplicates. In bbdb-2.36, pressing r in the bbdb-show-duplicates used to merge the selected record with another one. The function is still the same: `bbdb-merge-records', but it used to be bound to 'r', and now appears not to be bound to anything. You can call it directly with M-x, or else bind it to 'r' (which appears to be unoccupied) yourself. Eric -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/ -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
for your amusement
For a while I've had a function for creating textual citations of my BBDB contacts, that relied on `bbdb-dwim-mail'. I expanded that to make use of org's link syntax, so that you can insert a BBDB link on the spot, without having to first visit your *BBDB* buffer and create a link there. I find this pretty helpful. If anyone can think of more formatting possibilities, formats could be broken out into a variable. Incidentally, I'm using `ido-everywhere', and would like to write this function so that it didn't _rely_ on ido, but made use of ido when `ido-everywhere' was true. Ie, I'd like to replace the `ido-completing-read' calls with something more generic that still made use of ido when it was turned on. Any suggestions? Eric --8---cut here---start-8--- (defun cite-bbdb-contact (name) (interactive sName (regexp): ) (let ((rec) (records (bbdb-search (bbdb-records) name name name nil nil)) (formats '((text . bbdb-dwim-mail) (orglink . (lambda (x) (let ((name (bbdb-record-name x))) (format [[%s][%s]] (org-make-link bbdb: name) name))) (if (= (length records) 1) (setq rec (car records)) (if (zerop (length records)) (error No matching records) (setq rec (let ((int-name (ido-completing-read Pick one: (mapcar 'bbdb-record-name records (car (bbdb-search (bbdb-records) int-name)) (let ((func (cdr (assoc (ido-completing-read Format: (mapcar #'car formats)) formats (insert (funcall func rec) --8---cut here---end---8--- -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: Sourceforge Page!
On Thu, Apr 05 2012, Sriram ET. wrote: On Thu, Apr 5, 2012 at 1:28 AM, Marc Croteau mdcrot...@gmail.com wrote: The install file of the BBDB V3 git download requests that bugs, comments etc be submitted to the bbdb-info mailing list. See below: It does not answer my question (if that was even the intention :-0) The sourceforge BBDB page is the top hit on Google for BBDB. And on that page there is no mention of the more recent BBDB V3. So my point is people may not even come to know about V3 from a simple google search. I suggest we take down the sourceforge site or at least link to the BBDBv3 page from there. That's all. From previous posts to this list, it seems that the people currently maintaining BBDB don't actually have access to that page! Plz correct if wrong… Eric -- Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: BBDB V3 export
On Tue, Mar 06 2012, ma...@kermodei.com wrote: Is anyone working on or through about export support for BBDB V3? My particular need is for Google export, however I suspect iPhone users may also need this. For V2, I use the unofficial bbdb-to-outlook package to create a CSV for import into Google. Seems something actually geared towards Google would be a nice improvement. I need to write something to address this problem to move to V3. Would be coordinate work on something general enough for inclusion in BBDB in there is interest. Cheers, Mark I was toying with the idea of a general template-based export system for BBDB: write a one-record template as a string, register it under a certain key, select your records, select your template, and it produces a text file. I wasn't confident enough of BBDB internals to go ahead, but maybe it's time? If this is the sort of thing you had in mind I'd be able to contribute/test. E -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: stop bbdb from asking questions in gnus
On Fri, Nov 11 2011, Thorsten wrote: [...] Problem solved, now I can use gnus without any (unwanted) interference from bbdb again. Only have to find out, how the wanted interference works. Cheers I had the same irritations as you, and found the same solution. My wanted interference setup is this: (define-key gnus-summary-mode-map (kbd \) 'bbdb-mua-display-records) I don't have bbdb show me sender information automatically. I hit this key when I do want to see that information, and the nice thing is, if anyone in the message headers is not in the database, it asks me if I want to add them. That's just the right amount of interference, for me. You might have to set `bbdb-mua-update-interactive-p' to '(query . create) to get it to work exactly like that. Good luck, Eric -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: completition in mini-buffer
On Tue, Nov 08 2011, Peter Münster wrote: On Mon, Nov 07 2011, Peter Münster wrote: (defadvice gnus-summary-resend-message (around resend-with-bbdb (address n) activate) Resend message with bbdb address completion. (flet ((message-read-from-minibuffer (p optional d) (bbdb-completing-read-mails p d))) ad-do-it)) There are no errors, but `bbdb-completing-read-mails' is not called... Why? Found it: the reason seems to be, that `message-read-from-minibuffer' is called from the `interactive' form... Looks like you're getting a solution over in emacs, hope it works! -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: completition in mini-buffer
On Mon, Nov 07 2011, Peter Münster wrote: Hello, What should I do, to get completion of email addresses in the mini-buffer, when using `gnus-summary-resend-message' (S-D-r)? TIA for any hint! Well, this is really only a hint, but that command uses `message-read-from-minibuffer', which will use `mail-abbrevs-setup' if it's bound. You could probably write a function that would hook bbdb into `mail-abbrevs-setup' so that bbdb names and addresses are present for completion. I have no idea if that would work, and it would likely feel different than the usual address completion in new message address header fields, but it could work… Eric -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: completition in mini-buffer
On Mon, Nov 07 2011, Eric Abrahamsen wrote: On Mon, Nov 07 2011, Peter Münster wrote: Hello, What should I do, to get completion of email addresses in the mini-buffer, when using `gnus-summary-resend-message' (S-D-r)? TIA for any hint! Well, this is really only a hint, but that command uses `message-read-from-minibuffer', which will use `mail-abbrevs-setup' if it's bound. You could probably write a function that would hook bbdb into `mail-abbrevs-setup' so that bbdb names and addresses are present for completion. I have no idea if that would work, and it would likely feel different than the usual address completion in new message address header fields, but it could work… Also: see `bbdb-completing-read-mails', it might be enough to replace `message-read-from-minibuffer' with your own function that uses this. E -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: cloudy BBDB
On Sun, Oct 30 2011, Ted Zlatanov wrote: On Sat, 29 Oct 2011 08:58:19 +0700 Eric Abrahamsen e...@ericabrahamsen.net wrote: EA On Fri, Oct 28 2011, Ted Zlatanov wrote: I put together some code that uses CouchDB to store Gnus group subscriptions and marks in gnus-sync.el. It works well; so well in fact that I'm considering doing the same for BBDB records. Imagine having your BBDB entirely stored on a central server instead of a local file. Yes, kind of like LDAP, but not so hard to use and much more accessible. In order to do this I will have to generalize and improve the gnus-sync.el code that talks to CouchDB. But I wanted to first find out if this interests anyone (and please feel free to tell me my idea sucks), or if there's existing functionality that I would be duplicating. I'm not aware of such. EA Out of curiosity, what sort of support would be needed on the server EA side. Just a CouchDB installation? I assume it's the sort of thing you'd EA need your own hosting and SSH access to set up? Just CouchDB (you may need to install some custom design views, but that's trivial and I already do it for gnus-sync.el). There's something interesting here. CouchDB has built-in multipoint replication (master-master) over HTTP. So you can run your own locally and another one somewhere else; the replication is trivial to set up. So rather than a world-visible CouchDB server you could have two private ones talking over HTTP. As for third-party solutions, see http://stackoverflow.com/questions/1091735/is-there-a-hosted-couchdb-service-provider Cloudant and Iris Couch have free plans to provide hosted CouchDB that will probably be good enough for most of us. I can host people on my server as long as I can afford it :) But the idea is that this is an infrastructure you can easily obtain, and the BBDB sync will ride on top of it. Cool, thanks! I do have my own server, so this would be pretty simple -- just curious! E -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: cloudy BBDB
On Fri, Oct 28 2011, Ted Zlatanov wrote: I put together some code that uses CouchDB to store Gnus group subscriptions and marks in gnus-sync.el. It works well; so well in fact that I'm considering doing the same for BBDB records. Imagine having your BBDB entirely stored on a central server instead of a local file. Yes, kind of like LDAP, but not so hard to use and much more accessible. In order to do this I will have to generalize and improve the gnus-sync.el code that talks to CouchDB. But I wanted to first find out if this interests anyone (and please feel free to tell me my idea sucks), or if there's existing functionality that I would be duplicating. I'm not aware of such. Out of curiosity, what sort of support would be needed on the server side. Just a CouchDB installation? I assume it's the sort of thing you'd need your own hosting and SSH access to set up? Thanks, Eric -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2011-10-10
On Tue, Oct 11 2011, Roland Winkler wrote: Hello, I incorporated a bunch of smaller changes and bug fixes. (Thanks to everyone who contributed to this in one or the other way!) - Editing and display of names (full names, first-last, last-first) can be customized, see bbdb-name-format and bbdb-read-name-format. If bbdb-read-name-format is fullname, it is possible to edit the first and last name individually via a prefix arg for bbdb-read-record and bbdb-record-edit-name. -- We had discussed here yet fancier solutions based on a separating character such as } when names are edited in full. But after I had implemented the current changes for editing names, I thought it's better to give those a try and go from there. Could it be that the current solution is really sufficient? This looks great, and for my own use-case at least, gets me close enough to what I was after -- Chinese names can be displayed last-first, and it doesn't really matter that they display with a (technically spurious) comma. In my quest to complicate things, would it be possible to: Set `bbdb-read-name-format' to `fullname'. Then allow the user to put a comma in the name. `bbdb-read-name' (and/or `bbdb-record-edit-name') looks for the comma, and if it finds it, automatically sets the `name-format' field for that record to `last-first'. Then split on the comma and use the two halves as last-first. The same thing happens in reverse for editing: the full name is displayed, but with last name first, and the comma inserted as a separator. If the user then edits the name to remove the comma, the `name-format' field is reverted to `first-last', and the new name is saved in that order: first-last. Does that make sense? My main goal is to be able to set the `name-format' field heuristically. It seems like doing it this way would be much more intuitive and unobtrusive than the } hack, but provide much of the same flexibility. If this seems acceptable in principle, I can take a stab at a patch. Thanks, Eric -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: [BBDB] ChangeLog 2011-10-10
On Mon, Oct 17 2011, Roland Winkler wrote: On Mon Oct 17 2011 Eric Abrahamsen wrote: In my quest to complicate things, would it be possible to: Set `bbdb-read-name-format' to `fullname'. Then allow the user to put a comma in the name. `bbdb-read-name' (and/or `bbdb-record-edit-name') looks for the comma, and if it finds it, automatically sets the `name-format' field for that record to `last-first'. Then split on the comma and use the two halves as last-first. ...Yes and no. The comma is customizable. It is the rule name-last-first in bbdb-separator-alist. I found that having such rules makes things much cleaner. The approach you suggest appears a bit orthogonal to this scheme. So I am somewhat hesitant to implement it. ...Give me some time to think about this. Maybe there is a yet better solution. The same thing happens in reverse for editing: the full name is displayed, but with last name first, and the comma inserted as a separator. If the user then edits the name to remove the comma, the `name-format' field is reverted to `first-last', and the new name is saved in that order: first-last. This appears a bit like a hack to me. -- In a consistent scheme, removing the comma would not be enough. If the full name is displayed as Smith, Joe, the user would hve to replace this by Joe Smith. A little command for setting the name-format field appears more appropriate to me. Fair enough! I definitely agree it's worth putting some thought into. Let me know if other possibilities arise. Eric -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: exporting records
On Sun, Oct 02 2011, Roland Winkler wrote: On Sun Oct 2 2011 Eric Abrahamsen wrote: Can you drop any hints about how it will change? Extra arguments? I didn't want to do anything fancy. Yet if the field argument doesn't match anything what it is supposed to match now, the new code also tries to match the keys of individual note fields. So if the value of field is 'note, it returns a list of all note fields. If the value is 'notes, it returns the value of the 'notes field. Okay, it sounds like this is different enough to warrant me waiting on it. In the meantime, if you have any clever ideas about the string format/templating side of things, don't be shy! -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: exporting records
On Sun, Oct 02 2011, Roland Winkler wrote: On Fri Sep 30 2011 Eric Abrahamsen wrote: 1. If there's no value for a field, you get a nice ugly nil. Ideally we'd have conditional insertion of strings depending on whether or not there's a value for a given field, but that means we can't use `format' anymore, and suddenly this whole thing gets a *lot* more complicated than a Friday afternoon project. This reminds me of BBDB address via bbdb-address-format-list. One needs to keep track of everything... 2. There's no obvious way of indicating which value of a multi-valued field you want. `bbdb-record-get-field' only gets us so far, as it's indiscriminate about fields with string values, list values and struct values. Currently I am trying to make bbdb-record-get-field a bit more flexible as this had also popped up here in some other context. I want to install my patch in the near future. Yet this might not solve all your problems. (See my comments on string labels below.) Can you drop any hints about how it will change? Extra arguments? With a little work it would be possible to access subvalues by constructing complex field names: for instance, address-home (to get the address field labelled home) Note that home may appear multiple times (i.e., the string labels used for addresses and phone numbers) I've seen people mess with symbol names like this before, and could probably figure it out. The keys of note fields (which are symbols) are intended to be unique for each record. Just to confirm: address and phone fields can have multiple identical string keys, but note-type fields can't, is that right? I'm not sure an exporter needs options that fine-grained. I'm inclined to produce either the first field with a given key, or else all the fields with a given key. Anyway, if bbdb-record-get-field is under construction, I'll put some thought into conditional strings first. E -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: exporting records
On Mon, Sep 26 2011, Roland Winkler wrote: On Mon Sep 26 2011 Eric Abrahamsen wrote: While we're on the subject of features that won't be considered until version 3 is finished, if ever I've been writing a small function to export BBDB records according to an arbitrary text template. I'm running up against the problem that there seems to be no generic get the value of this field for this record function. Ie, something like (bbdb-field-value 'mail record) -- exam...@mail.com. How about bbdb-record-get-field? I just noticed that at the end, before throwing an error this function could also try to resolve individual note fields (same for bbdb-record-set-field). Also, does this seem like a good idea in general? I know that we're in some kind of feature freeze, but this would also be relatively distinct from the rest of the codebase, and if it's an attractive idea I'd be happy to chew on it in my spare time. Some generic templates could be included for common needs Sounds useful to me. Okay, I've got this working. It's very bare bones, but works well enough that the design flaws are becoming apparent. As I conceived of/implemented this, it's basically a format string, with the format string's typical placeholders. Two problems with this are already obvious: 1. If there's no value for a field, you get a nice ugly nil. Ideally we'd have conditional insertion of strings depending on whether or not there's a value for a given field, but that means we can't use `format' anymore, and suddenly this whole thing gets a *lot* more complicated than a Friday afternoon project. 2. There's no obvious way of indicating which value of a multi-valued field you want. `bbdb-record-get-field' only gets us so far, as it's indiscriminate about fields with string values, list values and struct values. With a little work it would be possible to access subvalues by constructing complex field names: for instance, address-home (to get the address field labelled home) or mail-3 (to get the third element of the mail list, assuming there is one) or phone-all (to get some reasonably-formatted list of all the phone values). I've seen people mess with symbol names like this before, and could probably figure it out. Issue number one seems way harder to solve, largely because I have no good ideas for solving it. Issue could be solved the way I mentioned, or else some other way. I've attached the patch, including a new file. The whole thing is early-stage enough that I'd be perfectly happy reworking any aspect of it, or tossing it out altogether. Eric diff --git a/lisp/bbdb-export.el b/lisp/bbdb-export.el new file mode 100644 index 000..ca717aa --- /dev/null +++ b/lisp/bbdb-export.el @@ -0,0 +1,72 @@ +;;; Commentary + +;; This is meant to be a generic text-based exporter for the BBDB. +;; Per-record templates are recorded `bbdb-export-templates', and +;; exporting is performed by selecting a number of records to export, +;; then selecting the appropriate template. A temporary buffer is +;; created, containing first the value of `bbdb-export-preamble', then +;; the export template filled once per record and separated by +;; `bbdb-export-separator', and lastly followed by +;; `bbdb-export-postamble'. + +;; Add new templates like this: + +;; (bbdb-export-register-template FORMAT_STRING VAL_LIST PREAMBLE POSTAMBLE SEPARATOR) +;; where PREAMBLE POSTAMBLE and SEPARATOR are optional strings, with defaults. + +(require 'bbdb) +(require 'bbdb-com) + +(setq bbdb-export-templates nil) +(defconst bbdb-export-default-preamble ) +(defconst bbdb-export-default-postamble ) +(defconst bbdb-export-default-separator \n\n) + +;;;###autoload +(defun bbdb-export (records) + Export RECORDS according to a chosen template. + (interactive (list (bbdb-do-records))) + (setq records (bbdb-record-list records)) + (let* ((buf (get-buffer-create *BBDB Export*)) + (templ (rest (assoc (completing-read Template name: bbdb-export-templates) + bbdb-export-templates))) + (pre (or (nth 2 templ) + bbdb-export-default-preamble)) + (post (or (nth 3 templ) + bbdb-export-default-postamble)) + (sep (or (nth 4 templ) + bbdb-export-default-separator)) + (fields (nth 1 templ)) + (strg (first templ)) + (count 0)) +(set-buffer buf) +(erase-buffer) +(fundamental-mode) +(insert pre) +(insert + (mapconcat + (lambda (i) + (apply 'format strg (mapcar + (lambda (f) + (let ((val (cond ((eq f 'bbdb-export-counter) + (progn + (setq count (1+ count)) + count)) + ;; Something with callable sexps here + (t + (bbdb-record-get-field i f) + (when (consp val) ; totally fudging multi-value fields here + (setq val (first val))) + val)) + fields))) + records sep)) +(insert post) +(switch-to-buffer buf))) + +(defmacro bbdb-export-register-template (label format-string val-list optional preamble
Re: [PATCH] Better support for organisation-only records
On Mon, Sep 26 2011, Roland Winkler wrote: On Sun Sep 25 2011 Roland Winkler wrote: A much fancier solution would be to reimplement bbdb-create from scratch by using something like a form to fill, similar to what customize is using. I should add: Such a rather substantial change would have rather low priority on my current BBDB agenda. Currently, I consider a proper BBDB release more important. A simple solution would be that if the user enters a name string that contains a special character such as % as separator, then this defines the first and last name. So then you would have to enter the name as %Lucky Star Buffet Restaurant. Would this be useful? Such a scheme, while not perfect, could provide a reasonable solution till someone finds the time to implement a fancier scheme. (This scheme would only require a few lines of new code.) Yet in any case: suggestions for better schemes are always welcome. Why not have separate minibuffer prompts for surname and given name? Many of my records are for Chinese people. Right now I can't be bothered separating out the characters for surname and given name, and usually they all get lumped into whatever default bbdb picks for names with no spaces. Separate prompts for surname and given name would solve this (and the surname prompt could say …or organization name, something like that). Or, if a syntax for splitting is introduced, perhaps it could indicate which side is the surname and which the given name, to make it easier to create records for cultures where surname comes first. I'm not bothered that the resulting name is displayed backwards (given name first), but it would be great if entry were made easier. My random suggestion: use { or } for the separator. The surname is the part that's inside the bracket. So: Eric{Abrahamsen 王}小波 {Lucky Star Buffet Restaurant Bartók}Béla On second thought, if you did it this way, BBDB could learn from the parsing the proper display order of the name, and store that as a boolean with the name itself. Parsing would be a little more complicated, but this would provide for much more flexible customization. Two cents, Eric -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: function to add new records from email message
On Fri, Aug 12 2011, Roland Winkler wrote: On Fri Aug 12 2011 Eric Abrahamsen wrote: I'm using git versions of gnus and bbdb, and something somewhere loves to put a - in the minibuffer when I hit ; for bbdb-mua-edit-notes-sender and a few other actions, I can't quite see a pattern. I don't know who to blame for this -, but it overrides whatever other helpful hints the minibuffer should have been showing me, and in general makes it very difficult to get things done. Has anyone else seen this? What on earth is it doing? Looks like you have (setq bbdb-electric t) which you might want to replace by (setq bbdb-electric nil) Much better, thanks! -- FREE DOWNLOAD - uberSVN with Social Coding for Subversion. Subversion made easy with a complete admin console. Easy to use, easy to manage, easy to install, easy to extend. Get a Free download of the new open ALM Subversion platform now. http://p.sf.net/sfu/wandisco-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: function to add new records from email message
On Thu, Aug 11 2011, Roland Winkler wrote: On Sun Aug 7 2011 Peter Münster wrote: The question was rather, if there was a function like `bbdb-mua-edit-notes-ALL'. My solution: --8---cut here---start-8--- (local-set-key : '(lambda () (interactive) (bbdb-mua-edit-notes-recipients) (bbdb-mua-edit-notes-sender))) --8---cut here---end---8--- I guess there are just too many possiblities for defining such utility commands to match personal tastes. But as you noticed reshuffling the existing ones is hopefully not so difficult. Try bbdb-mua-display-sender This function does nothing, if the record does not yet exist. ...depending on how you configure it. As I said: the default is being the least aggressive. Hey, this was a great bit of information -- I've long been confused about the best way to get someone in the database if you're not automatically adding unknown senders. So now with a prefix arg : asks whether to add a new record, but I don't see what you set to have it ask for all invocations, not just those with a prefix arg…? -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: function to add new records from email message
On Thu, Aug 11 2011, Roland Winkler wrote: On Thu Aug 11 2011 Eric Abrahamsen wrote: Hey, this was a great bit of information -- I've long been confused about the best way to get someone in the database if you're not automatically adding unknown senders. So now with a prefix arg : asks whether to add a new record, but I don't see what you set to have it ask for all invocations, not just those with a prefix arg ? Take a look at the variable bbdb-mua-update-interactive-p. It specifies what you get without / with a prefix arg. The default is `search' without a prefix and `query' with a prefix. Thanks for this, the docstrings were a little confusing… -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
known poster mark in gnus: all I get are asterisks
Hi, I'm trying to show known posters in the gnus summary buffer. I've got: bbdb/gnus-summary-mark-known-posters: t bbdb/gnus-summary-known-poster-mark: + bbdb/gnus-summary-in-bbdb-format-letter: b gnus-summary-line-format: %U%R%7L%b: %I%f %-50= %s %-120= |%user-date;\n None of my bbdb records has a mark-char field. Instead of putting a + next to known posters, *every* poster has a * where the %b should go. I've tried giving some BBDB records a mark-char field, but that's ignored, too: they still get a *. Has anyone seen this before? Using up-to-date gnus and bbdb, on emacs 23.3. Thanks, Eric -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: TAB should move from field to field
On Sun, Apr 24 2011, Roland Winkler wrote: On Sun Apr 24 2011 Eric Abrahamsen wrote: Seems like preserving line breaks in multi-line fields (and removing any left-hand whitespace) would be all the formatting you'd need Well, I guess that extracting the field from the database with just some base formatting should be a yet shorter way to go. Roland PS Which keybindings are not yet taken? f? Works for me -- f is unoccupied here. -- Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: TAB should move from field to field
On Sun, Apr 24 2011, Roland Winkler wrote: On Sat Apr 23 2011 Leo wrote: I have one suggestion. I think making TAB move from field to field is useful. For example, in the following record, assume point at `R'ichard, TAB could move from R - F - m - n - next record Sounds like a good idea. Yet all fields except for the name field are really lists (snail mail addresses, phone numbers, email addresses, etc.). So it seems more appropriate to me if this command moves from one such subfield to the next one. This matches than bbdb-transpose-field, i.e., you can use TAB to jump to the position where you want to transpose fields. If I could add a rider request to this, it would be great to have a single key command to copy the field contents to the kill ring (the way 'M' does now for the primary mail address). I often need to copy people's details to other places, and every time I do I wish I had this… -- Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: TAB should move from field to field
On Sun, Apr 24 2011, Roland Winkler wrote: On Sun Apr 24 2011 Eric Abrahamsen wrote: If I could add a rider request to this, it would be great to have a single key command to copy the field contents to the kill ring (the way 'M' does now for the primary mail address). I often need to copy people's details to other places, and every time I do I wish I had this There is bbdb-copy-records-as-kill. But I can add bbdb-copy-field-as-kill. Oops: bbdb-copy-records-as-kill takes the records as displayed in the BBDB buffer. For bbdb-copy-field-as-kill it would probably make more sense to omit all the extra formatting such as the indentation, but only use some base formatting (snail mail addresses would be difficult to use otherwise). Exactly! I tried bbdb-copy-records-as-kill but it was more work to remove the extra stuff than it was simply to move point to the field and copy what I wanted manually. Seems like preserving line breaks in multi-line fields (and removing any left-hand whitespace) would be all the formatting you'd need… E -- Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
help updating this defun
Here's something off the internet that I've been using with gnus to automatically encrypt email based on a contact's S/MIME certificate, the path to that certificate being stored in a 'certfile field in their BBDB record. It doesn't work now, with the CVS version of BBDB. I know bbdb-search-simple will have to be switched to bbdb-search, but bbdb-get-field doesn't seem to exist anymore, and also this function returns name must be atomic before it even gets to that point. I assume that's because it's trying to find certfiles for all of To Cc and From? I tried stepping through with the debugger, but I'm not particularly good at using the debugger, and didn't have the patience, whacking d over and over again, to get to where the error was raised. Any advice? #+begin_src lisp (defun DE-get-certificate-files-from-bbdb () (let ((certfiles nil)) (save-excursion (save-restriction (message-narrow-to-headers-or-head) (let ((names (remq nil (mapcar 'message-fetch-field '(To Cc From) (mapc (function (lambda (arg) (let ((rec (bbdb-search-simple nil (cdr arg (when rec (let ((cert (bbdb-get-field rec 'certfile))) (when (and ( (length cert) 0) (not (member cert certfiles))) (push cert certfiles)(push 'certfile certfiles))) (mail-extract-address-components (mapconcat 'identity names ,) t))) (if (y-or-n-p (concat (mapconcat 'file-name-nondirectory (remq 'certfile certfiles) , ) . Add more certificates? )) (nconc (mml-smime-encrypt-query) certfiles) certfiles) #+end_src -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
cvs bbdb auto create bug?
Hi, I'm using the CVS BBDB along with the most recent No-Gnus. I've set bbdb/news-auto-create-p to 'prompt for certain groups. For unknown senders I'm prompted to add a record to the database as expected, and my choices seem to be (y,!,n,s,q,?). y and n seem to be self-explanatory, but I'd like to know what the rest of the options do. Presumably I'd hit ? to find that, but doing so gives me: mapcar: Lisp nesting exceeds `max-lisp-eval-depth' So this message has two purposes: one, can someone tell me what the other options do (I can't find the relevant code in the codebase. What I'd really like is an option to say save this address in a list and never prompt me again for anything in that list), and two, I guess this is a bug report for the ? option. I'd be happy to provide backtraces or further info. I'm running GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2010-10-19 Thanks! Eric -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: cvs bbdb auto create bug?
Wow, no kidding, that's a lot better. Pity about the lack of a nice info file, but I'll go source-code spelunking now. Thanks for the pointer! E -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/