From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: pymacs & interactivel isp functions Date: Wed, 19 Nov 2008 09:37:26 -0800 Message-ID: <000801c94a6d$7d216100$c2b22382@us.oracle.com> References: <1227111389.17262.159.camel@localhost> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227116299 26461 80.91.229.12 (19 Nov 2008 17:38:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2008 17:38:19 +0000 (UTC) To: "'Matt Price'" , "'help-gnu-emacs'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 19 18:39:22 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L2r1C-00049Z-Ps for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Nov 2008 18:39:11 +0100 Original-Received: from localhost ([127.0.0.1]:38954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2r03-0004wr-Qq for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Nov 2008 12:37:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2qzf-0004u3-V5 for help-gnu-emacs@gnu.org; Wed, 19 Nov 2008 12:37:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2qzd-0004o5-66 for help-gnu-emacs@gnu.org; Wed, 19 Nov 2008 12:37:34 -0500 Original-Received: from [199.232.76.173] (port=54206 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2qzd-0004nw-2Y for help-gnu-emacs@gnu.org; Wed, 19 Nov 2008 12:37:33 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:30250 helo=rgminet13.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2qzc-0002fP-OM for help-gnu-emacs@gnu.org; Wed, 19 Nov 2008 12:37:32 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAJHbku1022631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Nov 2008 17:37:47 GMT Original-Received: from acsmt703.oracle.com (acsmt703.oracle.com [141.146.40.81]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAJHbWO9031179; Wed, 19 Nov 2008 17:37:33 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 Nov 2008 17:37:26 +0000 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 In-Reply-To: <1227111389.17262.159.camel@localhost> Thread-Index: AclKYlkquoEgzgecRoudiq/BmOmrigACmoiw X-Source-IP: acsmt703.oracle.com [141.146.40.81] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.49244ED8.0159:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59933 Archived-At: > (setq collection (edsquery-return-addresslist "matt")) > > which assigns this value to collection: > ("Matt Price " ...) > > 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.