Closed dalanicolai closed 3 years ago
Thanks for your contribution!
It's been over six years since i last worked on that code, so i'm not sure why the call to replace-regex-in-string
is there, but i have to assume it was necessary for data cleaning in a particular case. Given that, i'd like to instead have:
(setq heading
(or (cdr (assoc org-vcard-default-property-for-heading card))
(let ((value (cdr
(assoc
(if (string=
org-vcard-default-property-for-heading
"FN")
"N"
"FN") card))))
(if value
(replace-regexp-in-string "^;\\|;$" "" value)
"NO TITLE"))))
Does the above code work for your use-case?
Ah yes I see. Your new code works fine here indeed. :+1:
Fixed in https://github.com/flexibeast/org-vcard/commit/f4b7445550deb30e170a25fc42541e99730e21d0, closing.
Thanks again!
Currently, when a vcard has no heading (which can happen e.g. when exporting from 'google contacts'), the importer crashes with the following message:
etc.
This PR fixes the issue and gives the vcard without heading, a "NO TITLE" heading in the .org file