* eudc fails with bbdb
@ 2005-04-14 11:26 Sébastien Kirche
2005-04-14 14:40 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Sébastien Kirche @ 2005-04-14 11:26 UTC (permalink / raw)
Hi,
I am currently making some tests with eudc and I have some problems.
I use a quite recent cvs Emacs with MacOS X with a v2.35 snapshot of
bbdb.
I managed to configure eudc to use my company MS Exchange ldap server.
I also installed eudc-mab.el to search into the Mac Address Book and it
is ok too.
But when i try to add bbdb as a local server and select it, it fails
when I try to search for a contact.
I have the following settings :
(eudc-set-server "localhost" 'bbdb t)
(setq eudc-server-hotlist '(("localhost" . bbdb)
("metz-exchange" . ldap)
("localhost" . mab)))
And if try a "Query with form" or either I call
(eudc-query '((name . "kir")))
It fails with that error :
Debugger entered--Lisp error: (invalid-function (macro lambda (vector) (list (quote aref) vector 4)))
bbdb-record-phones(["Alain" "Kirche" nil nil nil nil ("xxx@aol.com") ((creation-date . "2004-08-31") (timestamp . "2004-08-31")) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]])
eudc-bbdb-extract-phones(["Alain" "Kirche" nil nil nil nil ("xxx@aol.com") ((creation-date . "2004-08-31") (timestamp . "2004-08-31")) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]])
eudc-bbdb-format-record-as-result(["Alain" "Kirche" nil nil nil nil ("xxx@aol.com") ((creation-date . "2004-08-31") (timestamp . "2004-08-31")) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]])
mapcar(eudc-bbdb-format-record-as-result (["Alain" "Kirche" nil nil nil nil ("xxx@aol.com") (... ...) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]] ["S\x8e9\ bastien" "Kirche" ("S\x8e9ki" "Sebastien Kirche" "Seki") nil nil nil ("xxx@yyy.fr" "xxx.yyy@free.fr" "xxx.yyy@zzz.com" "xxx@laposte.net" "sebastien.kirche.no@spam.free.fr.invalid") (... ...) ["S\x8e9\ bastien Kirche" nil #<marker at 4938 in .bbdb> nil]]))
eudc-bbdb-query-internal(((lastname . "kir")) nil)
eudc-query(((name . "kir")))
eval((eudc-query (quote (...))))
eval-last-sexp-1(t)
eval-last-sexp(t)
eval-print-last-sexp()
call-interactively(eval-print-last-sexp)
As you can see, I have 2 records in bbdb containing "kir", but it seems
to fail to format the output.
Could someone give me some clue ?
Regards.
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-14 11:26 eudc fails with bbdb Sébastien Kirche
@ 2005-04-14 14:40 ` Stefan Monnier
2005-04-14 15:47 ` Sébastien Kirche
2005-04-14 15:38 ` Kevin Rodgers
[not found] ` <mailman.1508.1113493483.2895.help-gnu-emacs@gnu.org>
2 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-04-14 14:40 UTC (permalink / raw)
> Debugger entered--Lisp error: (invalid-function (macro lambda (vector) (list (quote aref) vector 4)))
Such an error is almost invariably due to a miscompiled file (either
because a file was not recompiled or because of a missing `require'
statement, ...).
In your case it seems the miscompiled code is in eudc-bbdb-extract-phones
where it uses the macro bbdb-record-phones.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-14 11:26 eudc fails with bbdb Sébastien Kirche
2005-04-14 14:40 ` Stefan Monnier
@ 2005-04-14 15:38 ` Kevin Rodgers
[not found] ` <mailman.1508.1113493483.2895.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2005-04-14 15:38 UTC (permalink / raw)
Sébastien Kirche wrote:
> And if try a "Query with form" or either I call
> (eudc-query '((name . "kir")))
>
> It fails with that error :
> Debugger entered--Lisp error: (invalid-function (macro lambda
(vector) (list (quote aref) vector 4)))
> bbdb-record-phones(["Alain" "Kirche" nil nil nil nil
("xxx@aol.com") ((creation-date . "2004-08-31") (timestamp .
"2004-08-31")) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]])
> eudc-bbdb-extract-phones(["Alain" "Kirche" nil nil nil nil
("xxx@aol.com") ((creation-date . "2004-08-31") (timestamp .
"2004-08-31")) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]])
> eudc-bbdb-format-record-as-result(["Alain" "Kirche" nil nil nil nil
("xxx@aol.com") ((creation-date . "2004-08-31") (timestamp .
"2004-08-31")) ["Alain Kirche" nil #<marker at 4815 in .bbdb> nil]])
> mapcar(eudc-bbdb-format-record-as-result (["Alain" "Kirche" nil nil
nil nil ("xxx@aol.com") (... ...) ["Alain Kirche" nil #<marker at 4815
in .bbdb> nil]] ["S\x8e9\ bastien" "Kirche" ("S\x8e9ki" "Sebastien
Kirche" "Seki") nil nil nil ("xxx@yyy.fr" "xxx.yyy@free.fr"
"xxx.yyy@zzz.com" "xxx@laposte.net"
"sebastien.kirche.no@spam.free.fr.invalid") (... ...) ["S\x8e9\ bastien
Kirche" nil #<marker at 4938 in .bbdb> nil]]))
> eudc-bbdb-query-internal(((lastname . "kir")) nil)
> eudc-query(((name . "kir")))
> eval((eudc-query (quote (...))))
> eval-last-sexp-1(t)
> eval-last-sexp(t)
> eval-print-last-sexp()
> call-interactively(eval-print-last-sexp)
>
> As you can see, I have 2 records in bbdb containing "kir", but it seems
> to fail to format the output.
Irrelevant.
> Could someone give me some clue ?
The eudc-bbdb-extract-phones function was compiled without the
bbdb-record-phones macro defined, so it was assumed to be a function.
This problem would be prevented if the eudc-bbdb-extract-phones source
file had
(eval-when-compile (require 'bbdb-foo))
assuming bbdb-record-phones is defined in bbdb-foo.el, which provides
the bbdb-foo feature.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-14 14:40 ` Stefan Monnier
@ 2005-04-14 15:47 ` Sébastien Kirche
2005-04-15 13:28 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Sébastien Kirche @ 2005-04-14 15:47 UTC (permalink / raw)
Hi Stefan,
Le 14 Apr 2005, Stefan Monnier s'est exprimé ainsi :
> Such an error is almost invariably due to a miscompiled file (either
> because a file was not recompiled or because of a missing `require'
> statement, ...).
>
> In your case it seems the miscompiled code is in
> eudc-bbdb-extract-phones where it uses the macro bbdb-record-phones.
Yes, but i still don't understand.
It seems to me that this macro is generated but the bbdb-defstruc that
is in bbdb.el and is required.
What do you mean by miscompiled/recompile ? I have tried to
byte-recompile the bbdb lisp files, but it keeps on failing withe same
"invalid-function". Anyway could not bbdb function without being byte
compiled ?
I have tried many things like manually re-requiring the bbd.el,
eudc... without success.
Do you think I should send a bug report to either bbdb or emacs
developers, or simply I am stupid ? ;)
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
[not found] ` <mailman.1508.1113493483.2895.help-gnu-emacs@gnu.org>
@ 2005-04-14 15:56 ` Sébastien Kirche
2005-04-14 22:33 ` Kevin Rodgers
0 siblings, 1 reply; 11+ messages in thread
From: Sébastien Kirche @ 2005-04-14 15:56 UTC (permalink / raw)
Le 14 Apr 2005, Kevin Rodgers vraute :
> > Could someone give me some clue ?
>
> The eudc-bbdb-extract-phones function was compiled without the
> bbdb-record-phones macro defined, so it was assumed to be a function.
>
> This problem would be prevented if the eudc-bbdb-extract-phones source
> file had
>
> (eval-when-compile (require 'bbdb-foo))
>
> assuming bbdb-record-phones is defined in bbdb-foo.el, which provides
> the bbdb-foo feature.
Many thanks for that explanation !
Actually i had found with Google that 4 years ago you already explained
why such a call was failing :
http://groups-beta.google.com/group/gnu.emacs.help/browse_frm/thread/f1d56b88c1ae9b1f/8d24edc422c9ac0c
But I was not able to find out the solution.
BTW : as eudc is part of Emacs, maybe i should send a request to
emacs-devel for adding the eval-when-compile ? Or maybe Stefan, if you
are reading this... Or is it a normal case ?
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-14 15:56 ` Sébastien Kirche
@ 2005-04-14 22:33 ` Kevin Rodgers
0 siblings, 0 replies; 11+ messages in thread
From: Kevin Rodgers @ 2005-04-14 22:33 UTC (permalink / raw)
Cc: bug-gnu-emacs
Sébastien Kirche wrote:
> Le 14 Apr 2005, Kevin Rodgers vraute :
>>The eudc-bbdb-extract-phones function was compiled without the
>>bbdb-record-phones macro defined, so it was assumed to be a function.
>>
>>This problem would be prevented if the eudc-bbdb-extract-phones source
>>file had
>>
>> (eval-when-compile (require 'bbdb-foo))
>>
>>assuming bbdb-record-phones is defined in bbdb-foo.el, which provides
>>the bbdb-foo feature.
>
> Many thanks for that explanation !
>
> Actually i had found with Google that 4 years ago you already explained
> why such a call was failing :
>
http://groups-beta.google.com/group/gnu.emacs.help/browse_frm/thread/f1d56b88c1ae9b1f/8d24edc422c9ac0c
>
> But I was not able to find out the solution.
M-x byte-compile-file RET eudc-bbdb.el RET
> BTW : as eudc is part of Emacs, maybe i should send a request to
> emacs-devel for adding the eval-when-compile ? Or maybe Stefan, if you
> are reading this... Or is it a normal case ?
But bbdb is not part of Emacs, and so the eudc-bbdb library which
depends on it is definitely abnormal. eudc-bbdb.el does try to do the
right thing:
(require 'eudc)
(if (not (featurep 'bbdb))
(load-library "bbdb"))
(if (not (featurep 'bbdb-com))
(load-library "bbdb-com"))
but the Lisp files in the Emacs distribution are presumably compiled
without any add-on libraries available. I think if those were changed
to the conventional usage:
(require 'eudc)
(require 'bbdb)
(require 'bbdb-com)
then eudc-bbdb.el would fail to compile in a bare Emacs, so a bogus
eudc-bbdb.elc would not be distributed. As long as Emacs can be built
without every .el file being successfully compiled, that would be fine.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-14 15:47 ` Sébastien Kirche
@ 2005-04-15 13:28 ` Stefan Monnier
2005-04-15 14:57 ` Sébastien Kirche
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-04-15 13:28 UTC (permalink / raw)
>> In your case it seems the miscompiled code is in eudc-bbdb-extract-phones
>> where it uses the macro bbdb-record-phones.
[...]
> I have tried to byte-recompile the bbdb lisp files, but it keeps on
> failing withe same "invalid-function".
Since the error is in eudc-bbdb-extract-phones, recompiling bbdb won't help.
How could I have explained it better?
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-15 13:28 ` Stefan Monnier
@ 2005-04-15 14:57 ` Sébastien Kirche
2005-04-15 15:53 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Sébastien Kirche @ 2005-04-15 14:57 UTC (permalink / raw)
Le 15 Apr 2005, Stefan Monnier a formulé :
> > I have tried to byte-recompile the bbdb lisp files, but it keeps on
> > failing withe same "invalid-function".
>
> Since the error is in eudc-bbdb-extract-phones, recompiling bbdb won't
> help. How could I have explained it better?
Sorry, i did not understand the problem in that way : i though it was
due to bbdb.
It is ok since Kevin explanation about byte compiling of eudcb-bbdb.el
BTW : what about adding
(eval-when-compile (require 'bbdb))
as Kevin suggested or replacing
(if (not (featurep 'bbdb))
(load-library "bbdb"))
by a simple (require 'bbdb) or (require 'bbdb nil t) ?
As using eudcb-bbdb implies the use of bbdb...
Should it be forwarded to emacs-devel ? What do you think of it ?
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-15 14:57 ` Sébastien Kirche
@ 2005-04-15 15:53 ` Stefan Monnier
2005-04-15 16:42 ` Sébastien Kirche
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-04-15 15:53 UTC (permalink / raw)
>> > I have tried to byte-recompile the bbdb lisp files, but it keeps on
>> > failing withe same "invalid-function".
>> Since the error is in eudc-bbdb-extract-phones, recompiling bbdb won't
>> help. How could I have explained it better?
> Sorry, i did not understand the problem in that way : i though it was
> due to bbdb.
I figured that much, which is why I ask (again): how could I have explained
it better?
> by a simple (require 'bbdb) or (require 'bbdb nil t) ?
It should be just (require 'bbdb), I guess, except that BBDB is not part of
Emacs, so we can't properly compile eudcb-bbdb.el in Emacs. I.e. another
solution is required.
> As using eudcb-bbdb implies the use of bbdb...
But it gets compiled long before knowing whether you're going to ever use it.
> Should it be forwarded to emacs-devel ? What do you think of it ?
Of course. (Re-)Read the INSTALL.CVS file.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-15 15:53 ` Stefan Monnier
@ 2005-04-15 16:42 ` Sébastien Kirche
2005-04-16 4:11 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Sébastien Kirche @ 2005-04-15 16:42 UTC (permalink / raw)
Le 15 avr 2005, Stefan Monnier a formulé :
> > > > I have tried to byte-recompile the bbdb lisp files, but it keeps
> > > > on failing withe same "invalid-function".
> > > Since the error is in eudc-bbdb-extract-phones, recompiling bbdb
> > > won't help. How could I have explained it better?
>
> > Sorry, i did not understand the problem in that way : i though it
> > was due to bbdb.
>
> I figured that much, which is why I ask (again): how could I have
> explained it better?
I am sorry Stefan, the problem seems to be there between my chair and my
keyboard : I am not that familiar with lisp debugging and I focused my
attention
- to your other sentence «Such an error is almost invariably due to a
miscompiled file»
- and to the fact that the last function listed by the backtrace is
bbdb-record-phones that is part of bbdb.
That's why I kept on compiling bbdb.el while you were pointing
eudc-bbdb-extract-phones to me.
> > by a simple (require 'bbdb) or (require 'bbdb nil t) ?
>
> It should be just (require 'bbdb), I guess, except that BBDB is not
> part of Emacs, so we can't properly compile eudcb-bbdb.el in Emacs.
> I.e. another solution is required.
>
> > As using eudcb-bbdb implies the use of bbdb...
>
> But it gets compiled long before knowing whether you're going to ever
> use it.
>
> > Should it be forwarded to emacs-devel ? What do you think of it ?
>
> Of course.
I will send such a report in few.
> (Re-)Read the INSTALL.CVS file.
Are you talking about that part (otherwise i don't understand your
remark) ?
,----
| Occasionally the file "lisp/loaddefs.el" will need be updated to reflect
| new autoloaded functions. If you see errors about undefined lisp
| functions during compilation, that may be the reason. Another symptom
| may be an error saying that "loaddefs.el" could not be found; this is
| due to a change in the way loaddefs.el was handled in CVS, and should
| only happen once, for users that are updating old CVS trees.
|
| To update loaddefs.el, do:
|
| $ cd lisp
| $ make autoloads EMACS=../src/emacs
|
| If either of above procedures fails, try "make bootstrap".
`----
But I actually don't know if loaddefs.el is concerned by that problem.
Anyway, it was not obvious to me that installing a package like bbdb
would need to modify already installed files other than just usual
.emacs/.gnus config files.
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: eudc fails with bbdb
2005-04-15 16:42 ` Sébastien Kirche
@ 2005-04-16 4:11 ` Stefan Monnier
0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2005-04-16 4:11 UTC (permalink / raw)
>> > Should it be forwarded to emacs-devel ? What do you think of it ?
>> Of course.
> I will send such a report in few.
>> (Re-)Read the INSTALL.CVS file.
> Are you talking about that part (otherwise i don't understand your
> remark) ?
No. It was about forwarding to emacs-devel:
Questions, requests, and bug reports about the CVS versions of Emacs
should be sent to emacs-pretest-bug@gnu.org rather than gnu.emacs.help
or gnu.emacs.bug. Ideally, use M-x report-emacs-bug RET which will
send it to the proper place.
> Anyway, it was not obvious to me that installing a package like bbdb
> would need to modify already installed files other than just usual
> .emacs/.gnus config files.
Not only it shouldn't: it can't. And that's the problem.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-04-16 4:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-14 11:26 eudc fails with bbdb Sébastien Kirche
2005-04-14 14:40 ` Stefan Monnier
2005-04-14 15:47 ` Sébastien Kirche
2005-04-15 13:28 ` Stefan Monnier
2005-04-15 14:57 ` Sébastien Kirche
2005-04-15 15:53 ` Stefan Monnier
2005-04-15 16:42 ` Sébastien Kirche
2005-04-16 4:11 ` Stefan Monnier
2005-04-14 15:38 ` Kevin Rodgers
[not found] ` <mailman.1508.1113493483.2895.help-gnu-emacs@gnu.org>
2005-04-14 15:56 ` Sébastien Kirche
2005-04-14 22:33 ` Kevin Rodgers
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).