Re: [PATCH] TAB completion for organization field

2012-12-28 Thread Roland Winkler
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.

 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?

Yes. The organization field is an attribute in the sense that
usually it is useless to distinguish individual records. But it can
help to classify the records in BBDB.

 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.

Roland

--
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: [PATCH] TAB completion for organization field

2012-12-28 Thread Eric Abrahamsen
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: [PATCH] TAB completion for organization field

2012-12-28 Thread Roland Winkler
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).

Thank you, I learned something new here.

Roland

--
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/