all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
To: emacs-devel@gnu.org
Subject: [PATCH] Adjust EUDC to use BBDB 3.x
Date: Mon, 19 Jan 2015 18:21:26 -0500	[thread overview]
Message-ID: <87h9vml5l5.fsf@sergiodj.net> (raw)

Hi,

With the release of BBDB 3.x, EUDC does not work properly anymore.  The
reason is because BBDB renamed a few fields internally, and EUDC is
still using the old names.  Specifically, the problem happens because of
the 'net' -> 'mail' rename.

The following patch fixes this issue.  I tested it with my current .gnus
configuration, and it works fine.

I have the copyright assignment on file for contributing with GDB and
binutils, but I still do not have it for Emacs (this is my third patch
to the project IIRC).  So I will contact the copyright clerk at FSF and
get it done.  Meanwhile, I'd appreciate reviews and comments.

Thanks,

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/

2015-01-19  Sergio Durigan Junior  <sergiodj@sergiodj.net>

	Adapt EUDC to BBDB 3.x
	* net/eudcb-bbdb.el (eudc-bbdb-attributes-translation-alist):
	Replacing 'net' by 'mail'.
	(eudc-bbdb-format-query): Likewise.
	(eudc-bbdb-filter-non-matching-record): Likewise.
	(eudc-bbdb-format-record-as-result): Likewise.

diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el
index 0400e5b..7abfd0c 100644
--- a/lisp/net/eudcb-bbdb.el
+++ b/lisp/net/eudcb-bbdb.el
@@ -43,7 +43,7 @@
 
 (defvar eudc-bbdb-attributes-translation-alist
   '((name . lastname)
-    (email . net)
+    (email . mail)
     (phone . phones))
   "Alist mapping EUDC attribute names to BBDB names.")
 
@@ -63,10 +63,10 @@
 		   firstname
 		   lastname))
 	(company (cdr (assq 'company query)))
-	(net (cdr (assq 'net query)))
+	(mail (cdr (assq 'mail query)))
 	(notes (cdr (assq 'notes query)))
 	(phone (cdr (assq 'phone query))))
-    (list name company net notes phone)))
+    (list name company mail notes phone)))
 
 
 (defun eudc-bbdb-filter-non-matching-record (record)
@@ -80,7 +80,7 @@
               (case-fold-search t)
               bbdb-val)
           (or (and (memq attr '(firstname lastname aka company phones
-                                addresses net))
+                                addresses mail))
                    (progn
                      (setq bbdb-val
                            (eval (list (intern (concat "bbdb-record-"
@@ -151,7 +151,7 @@
 The record is filtered according to `eudc-bbdb-current-return-attributes'"
   (require 'bbdb)
   (let ((attrs (or eudc-bbdb-current-return-attributes
-		   '(firstname lastname aka company phones addresses net notes)))
+		   '(firstname lastname aka company phones addresses mail notes)))
 	attr
 	eudc-rec
 	val)
@@ -163,7 +163,7 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
 	(setq val (eudc-bbdb-extract-phones record)))
        ((eq attr 'addresses)
 	(setq val (eudc-bbdb-extract-addresses record)))
-       ((memq attr '(firstname lastname aka company net notes))
+       ((memq attr '(firstname lastname aka company mail notes))
 	(setq val (eval
 		   (list (intern
 			  (concat "bbdb-record-"



             reply	other threads:[~2015-01-19 23:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 23:21 Sergio Durigan Junior [this message]
2015-01-24  6:47 ` [PATCH] Adjust EUDC to use BBDB 3.x Thomas Fitzsimmons
2015-01-24 23:42   ` Sergio Durigan Junior
2015-01-26 17:11     ` raman
2015-01-26 17:18       ` Thomas Fitzsimmons

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

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

  git send-email \
    --in-reply-to=87h9vml5l5.fsf@sergiodj.net \
    --to=sergiodj@sergiodj.net \
    --cc=emacs-devel@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.