From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Out-of-date completions for `read-buffer' Date: Wed, 16 Aug 2006 13:55:32 -0700 (PDT) Message-ID: <34189.128.165.123.18.1155761732.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1155761755 26938 80.91.229.2 (16 Aug 2006 20:55:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2006 20:55:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 16 22:55:53 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GDSQa-0005sl-ES for ged-emacs-devel@m.gmane.org; Wed, 16 Aug 2006 22:55:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDSQZ-0003SB-Iv for ged-emacs-devel@m.gmane.org; Wed, 16 Aug 2006 16:55:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GDSQN-0003S6-5z for emacs-devel@gnu.org; Wed, 16 Aug 2006 16:55:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GDSQK-0003Ru-Dh for emacs-devel@gnu.org; Wed, 16 Aug 2006 16:55:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDSQK-0003Rr-9j for emacs-devel@gnu.org; Wed, 16 Aug 2006 16:55:36 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GDSWe-0001o2-Lw for emacs-devel@gnu.org; Wed, 16 Aug 2006 17:02:09 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailwasher-b.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k7GKtW3F026630 for ; Wed, 16 Aug 2006 14:55:32 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k7GKtW0F023697 for ; Wed, 16 Aug 2006 14:55:32 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k7GKtWhR005800 for ; Wed, 16 Aug 2006 14:55:32 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k7GKtWMr005798; Wed, 16 Aug 2006 13:55:32 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 16 Aug 2006 13:55:32 -0700 (PDT) Original-To: emacs-devel@gnu.org User-Agent: SquirrelMail/1.4.6-7.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 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:58453 Archived-At: Fread_buffer directly uses Vbuffer_alist in its call to Fcompleting_read. This breaks if, while the minibuffer is active, the user switches buffers around. The cons which was the head of the list when Fread_buffer was called will in general no longer be at the head, and so part of the list will vanish for completion purposes. (Of course, it's slightly worse when REQUIRE-MATCH is set.) Similar problems result from creating or killing buffers during the call. I also have a vague suspicion that this procedure exposes the alist to modification by user code, but I can't think of how at the moment. Copying the alist for the call to Fcompleting_read (which is trivial to implement) would solve the reordering problems but not the ones involving creation/destruction; the real solution is to write a `complete-buffer' completion function that would re-consult the buffer list each time completion was needed. WDOT? Is this worth fixing, and if so in which way? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.