From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#5495: 23.1.90; symbol completion fails Date: Mon, 01 Feb 2010 10:16:20 -0500 Message-ID: References: <878wbgfm6o.fsf@regnitz.physics.niu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265038233 14950 80.91.229.12 (1 Feb 2010 15:30:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Feb 2010 15:30:33 +0000 (UTC) Cc: 5495@debbugs.gnu.org To: Roland Winkler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 01 16:30:28 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NbyEM-0001pi-Tg for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Feb 2010 16:30:27 +0100 Original-Received: from localhost ([127.0.0.1]:39776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbyEM-0001fO-9s for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Feb 2010 10:30:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbyBU-0000M3-Ay for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2010 10:27:28 -0500 Original-Received: from [199.232.76.173] (port=34243 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbyBT-0000La-Kz for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2010 10:27:27 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbyBR-0004fm-Qp for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2010 10:27:27 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47172) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NbyBR-0004fc-C3 for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2010 10:27:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nby1O-00009I-Sz; Mon, 01 Feb 2010 10:17:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2010 15:17:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5495 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5495-submit@debbugs.gnu.org id=B5495.1265037388539 (code B ref 5495); Mon, 01 Feb 2010 15:17:02 +0000 Original-Received: (at 5495) by debbugs.gnu.org; 1 Feb 2010 15:16:28 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nby0q-00008e-9O for submit@debbugs.gnu.org; Mon, 01 Feb 2010 10:16:28 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nby0o-00008V-3h for 5495@debbugs.gnu.org; Mon, 01 Feb 2010 10:16:26 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQEAMN+ZktFpaN9/2dsb2JhbACBM9hjhEUEilo X-IronPort-AV: E=Sophos;i="4.49,383,1262581200"; d="scan'208";a="55061610" Original-Received: from 69-165-163-125.dsl.teksavvy.com (HELO pastel.home) ([69.165.163.125]) by ironport2-out.pppoe.ca with ESMTP; 01 Feb 2010 10:16:20 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 908EF7F8A; Mon, 1 Feb 2010 10:16:20 -0500 (EST) In-Reply-To: <878wbgfm6o.fsf@regnitz.physics.niu.edu> (Roland Winkler's message of "Fri, 29 Jan 2010 18:53:03 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 01 Feb 2010 10:17:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34835 Archived-At: > I am having trouble with symbol completion. The lisp manual says > about `try-completion' > The value of COLLECTION must be a list of strings or symbols, > an alist, an obarray, ... That's incorrect, a list of symbols is not supported (although it somewhat works). > So the following works well > (try-completion "foo" '("bar" baz)) ; fine > (try-completion "foo" '((bar) baz)) ; fine > Yet the following example fails > (try-completion "foo" '(bar baz)) ; fails > because it tries to interpret (bar baz) as a call of function bar > using arg baz. Not, it interprets the whole (bar baz) as a function (without checking whether the first symbol is indeed a lambda). > Shouldn't the last example work, too? Or am I missing something? It can be made to work, but then it will mysteriously break again when the first symbol in the list happens to be a lambda. > I thought I had used symbol completion before. But now I cannot get > it to work anymore. Use an alist with symbols as keys, or use an obarray. Otherwise pass your list of symbols through (mapcar 'symbol-name ...) to turn it into a list of strings. Stefan