Re: v3: name matched against organization?!

2011-12-29 Thread Sam Steingold
> * Sam Steingold  [2011-12-27 13:27:12 -0500]:
>
> When visiting an article from "foo " who is not in my db,
> I am offered to add name "foo" and address "b...@baz.com" to the record
> of "First Last - foo", i.e., a person whose _organization_ is "foo".
> I think this is wrong: matching the name "foo" against organization
> "foo".

this is because bbdb-hashtable hashes on organization too and
bbdb-message-search does not check that the record bbdb-gethash returns
actually has the right field.

1. why does bbdb-hashtable hash on organization?  I don't think it
should; organization is hardly unique.

2. bbdb-message-search should consider AKA in addition to
bbdb-record-name

3. bbdb-message-search should check that (bbdb-gethash mail) actually
returns records with matching mail (as opposed to, e.g., organization)
and (bbdb-gethash name) actually returns records with matching name or
AKA.

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://thereligionofpeace.com http://jihadwatch.org http://honestreporting.com
http://camera.org http://palestinefacts.org http://www.memritv.org
(when (or despair hope) (cerror "Accept life as is." "Bad attitude."))


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-28 Thread Sam Steingold
> * Roland Winkler  [2011-12-28 03:51:14 -0600]:
> On 2011-12-27 09:29 +0800, Sam Steingold wrote:
>> When visiting an article from "foo " who is not in my db,
>> I am offered to add name "foo" and address "b...@baz.com" to the record
>> of "First Last - foo", i.e., a person whose _organization_ is "foo".
>> I think this is wrong: matching the name "foo" against organization
>> "foo".
>
> ...Yet this does not yet explain Sam's problem: if the message of
> "foo " had a header "Organization: Woozle", his setting
> of bbdb-auto-notes-rules should add "Woozle" to Foo's BBDB record.
> Yet it should not operate on an existing record where the
> organization field had value 'Foo' (unless the value of the name
> field was 'Foo', too).

this is not what is happening to me.

I see a message in a newsgroup

From: foo 

I do not have a record with name=foo or mail containing b...@baz.com.
However I have a single bbdb record with organization=foo.
The message is marked as coming from a "known bbdb person" and that
person is the one with organization=foo.

> Right now I am puzzled...
>
> In general, multiple records may share the same organization field.
> Which record is picked then?

I happen to have just one record with this specific organization.

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://camera.org http://mideasttruth.com http://thereligionofpeace.com
http://dhimmi.com http://www.PetitionOnline.com/tap12009/ http://truepeace.org
Old Age Comes at a Bad Time.


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-28 Thread Leo
On 2011-12-28 17:51 +0800, Roland Winkler wrote:
> Not quite! Leo, I modified the code following your request:
> In Sam's setting of bbdb-auto-notes-rules, the line
>
>   ("Organization" (".*" organization 0))
>
> means that if the message has an "Organization" header, the value of
> that header is added to the organization field of the corresponding
> BBDB record (which, I assume is what Sam wants to do...)

I didn't know it was implemented. Thanks very much. I have just removed
my own hack in my setup ;)

Leo


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-28 Thread Roland Winkler
On Wed Dec 28 2011 Leo wrote:
> On 2011-12-28 09:29 +0800, Sam Steingold wrote:
> > (custom-set-variables
> >  '(bbdb-auto-notes-rules
> >'(("Web" (".*" www 0))
> >  ("X-Web" ("<*\\(^>*\\)>*" www 1))
> >  ("X-WWW-Homepage" ("<*\\([^>]*\\)>*" www 1))
> >  ("X-Url" ("<*\\([^>]*\\)>*" www 1))
> >  ("X-Url-From" ("<*\\([^>]*\\)>*" www 1))
> >  ("Organization" (".*" organization 0))
> >  ("Organisation" (".*" organization 0))
> >  ("X-Organisation" (".*" organization 0))
> >  ("X-Organization" (".*" organization 0)
> 
> Just a note. This only modifies the notes subfield (as in
> bbdb-notes-label-list), not the standard organization field.

Not quite! Leo, I modified the code following your request:
In Sam's setting of bbdb-auto-notes-rules, the line

  ("Organization" (".*" organization 0))

means that if the message has an "Organization" header, the value of
that header is added to the organization field of the corresponding
BBDB record (which, I assume is what Sam wants to do...)

On 2011-12-27 09:29 +0800, Sam Steingold wrote:
> When visiting an article from "foo " who is not in my db,
> I am offered to add name "foo" and address "b...@baz.com" to the record
> of "First Last - foo", i.e., a person whose _organization_ is "foo".
> I think this is wrong: matching the name "foo" against organization
> "foo".

...Yet this does not yet explain Sam's problem: if the message of
"foo " had a header "Organization: Woozle", his setting
of bbdb-auto-notes-rules should add "Woozle" to Foo's BBDB record.
Yet it should not operate on an existing record where the
organization field had value 'Foo' (unless the value of the name
field was 'Foo', too).

Right now I am puzzled...

In general, multiple records may share the same organization field.
Which record is picked then?

Roland

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-27 Thread Sam Steingold
> * Leo  [2011-12-28 10:56:36 +0800]:
>
> On 2011-12-28 09:29 +0800, Sam Steingold wrote:
>> (custom-set-variables
>>  '(bbdb-auto-notes-rules
>>'(("Web" (".*" www 0))
>>  ("X-Web" ("<*\\(^>*\\)>*" www 1))
>>  ("X-WWW-Homepage" ("<*\\([^>]*\\)>*" www 1))
>>  ("X-Url" ("<*\\([^>]*\\)>*" www 1))
>>  ("X-Url-From" ("<*\\([^>]*\\)>*" www 1))
>>  ("Organization" (".*" organization 0))
>>  ("Organisation" (".*" organization 0))
>>  ("X-Organisation" (".*" organization 0))
>>  ("X-Organization" (".*" organization 0)
>
> Just a note. This only modifies the notes subfield (as in
> bbdb-notes-label-list), not the standard organization field.

in v2 is did modify the company field.
why the change?

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://ffii.org http://truepeace.org http://memri.org
http://iris.org.il http://camera.org http://www.memritv.org
Diplomacy is the art of saying "nice doggy" until you can find a rock.


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-27 Thread Leo
On 2011-12-28 09:29 +0800, Sam Steingold wrote:
> (custom-set-variables
>  '(bbdb-auto-notes-rules
>'(("Web" (".*" www 0))
>  ("X-Web" ("<*\\(^>*\\)>*" www 1))
>  ("X-WWW-Homepage" ("<*\\([^>]*\\)>*" www 1))
>  ("X-Url" ("<*\\([^>]*\\)>*" www 1))
>  ("X-Url-From" ("<*\\([^>]*\\)>*" www 1))
>  ("Organization" (".*" organization 0))
>  ("Organisation" (".*" organization 0))
>  ("X-Organisation" (".*" organization 0))
>  ("X-Organization" (".*" organization 0)

Just a note. This only modifies the notes subfield (as in
bbdb-notes-label-list), not the standard organization field.

Leo


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-27 Thread Sam Steingold
> * Leo  [2011-12-28 08:19:01 +0800]:
>
> On 2011-12-28 02:27 +0800, Sam Steingold wrote:
>> When visiting an article from "foo " who is not in my db,
>> I am offered to add name "foo" and address "b...@baz.com" to the record
>> of "First Last - foo", i.e., a person whose _organization_ is "foo".
>> I think this is wrong: matching the name "foo" against organization
>> "foo".
>
> How did that happen?
>
> BBDB does not seem to modify the organization field by default. It
> sets notes fields only.

(custom-set-variables
 '(bbdb-auto-notes-rules
   '(("Web" (".*" www 0))
 ("X-Web" ("<*\\(^>*\\)>*" www 1))
 ("X-WWW-Homepage" ("<*\\([^>]*\\)>*" www 1))
 ("X-Url" ("<*\\([^>]*\\)>*" www 1))
 ("X-Url-From" ("<*\\([^>]*\\)>*" www 1))
 ("Organization" (".*" organization 0))
 ("Organisation" (".*" organization 0))
 ("X-Organisation" (".*" organization 0))
 ("X-Organization" (".*" organization 0)


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://honestreporting.com http://jihadwatch.org http://palestinefacts.org
http://memri.org http://www.PetitionOnline.com/tap12009/ http://camera.org
If you try to fail, and succeed, which have you done?


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: v3: name matched against organization?!

2011-12-27 Thread Leo
On 2011-12-28 02:27 +0800, Sam Steingold wrote:
> When visiting an article from "foo " who is not in my db,
> I am offered to add name "foo" and address "b...@baz.com" to the record
> of "First Last - foo", i.e., a person whose _organization_ is "foo".
> I think this is wrong: matching the name "foo" against organization
> "foo".

How did that happen?

BBDB does not seem to modify the organization field by default. It sets
notes fields only.

Leo


--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/