Re: Snarf Vcards

Pascal Quesseveur <[email protected]> Fri, 08 Jul 2022 10:14:21 +0200
Newsgroups gmane.emacs.bbdb.user
Organization Les Enchantements de Miraldra
Message-ID <[email protected]>
>"RW" == Roland Winkler <[email protected]> writes:

  RW> More importantly, vcard.el converts hard-to-read raw vcards into
  RW> pretty-printed text.  Then you cannot feed this into
  RW> bbdb-snarf-vcard anymore.  It should be possible to hook
  RW> bbdb-snarf-vcard into MUAs like Gnus so that it processes the
  RW> vcard MIME attachments to put them into BBDB.  Probably this
  RW> needs to be similar to how you are now using vcard-pretty-print.

Actually the mm-inline-textvcard function in mm-view.el calls
vcard-pretty-print for text/x-vcard mime types when vcard-pretty-print
is defined.

I don't have time to look at this in more detail at the moment, but I
think it would be possible to define a function that would receive a
mail handle. This function would call bbdb-snarf-vcard on (mm-get-part
handle), and offer to update bbdb. Then that function could be added
to mm-inline-media-tests for mime types text/x-vcard and/or combined
with mm-inline-text-vcard.


-- 
Pascal Quesseveur
[email protected]