From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Price Newsgroups: gmane.emacs.help Subject: RE: pymacs & interactivel isp functions Date: Sat, 22 Nov 2008 03:39:54 -0500 Organization: History Department, University of Toronto Message-ID: <1227343194.20766.717.camel@localhost> References: <1227111389.17262.159.camel@localhost> <000801c94a6d$7d216100$c2b22382@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1227343283 4514 80.91.229.12 (22 Nov 2008 08:41:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 08:41:23 +0000 (UTC) Cc: 'help-gnu-emacs' To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 09:42:23 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 1L3o4I-0001VN-88 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 09:42:18 +0100 Original-Received: from localhost ([127.0.0.1]:49228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3o39-0003Uv-4X for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 03:41:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3o2G-0003KU-6o for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 03:40:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3o2E-0003K4-Vn for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 03:40:11 -0500 Original-Received: from [199.232.76.173] (port=49492 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3o2E-0003K0-MS for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 03:40:10 -0500 Original-Received: from bureau60.ns.utoronto.ca ([128.100.132.147]:49986) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3o2E-0004WP-Bd for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 03:40:10 -0500 Original-Received: from anarres.mercey.org (CPE001d7e1d5798-CM0014f8cd1c4c.cpe.net.cable.rogers.com [173.32.83.31]) (authenticated bits=0) by bureau60.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id mAM8dxKV016964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 22 Nov 2008 03:40:01 -0500 Original-Received: by anarres.mercey.org (Postfix, from userid 1000) id 7FB411203A4; Sat, 22 Nov 2008 03:39:58 -0500 (EST) In-Reply-To: <000801c94a6d$7d216100$c2b22382@us.oracle.com> X-Mailer: Evolution 2.24.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:60016 Archived-At: On Wed, 2008-11-19 at 09:37 -0800, Drew Adams wrote: > > (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 > > > You used (string), which calls string with an empty list of args, so it > concatenates all zero of those together into the empty string, "". > > 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. > 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 " "Matthew Garrett " "Matt Zimmerman " "Matt Fontaine " "Matt Wilks " "Matthew Yates " "Matthew Flaschen " "Matthew Vermeulen " "Matthew East " "matthewreedy " ...) 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. i appreciatethe remedial lisp lessons. sorry to just continue not getting it... thanks again, matt