Subject: Re: bug#38918: 26.3; EBDB fails to edit (add) tags

From: Eric Abrahamsen <[email-masked]>
Date: Sun, 12 Jan 2020 09:10:50 -0800

Jorge P. de Morais Neto <[email-masked]> writes:

> Em [2020-01-07 ter 09:37:02-0800], Eric Abrahamsen escreveu:
>
>> This is definitely on the roadmap, and taking me too long.  Presumably
>> you'd export your Gmail contacts as a vCard file?  Or something else?
>
> It seems Gmail supports vCard and two CSV variants[1].  I do not know
> which works best.
>
>   [1]: https://www.lifewire.com/how-to-export-your-gmail-contacts-1171992

Cool, well we'll start with vCard. A CSV importer would be a good idea,
too.

Would you eval this and see if it solves your Org tags issue?

(cl-defmethod ebdb-read ((field (subclass ebdb-org-field-tags)) &optional slots obj)
  (let* ((crm-separator (cadr (assq 'ebdb-field-tags ebdb-separator-alist)))
	 (val (completing-read-multiple
	       "Tags: "
	       (org--tag-add-to-alist
		(org--tag-add-to-alist
		 (org--tag-add-to-alist
		  (org-global-tags-completion-table)
		  org-tag-alist)
		 org-tag-persistent-alist)
		ebdb-tags)
	       nil nil
	       (when obj (ebdb-string obj)) 'org-tags-history)))
    (cl-call-next-method field (plist-put slots :tags val))))