On  6 Oct 2013, Roland Winkler wrote:

> On Sun Oct 6 2013 Gijs Hillenius wrote:
>> ,----
>> | (defun bbdb/pgp-get-pgp (name address) "Look up user NAME and
>> | ADDRESS in BBDB and return the PGP preference."  (let* ((record
>> | (bbdb-search-simple name address)) (pgp (and record
>> | (bbdb-record-getprop record bbdb/pgp-field)))) pgp))
>> `----
>>
>>
>> bbdb-search-simple (from Bbdb version 2) can be replaced by
>> bbdb-message-search (from Bbdb version 3).
>
> Correct.
>
>> but I have not figured out how to replace bbdb-record-getprop
>>
>> I've tried replacing it with bbdb-record-field and, when that failed,
>> tried bbdb-record-xfield (both from Bbdb version 3). 
>>
>> The problem seems to be that where bbdb-record-getprop returns the
>> desired value stored the .bbdb, both bbdb-record-field and
>> bbdb-record-xfield return "nil".
>
> That's strange.  bbdb-record-field should work here.  Do the records
> you are trying to use have custom fields (aka "xfields") with a key
> corresponding to the value of bbdb/pgp-field?

Hi Roland,

thanks for the prompt reply! I was wondering if I need to register the
xfield somewhere.

Anyway:

I'm using this record for testing and edebugging

Test Name
               mail: t...@example.org
           pgp-mail: sign
              notes: test address


I've been comparing the different behaviours in the old and new
libraries by running Bbbdb v2 as userA and Bbdb v3 (as myself). And by
changing the code as above 

For both I created the same record

Bbdb v2 userA edebug steps show for example:

Result: ("Test Name" "t...@example.org")
Result: ("t...@example.org")
Result: "t...@example.org"
Result: "sign"

whereas Bbd v3 as myself will show these steps

Result: ("Test Name" "t...@example.org")
Result: ("t...@example.org")
Result: "t...@example.org"
Result: nil






------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to