help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: pymacs & interactivel isp functions


From: Drew Adams
Subject: RE: pymacs & interactivel isp functions
Date: Sat, 22 Nov 2008 07:27:30 -0800

> > You're passing (string), which is ""
> 
> thanks drew.  i don't know why i thought that similar syntax 
> had worked in an earlier case -- clearly it must not have.
> this was very helpful and now i am very close.  
> 
> i now have the following completion code:
> 
> (defun matt/external-addressbook-completion (stub)
>   (interactive (list (completing-read "Name: "
>                                     #'edsquery-return-addresslist 
>                                     nil t))))
>
> when called interactively, it _does_ suggest the first option in the
> list that python returns, but it also gives me the following error:
> 
> ad-Orig-minibuffer-complete: Wrong type argument: number-or-marker-p,
> ("Matt Price <moptop99@gmail.com>" ...)

Dunno. Your function that does all of the completion,
`edsquery-return-addresslist' isn't shown. 

The error message is saying that function `ad-Orig-minibuffer-complete' expected
a number or a marker but received the list of strings. 

You also apparently advised the standard function `minibuffer-complete', and
that code isn't shown either. So it's difficult to guess what is the problem.

> i'm not sure, but it looks like it isn't breaking the cdr 
> cell down into its components before evaluating it?
> suggesting to me that, again, there's something wrong with my syntax.

No comprendo. What isn't breaking what cdr cell down into what components?

FWIW, I see nothing wrong with the call to completing-read. The problem is
likely in your completion function `edsquery-return-addresslist'.

> i appreciate the remedial lisp lessons.  sorry to just continue not
> getting it... thanks again,

The error message should help. Look at your advised version of
`minibuffer-complete', `ad-Orig-minibuffer-complete', and see why and where it
expects a number or marker. Look at why your function `eds...' gives it a list
of strings in that place instead. Perhaps try unadvising `minibuffer-complete',
at least for testing.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]