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#21644: 24.4; completing-read acts differently on functional collection Date: Fri, 16 Oct 2015 09:12:31 -0400 Message-ID: References: <5615A2EA.4@thompsonclan.org> <87vbahmzwd.fsf@gmail.com> <561C5D0B.9070303@yandex.ru> <561C5FB0.6030105@thompsonclan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445001229 27750 80.91.229.3 (16 Oct 2015 13:13:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2015 13:13:49 +0000 (UTC) Cc: 21644@debbugs.gnu.org, Oleh Krehel , Dmitry Gutov To: Ryan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 16 15:13:37 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zn4pD-00057x-4m for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Oct 2015 15:13:35 +0200 Original-Received: from localhost ([::1]:53560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn4pC-0006KO-Lt for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Oct 2015 09:13:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn4ol-0005ix-LP for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 09:13:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn4og-0003Ai-DT for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 09:13:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn4og-0003AO-AA for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 09:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zn4of-0003p6-T7 for bug-gnu-emacs@gnu.org; Fri, 16 Oct 2015 09:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Oct 2015 13:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21644 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21644-submit@debbugs.gnu.org id=B21644.144500115514652 (code B ref 21644); Fri, 16 Oct 2015 13:13:01 +0000 Original-Received: (at 21644) by debbugs.gnu.org; 16 Oct 2015 13:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:53223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zn4oE-0003oG-Qu for submit@debbugs.gnu.org; Fri, 16 Oct 2015 09:12:35 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:22223) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zn4oC-0003o7-KY for 21644@debbugs.gnu.org; Fri, 16 Oct 2015 09:12:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ArEwA731xV/0qOCkxcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBBFYjEAs0EhQYDSSIP88jAQEBAQYBAQEBHos6hQUHhC0FnxeGaYsrghSBRSOEFCKCeAEBAQ X-IPAS-Result: A0ArEwA731xV/0qOCkxcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBBFYjEAs0EhQYDSSIP88jAQEBAQYBAQEBHos6hQUHhC0FnxeGaYsrghSBRSOEFCKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="169763791" Original-Received: from 76-10-142-74.dsl.teksavvy.com (HELO pastel.home) ([76.10.142.74]) by ironport2-out.teksavvy.com with ESMTP; 16 Oct 2015 09:12:33 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A3FB66285B; Fri, 16 Oct 2015 09:12:31 -0400 (EDT) In-Reply-To: <561C5FB0.6030105@thompsonclan.org> (Ryan's message of "Mon, 12 Oct 2015 18:34:40 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107679 Archived-At: >> (if (functionp collection) >> collection >> ;; Capture collection in a closure >> (lambda (string pred all) >> (funcall >> (cond >> ((eq all 't) >> #'all-completions) >> ((eq all 'lambda) >> #'test-completion) >> (t >> #'try-completion)) >> string collection pred)))) > I wasn't aware of `test-completion'. I was going based on the docstring for > `completing-read', which only mentions `try-completion' and > `all-completions'. Is there any other documentation I should have consulted? Don't write the code above. Use complete-with-action (or completion-table-dynamic if that fits your need) which should handle all the possible values of `all', including the new ones we'll introduce in Emacs-27. Stefan