[Top][All Lists]

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

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

From: Eric Abrahamsen
Subject: bug#38918: 26.3; EBDB fails to edit (add) tags
Date: Sat, 04 Jan 2020 10:55:41 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

address@hidden (Jorge P. de Morais Neto) writes:

>  0x8000078ebdb<return><return>eE
> Hello.  I use the latest EBDB (0.6.11) on an updated Spacemacs (develop
> branch) atop GNU Emacs 26.3 on an updated Debian buster.  Emacs was
> installed via GNU Guix.
> I cannot add tags to EBDB records.  To help you with reproducing the
> bug, I reproduced it on a GNU Emacs configuration where the only
> customization was augmenting `package-archives' (which I later realized
> was unnecessary) and installing `ebdb'.  I also used a minimal EBDB
> database.  I then inserted a tags field in one record; EBDB did not ask
> for the contents of the field, so an empty tags field was inserted.

Would you please eval the following forms and let me know if everything
works as expected?

(cl-defmethod ebdb-read ((field (subclass ebdb-field-tags)) &optional slots obj)
  (let* ((crm-separator (cadr (assq 'ebdb-field-tags ebdb-separator-alist)))
         (val (completing-read-multiple
               (format "Tags (separate with \"%s\"): " crm-separator)
               nil nil
               (when obj (ebdb-string obj)))))
    (cl-call-next-method field (plist-put slots :tags val))))

(cl-defmethod ebdb-fmt-field :around ((_fmt ebdb-formatter-ebdb)
                                      (field ebdb-field)
                                      (_record ebdb-record))
  "Put the 'ebdb-field text property on FIELD.  The value of the
property is the field instance itself."
  (let ((str (cl-call-next-method)))
    (propertize (if (or (null str)
                        (string-empty-p str))
                'ebdb-field field)))

reply via email to

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