I'd like to write a command so that for a particular record (found for example with (bbdb-search (bbdb-records) regexp)
) I'm able to extract just the name part of it (or e. g. the mail part, or any part of the xfields). How would you lisp this?
Asked
Active
Viewed 114 times
0

Drew
- 75,699
- 9
- 109
- 225

Dieter.Wilhelm
- 1,836
- 14
- 25
-
I think you could use `bbdb-search-prog` with your own function as an argument. That function would need be called with a record looked up, and whenever you think that the record matches, it would need to return the record, in case it accepts it as a potential match. – wvxvw Sep 14 '15 at 10:30
-
Hi @wvxvw, sorry I was not clear enough. `bbdb-search` is just fine for me, no need for `bbdb-search-prog`. But I want to know how to extract for a found record for example the www part or the mail-alias... – Dieter.Wilhelm Sep 15 '15 at 15:37
1 Answers
0
There are accessor functions in bbdb3 for extracting certain part of the record:
(bbdb-record-name record)
(bbdb-record-firstname record)
(bbdb-record-lastname record)
...
They are defined in bbdb.el

Dieter.Wilhelm
- 1,836
- 14
- 25