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: Wed, 19 Nov 2008 09:37:26 -0800

> (setq collection (edsquery-return-addresslist "matt"))
> 
> which assigns this value to collection:
> ("Matt Price <matt.price@utoronto.ca>" ...)
> 
> my problem comes with a test function that triesto use the 
> results of a query as a collection for tab-completion:
> 
> (defun matt/external-addressbook-completion (stub)
> "get a list of addresses for tab-completion in a new email"
>   (interactive (list (completing-read "Name: "
> (edsquery-return-addresslist (string))
> ;;                                  collection
>                                     nil t))))
> 
> the function works properly if i use the list "collection" 
> generated as above, but does not give any completion options if
> the python functioloadf is called instead.  

C-h f string

,----
| string is a built-in function in `C source code'.
| 
| (string &rest CHARACTERS)
| 
| Concatenate all the argument characters and make the result a string.
`----

You used (string), which calls string with an empty list of args, so it
concatenates all zero of those together into the empty string, "".

> in the *Pymacs* buffer i ... have this message:
> >23   eval python[1]("matt")
> but when calling from completing-read, i get this instead:
> >19   eval python[1]("")

Right. See above.

> to me it seems that the completion function isn't being sent the input
> string.

What input string? You're passing (string), which is "", not any input string.





reply via email to

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