From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#38918: 26.3; EBDB fails to edit (add) tags Date: Sat, 04 Jan 2020 10:55:41 -0800 Message-ID: <87zhf3m4pe.fsf@ericabrahamsen.net> References: <87d0bzcnmm.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="82029"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 38918@debbugs.gnu.org To: jorge+list@disroot.org (Jorge P. de Morais Neto) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 04 19:56:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1inoao-000LBs-IZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2020 19:56:10 +0100 Original-Received: from localhost ([::1]:36106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inoan-0006dQ-G0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2020 13:56:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46746) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inoah-0006dI-0m for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 13:56:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inoag-0004Sg-1N for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 13:56:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1inoaf-0004SW-U8 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 13:56:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1inoaf-000231-UI for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2020 13:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2020 18:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38918 X-GNU-PR-Package: emacs Original-Received: via spool by 38918-submit@debbugs.gnu.org id=B38918.15781641527846 (code B ref 38918); Sat, 04 Jan 2020 18:56:01 +0000 Original-Received: (at 38918) by debbugs.gnu.org; 4 Jan 2020 18:55:52 +0000 Original-Received: from localhost ([127.0.0.1]:43377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inoaW-00022U-IF for submit@debbugs.gnu.org; Sat, 04 Jan 2020 13:55:52 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18]:54450 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inoaU-000225-60 for 38918@debbugs.gnu.org; Sat, 04 Jan 2020 13:55:51 -0500 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 73A19FA080; Sat, 4 Jan 2020 18:55:43 +0000 (UTC) In-Reply-To: <87d0bzcnmm.fsf@disroot.org> (Jorge P. de Morais Neto's message of "Sat, 04 Jan 2020 11:17:05 -0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174173 Archived-At: jorge+list@disroot.org (Jorge P. de Morais Neto) writes: > 0x8000078ebdbeE > > 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)) "" str) 'ebdb-field field)))