From: Matt Price <matt.price@utoronto.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: 'help-gnu-emacs' <help-gnu-emacs@gnu.org>
Subject: RE: pymacs & interactivel isp functions
Date: Sat, 22 Nov 2008 03:39:54 -0500 [thread overview]
Message-ID: <1227343194.20766.717.camel@localhost> (raw)
In-Reply-To: <000801c94a6d$7d216100$c2b22382@us.oracle.com>
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 <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
> >
> 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 <moptop99@gmail.com>" "Matthew Garrett
<mjg59@srcf.ucam.org>" "Matt Zimmerman <mdz@canonical.com>" "Matt
Fontaine <Matty_fontaine@hotmail.com>" "Matt Wilks
<matt@madhaus.cns.utoronto.ca>" "Matthew Yates <myatesmyates@yahoo.com>"
"Matthew Flaschen <matthew.flaschen@gatech.edu>" "Matthew Vermeulen
<MattVermeulen@gmail.com>" "Matthew East <matt@mdke.org>" "matthewreedy
<matthewreedy@yahoo.com>" ...)
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
next prev parent reply other threads:[~2008-11-22 8:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-19 16:16 pymacs & interactivel isp functions Matt Price
2008-11-19 17:37 ` Drew Adams
2008-11-22 8:39 ` Matt Price [this message]
2008-11-22 15:27 ` Kevin Rodgers
2008-11-22 15:27 ` Drew Adams
2008-11-22 21:07 ` Matt Price
2008-11-22 21:45 ` Drew Adams
[not found] <mailman.747.1227111401.26697.help-gnu-emacs@gnu.org>
2008-11-20 19:48 ` Greg Detre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1227343194.20766.717.camel@localhost \
--to=matt.price@utoronto.ca \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.