bbdb-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snarf Vcards


From: Pascal Quesseveur
Subject: Re: Snarf Vcards
Date: Mon, 11 Jul 2022 09:48:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (windows-nt)

>"RW" == Roland Winkler <winkler@gnu.org> writes:

  RW> Is for you vcard.el handling the quoted-printable properly?

No, I didn't remember, but it didn't work nicely. I don't use
vcard-pretty-print directly. I wrote a function that retrieves the
mail charset and recodes the output text from vcard-pretty-print.

(defun qsr-inline-text-vcard (handle)
  (let ((inhibit-read-only t)
        (charset (or (mail-content-type-get (mm-handle-type handle) 'charset)
             mail-parse-charset))
        text)
    (setq text (vcard-pretty-print (mm-get-part handle)))
    (mm-insert-inline
     handle
     (concat "\n"
             (if (and charset text)
                 (mm-decode-string (string-make-unibyte text) charset)
               text)))))


And I associate this function with text/x-vcard in
mm-inline-media-tests.


-- 
Pascal Quesseveur
pquessev@gmail.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]