unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: jorge+list@disroot.org (Jorge P. de Morais Neto)
Cc: 38918@debbugs.gnu.org
Subject: bug#38918: 26.3; EBDB fails to edit (add) tags
Date: Sat, 04 Jan 2020 10:55:41 -0800	[thread overview]
Message-ID: <87zhf3m4pe.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87d0bzcnmm.fsf@disroot.org> (Jorge P. de Morais Neto's message of "Sat, 04 Jan 2020 11:17:05 -0300")

jorge+list@disroot.org (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)
	       ebdb-tags
	       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)
				      _style
				      (_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))
		    "<empty>"
		  str)
		'ebdb-field field)))





  parent reply	other threads:[~2020-01-04 18:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 14:17 bug#38918: 26.3; EBDB fails to edit (add) tags Jorge P. de Morais Neto
2020-01-04 17:58 ` Eric Abrahamsen
2020-01-04 18:55 ` Eric Abrahamsen [this message]
2020-01-05  0:02   ` Jorge P. de Morais Neto
2020-01-05  0:35     ` Eric Abrahamsen
2020-01-05  0:43     ` Eric Abrahamsen
2020-01-05 10:49       ` Jorge P. de Morais Neto
2020-01-06 18:43         ` Jorge P. de Morais Neto
2020-01-06 18:46           ` Jorge P. de Morais Neto
2020-01-06 20:25           ` Eric Abrahamsen
2020-01-06 20:49           ` Eric Abrahamsen
2020-01-06 19:40         ` Eric Abrahamsen
2020-01-07 12:23           ` Jorge P. de Morais Neto
2020-01-07 17:37             ` Eric Abrahamsen
2020-01-12 13:49               ` Jorge P. de Morais Neto
2020-01-12 17:10                 ` Eric Abrahamsen
2020-01-14 11:50                   ` Jorge P. de Morais Neto
2020-01-14 22:46                     ` Eric Abrahamsen
2020-01-18 16:20                       ` Deus Max
2020-01-18 18:37                         ` Eric Abrahamsen
2020-01-07 19:14           ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhf3m4pe.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=38918@debbugs.gnu.org \
    --cc=jorge+list@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).