all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Sergio Durigan Junior <sergiodj@sergiodj.net>
Cc: 19678@debbugs.gnu.org
Subject: bug#19678: [PATCH] EUDC does not support BBDB 3.x
Date: Mon, 26 Jan 2015 17:21:22 -0500	[thread overview]
Message-ID: <m3d261yyhp.fsf@fitzsim.org> (raw)
In-Reply-To: <87lhkpjrg3.fsf@sergiodj.net> (Sergio Durigan Junior's message of "Mon, 26 Jan 2015 14:02:36 -0500")

Sergio Durigan Junior <sergiodj@sergiodj.net> writes:

> On Sunday, January 25 2015, Thomas Fitzsimmons wrote:
>
>> Can you see if the attached patch works for you?  It works for me,
>> introduces minimal changes and allows for upgrading BBDB 2 to BBDB 3
>> without restarting Emacs.  The defvar change in your patch concerns me
>> because it will miss if the BBDB version changes after the variable is
>> first assigned.
>
> Almost there...  The patch doesn't work as-is because
> 'eudc-bbdb-current-return-attributes' is set to '(firstname lastname
> mail) for me when eudc-bbdb-format-record-as-result is called.  It means
> that, in the while loop, it will try to call eq/memq against 'mail, and
> it fails.

Hmm, I thought those get converted; in any case, I wasn't seeing that
problem.  Do you have any customizations of the relevant variables?  Do
you have my latest EUDC/LDAP changes from master tip?

Can we step back a bit and make sure we're doing the same tests?  BBDB
2.x is tricky because it is provided by the distro, in my case Fedora.
Let's focus on testing BBDB 3.x so that I can replicate the exact same
issue that you're seeing.

Can you revert our patch, then:

1) Checkout and build Emacs revision
   03a20dc9519616359bfa1b77fd4b31e1963c8bd4 from
   git://git.savannah.gnu.org/emacs.git

   This revision has a bunch of my EUDC/LDAP updates in it.

2) Download
   http://download.savannah.gnu.org/releases/bbdb/bbdb-3.1.2.tar.gz

3) Untar and build the ELPA package:
   export EMACS=<your-emacs-build-dir>/src/emacs
   ./configure && make elpa
   unset EMACS

4) In the emacs src directory:
   mkdir test-home

5) HOME=`pwd`/test-home ./emacs -Q

6) M-x package-install-file

   bbdb-3.1.2.tar (the one built in step 3)

7) M-x bbdb-create

   Name: Test User
   Network Address: test@gnu.org

8) C-x s

   to save .bbdb

9) M-: (eval-after-load "message"
        '(define-key message-mode-map (kbd "TAB") 'eudc-expand-inline))

10) M-: (setq debug-on-error 't)

11) C-x m

12) Tes[TAB]

    (no server, bbdb protocol)

Without my patch, I get:

Debugger entered--Lisp error: (void-function bbdb-record-net)
  (bbdb-record-net record)
  eval((bbdb-record-net record))

  eudc-bbdb-format-record-as-result(["Test" "User" nil nil nil nil nil
  ("test@gnu.org") ((creation-date . "2015-01-26 21:56:26 +0000")
  (timestamp . "2015-01-26 21:56:26 +0000")) ["Test User" "User, Test"
  nil ("test@gnu.org") nil #<marker at 64 in bbdb>]])
  
  mapcar(eudc-bbdb-format-record-as-result (["Test" "User" nil nil nil
  nil nil ("test@gnu.org") ((creation-date . "2015-01-26 21:56:26
  +0000") (timestamp . "2015-01-26 21:56:26 +0000")) ["Test User" "User,
  Test" nil ("test@gnu.org") nil #<marker at 64 in bbdb>]]))
  
  eudc-bbdb-query-internal(((firstname . "Tes")) (firstname lastname
  net))
  
  eudc-query(((firstname . "Tes")) (firstname lastname net))
  eudc-expand-inline()
  funcall-interactively(eudc-expand-inline)
  call-interactively(eudc-expand-inline nil nil)
  command-execute(eudc-expand-inline)

With my patch (0001-EUDC-Support-BBDB-3.patch), it works.  eudc-query
gets called with 'net, not 'mail.

If that works for you, can you try to replicate the other error you're
seeing when my patch is applied, in this same minimal environment, and
paste the testing steps and the backtrace you get?

Thanks,
Thomas





  reply	other threads:[~2015-01-26 22:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24 23:37 bug#19678: [PATCH] EUDC does not support BBDB 3.x Sergio Durigan Junior
2015-01-25 23:49 ` Thomas Fitzsimmons
2015-01-26 19:02   ` Sergio Durigan Junior
2015-01-26 22:21     ` Thomas Fitzsimmons [this message]
2015-01-26 22:47       ` Sergio Durigan Junior
2015-01-27  2:10         ` Thomas Fitzsimmons
2015-02-07  1:43           ` Sergio Durigan Junior
2015-03-09  1:22             ` 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=m3d261yyhp.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=19678@debbugs.gnu.org \
    --cc=sergiodj@sergiodj.net \
    /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.