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: undo-kill-buffer Date: Tue, 24 Oct 2006 09:11:14 -0700 (PDT) Message-ID: <58920.128.165.123.18.1161706274.squirrel@webmail.lanl.gov> References: <200610240856.57965.amax@redsymbol.net> 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 1161706626 11604 80.91.229.2 (24 Oct 2006 16:17:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Oct 2006 16:17:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 24 18:16:54 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 1GcOwW-0007g4-K1 for ged-emacs-devel@m.gmane.org; Tue, 24 Oct 2006 18:15:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GcOwV-0008KU-TV for ged-emacs-devel@m.gmane.org; Tue, 24 Oct 2006 12:15:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GcOsB-0005Vl-Fk for emacs-devel@gnu.org; Tue, 24 Oct 2006 12:11:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GcOs8-0005Rp-7w for emacs-devel@gnu.org; Tue, 24 Oct 2006 12:11:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GcOs7-0005Rd-QU for emacs-devel@gnu.org; Tue, 24 Oct 2006 12:11:23 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GcOs6-0000Yy-VE for emacs-devel@gnu.org; Tue, 24 Oct 2006 12:11:23 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by mx20.gnu.org with esmtp (Exim 4.52) id 1GcOs4-0006ha-6d for emacs-devel@gnu.org; Tue, 24 Oct 2006 12:11:20 -0400 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id k9OGBFAr004682 for ; Tue, 24 Oct 2006 10:11:15 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id k9OGBEgX006545; Tue, 24 Oct 2006 10:11:14 -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 k9OGBE4O015267; Tue, 24 Oct 2006 10:11:14 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k9OGBEtf015265; Tue, 24 Oct 2006 09:11:14 -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; Tue, 24 Oct 2006 09:11:14 -0700 (PDT) In-Reply-To: <200610240856.57965.amax@redsymbol.net> Original-To: "Aaron Maxwell" 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:61105 Archived-At: > Hi, Does anyone know of an existing emacs function that will undo a > kill-buffer command? So like, if the user issues C-x k and then suddenly > decides it was a mistake, they could just M-x undo-kill-buffer to get it > back. > > I have started coding this for myself. If it's genuinely new and I'm not > duplicating effort, then I will polish it and contribute to the main > codebase. > > Thanks, > Aaron The only case where killing a buffer cannot be undone with such commands as `find-file' or `dired' is when the buffer contained unsaved changes or was not associated with an external repository (file, directory, IRC channel, etc.), like `*scratch*'. How do you propose to bring such buffers (and their changes, if any) back without causing `kill-buffer' to not, in fact, kill buffers? If you are doing that (interfering with `kill-buffer'), what you really want is probably a "Trash Can" for buffers. Then you want to have a "mark-buffer-for-kill" command (which toggles the buffer's state, and buries it if it's being marked), and then a "kill-marked-buffers" command to actually destroy them. Of course, this is already available via the buffer list (`list-buffers')... 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.