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: Sat, 22 Nov 2008 07:27:30 -0800 Message-ID: <000f01c94cb6$d5ac5690$0200a8c0@us.oracle.com> References: <1227111389.17262.159.camel@localhost> <000801c94a6d$7d216100$c2b22382@us.oracle.com> <1227343194.20766.717.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 1227367880 1225 80.91.229.12 (22 Nov 2008 15:31:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 15:31:20 +0000 (UTC) Cc: 'help-gnu-emacs' To: "'Matt Price'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 16:32: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 1L3uT7-00011R-Et for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 16:32:21 +0100 Original-Received: from localhost ([127.0.0.1]:32934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3uRy-0006GW-6Q for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 10:31:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3uOQ-0005p4-Nd for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 10:27:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3uOO-0005oG-Rk for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 10:27:30 -0500 Original-Received: from [199.232.76.173] (port=33585 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3uOO-0005o7-Li for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 10:27:28 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:60112 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 1L3uOO-000146-9z for help-gnu-emacs@gnu.org; Sat, 22 Nov 2008 10:27:28 -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 mAMFRflm013672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 22 Nov 2008 15:27:42 GMT Original-Received: from acsmt700.oracle.com (acsmt700.oracle.com [141.146.40.70]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mAMFRPmi011675; Sat, 22 Nov 2008 15:27:27 GMT Original-Received: from dradamslap1 (/141.144.168.133) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 22 Nov 2008 07:27:19 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AclMfhGAwrVkz14UTTaC3dMRu9Z5YgAN4/Nw In-Reply-To: <1227343194.20766.717.camel@localhost> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt700.oracle.com [141.146.40.70] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.492824D9.020D: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:60019 Archived-At: > > 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 " ...) 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.