>>>>> "Robert" == Robert Widhopf-Fenk <[EMAIL PROTECTED]> writes:
Robert> On Thursday, May 25, 2006 at 13:00:18, Uwe Brauer wrote:
>>
>> I played a little around, but it seems not that trivial.
Robert> Why?
This was just an example.
Robert> Where does the relevant record come from?
Robert> Look at:
Robert> - bbdb-yank-addresses which will tell you how to get records
Robert> from a BBDB buffer
Robert> - bbdb-record-getprop is used to extract a field from a record
Robert> - bbdb-complete-name-hooks / bbdb-mail-abbrev-expand-hook
Robert> might be interesting in order to hook your magic
Robert> - message-insert-to / message-carefully-insert-headers
Robert> should be used for inserting
RWF> The following defun is a start ...
RWF> (defun bbdb-yank-ccc ()
RWF> (interactive)
RWF> (let ((ccc (save-excursion
RWF> (set-buffer bbdb-buffer-name)
RWF> (and bbdb-records
RWF> (car bbdb-records)
RWF> (bbdb-record-getprop (caar bbdb-records) 'gnus-folder)))))
RWF> (if ccc
RWF> (message-carefully-insert-headers (list (cons 'Ccc ccc))))))
RWF> It is not that complicated, isn't?
Well right, but the problem is: it does not work.
I debugged your function and
the problem is that
(bbdb-record-getprop (caar bbdb-records) 'gnus-folder)
returns nil for a given bbdb entry which has this field.
I tried other fields, like imap (which I use for other purposes) that
is
(bbdb-record-getprop (caar bbdb-records) 'imap)
but the same, it returns nil. I tried it with the net field and then I got
(bbdb-record-getprop (caar bbdb-records) 'net)
bbdb: cannot access the net field this way
So there is something wrong?
Uwe
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
[email protected]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/