From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: completion-all-completions-with-base-size Date: Sat, 18 Oct 2008 22:08:58 +0200 Message-ID: References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1224360571 31627 80.91.229.12 (18 Oct 2008 20:09:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2008 20:09:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 18 22:10:30 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 1KrI85-0007cd-TA for ged-emacs-devel@m.gmane.org; Sat, 18 Oct 2008 22:10:30 +0200 Original-Received: from localhost ([127.0.0.1]:35041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrI70-0002Lv-Mb for ged-emacs-devel@m.gmane.org; Sat, 18 Oct 2008 16:09:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrI6e-0002E0-G8 for emacs-devel@gnu.org; Sat, 18 Oct 2008 16:09:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrI6d-0002Dc-Dh for emacs-devel@gnu.org; Sat, 18 Oct 2008 16:09:00 -0400 Original-Received: from [199.232.76.173] (port=46827 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrI6d-0002DW-7E for emacs-devel@gnu.org; Sat, 18 Oct 2008 16:08:59 -0400 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:64651) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KrI6c-0001RU-RE for emacs-devel@gnu.org; Sat, 18 Oct 2008 16:08:59 -0400 Original-Received: from HOME-C4E4A596F7 ([77.126.98.197]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K8Y00DNFAPAYVE0@i_mtaout2.012.net.il> for emacs-devel@gnu.org; Sat, 18 Oct 2008 22:10:23 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:104608 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Sat, 18 Oct 2008 15:31:18 -0400 > > > 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: Sorry, I'm not following: what isn't relevant, and to what? > 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. Now you lost me completely. Could you please describe one scenario and the corresponding sequence of function calls which would cause all-completions (either what it does or the values it returns) to depend on completion-all-completions-with-base-size? > > 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, ... Yes, but all-completions _is_ described, as are try-completion and test-completion. The ELisp manual describes not only high-level entry points, but also the low-level primitives, where that may help a Lisp programmer to write yet another higher-level completion function. > > 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). Well, I'm probably missing something, because I couldn't see how what all-completions returns could depend on completion-all-completions-with-base-size. Please help me understand that. Thanks.