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: Re: Out-of-date completions for `read-buffer' Date: Thu, 17 Aug 2006 12:51:04 -0700 (PDT) Message-ID: <35245.128.165.123.18.1155844264.squirrel@webmail.lanl.gov> References: <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: multipart/mixed;boundary="----=_20060817125104_62582" X-Trace: sea.gmane.org 1155844292 9397 80.91.229.2 (17 Aug 2006 19:51:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2006 19:51:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 17 21:51:30 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 1GDntl-0006HZ-BI for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2006 21:51:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDntk-0002Ls-Nr for ged-emacs-devel@m.gmane.org; Thu, 17 Aug 2006 15:51:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GDntZ-0002KD-G0 for emacs-devel@gnu.org; Thu, 17 Aug 2006 15:51:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GDntW-0002Iq-K2 for emacs-devel@gnu.org; Thu, 17 Aug 2006 15:51:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDntW-0002In-DU for emacs-devel@gnu.org; Thu, 17 Aug 2006 15:51:10 -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 1GDo02-0005wo-Vy; Thu, 17 Aug 2006 15:57:55 -0400 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k7HJp5ui021616; Thu, 17 Aug 2006 13:51:05 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k7HJp4Pn019284; Thu, 17 Aug 2006 13:51:05 -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 k7HJp43R004711; Thu, 17 Aug 2006 13:51:04 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k7HJp4kv004709; Thu, 17 Aug 2006 12:51:04 -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; Thu, 17 Aug 2006 12:51:04 -0700 (PDT) In-Reply-To: Original-To: "Richard M. Stallman" 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:58479 Archived-At: ------=_20060817125104_62582 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit > I think it is worth fixing. Copying the alist pairs as well as the > alist itself would be simple and avoid any danger of crashing. It > would still "complete wrong" in the case of creating or killing > buffers, but that seems like a minor issue. So I think that solution > would be fine. However, the `complete-buffer' solution you proposed > would be fine too. > > Would you like to fix it one way or the other? It turned out that the `complete-buffer' method was easy, since Vbuffer_alist is of course still around: see the attached (hopefully trivial) patch. The name of the new function and its doc string might both need improvement. 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. ------=_20060817125104_62582 Content-Type: application/octet-stream; name="read-buffer.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="read-buffer.patch" KioqIG1pbmlidWYuYy5+MS4zMDcufgkyMDA2LTA3LTE3IDExOjQ1OjI3LjAwMDAwMDAwMCAtMDYw MAotLS0gbWluaWJ1Zi5jCTIwMDYtMDgtMTcgMTM6NDE6NDcuMDAwMDAwMDAwIC0wNjAwCioqKioq KioqKioqKioqKgoqKiogMTE0OSwxMTU0ICoqKioKLS0tIDExNDksMTE2OCAtLS0tCiAgICByZXR1 cm4gRmludGVybiAobmFtZSwgUW5pbCk7CiAgfQogIAorIERFRlVOICgiY29tcGxldGUtYnVmZmVy IiwgRmNvbXBsZXRlX2J1ZmZlciwgU2NvbXBsZXRlX2J1ZmZlciwgMywgMywgMCwKKyAgICAgICAg ZG9jOiAvKiBQZXJmb3JtIGNvbXBsZXRpb24gb24gYnVmZmVyIG5hbWVzLgorIFNlZSBgdHJ5LWNv bXBsZXRpb24nLCBgYWxsLWNvbXBsZXRpb25zJywgYW5kIGB0ZXN0LWNvbXBsZXRpb24nLiAgKi8p CisgICAgICAoc3RyaW5nLCBwcmVkaWNhdGUsIGZsYWcpCisgICAgICBMaXNwX09iamVjdCBzdHJp bmcsIHByZWRpY2F0ZSwgZmxhZzsKKyB7CisgICBpZiAoTklMUCAoZmxhZykpCisgICAgIHJldHVy biBGdHJ5X2NvbXBsZXRpb24gKHN0cmluZywgVmJ1ZmZlcl9hbGlzdCwgcHJlZGlj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ioqKiAyOTE1LDI5MjAgKioqKgotLS0gMjkyOSwyOTM1IC0tLS0KICAgIGRlZnN1YnIg KCZTcmVhZF9zdHJpbmcpOwogICAgZGVmc3ViciAoJlNyZWFkX2NvbW1hbmQpOwogICAgZGVmc3Vi ciAoJlNyZWFkX3ZhcmlhYmxlKTsKKyAgIGRlZnN1YnIgKCZTY29tcGxldGVfYnVmZmVyKTsKICAg IGRlZnN1YnIgKCZTcmVhZF9idWZmZXIpOwogICAgZGVmc3ViciAoJlNyZWFkX25vX2JsYW5rc19p bnB1dCk7CiAgICBkZWZzdWJyICgmU21pbmlidWZmZXJfZGVwdGgpOwo= ------=_20060817125104_62582 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------=_20060817125104_62582--