From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: completion-all-completions-with-base-size Date: Sat, 18 Oct 2008 15:31:18 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224358320 24922 80.91.229.12 (18 Oct 2008 19:32:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2008 19:32:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 18 21:32:57 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KrHXT-0007J0-67 for ged-emacs-devel@m.gmane.org; Sat, 18 Oct 2008 21:32:39 +0200 Original-Received: from localhost ([127.0.0.1]:35517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrHWO-0007GQ-6V for ged-emacs-devel@m.gmane.org; Sat, 18 Oct 2008 15:31:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrHWE-0007Bm-PQ for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:31:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrHWD-0007Ab-1j for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:31:22 -0400 Original-Received: from [199.232.76.173] (port=33449 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrHWC-0007AW-Op for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:31:20 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:49929 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KrHWB-0004Bc-8a; Sat, 18 Oct 2008 15:31:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQEAITW+UhMCpQ6/2dsb2JhbACBcrgMCIcPgmkIe4EJ X-IronPort-AV: E=Sophos;i="4.33,441,1220241600"; d="scan'208";a="28555912" Original-Received: from 76-10-148-58.dsl.teksavvy.com (HELO ceviche.home) ([76.10.148.58]) by ironport2-out.teksavvy.com with ESMTP; 18 Oct 2008 15:31:18 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 28DC7B4111; Sat, 18 Oct 2008 15:31:18 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Sat, 18 Oct 2008 15:03:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104604 Archived-At: > This NEWS entry: > *** `all-completions' may now return the base size in the last cdr. > Since this means the returned list is not properly nil-terminated, this > is an incompatible change and is thus enabled by the new variable > completion-all-completions-with-base-size. > is inaccurate: `all-completions' does not take into account the value > of `completion-all-completions-with-base-size'. IIUC, this is not relevant: the base-size is always 0 (in which case it's not necessary to add it) for all completion tables except functional ones. So of course all-completions doesn't take it into account: only the functional completion tables do. Still, the value returned by all-completions can contains such `cdr's and it depends on completion-all-completions-with-base-size. > Only `completion-all-completions' and a couple of internal functions > consult that variable. `completion-all-completions' does not consult it: it sets it. > But `completion-all-completions' is not documented in the ELisp > manual, as are most of other APIs in minibuffer.el (should they be > documented?), I don't see why they should be documented there. The entry points are the same as before (and are documented): minibuffer-complete, minibuffer-complete-word, ... > so it sounds like the above NEWS entry does not warrant any > documentation in the manuals? Why then it was added to NEWS? Because some functions may call all-completions in a context where someone has set completion-all-completions-with-base-size (e.g. when all-completions is used internally by a functional completion table), in which case it may be surprised by the extra `cdr' (which could cause `length' or `mapcar' to signal an error). I hope to be able to find the time to revisit this specific completion-all-completions-with-base-size before the release, because I believe that with the `boundaries' thingy I added later, completion-all-completions-with-base-size might have become unnecessary. Stefan