From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Edward Wijaya Newsgroups: gmane.emacs.help Subject: Re: Killing Buffers Date: Fri, 02 Jan 2004 22:28:39 -0000 Organization: Singapore Telecommunications Ltd Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1073054068 8749 80.91.224.253 (2 Jan 2004 14:34:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2004 14:34:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 02 15:34:26 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AcQNe-0001ky-00 for ; Fri, 02 Jan 2004 15:34:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AcRGQ-0004lQ-L7 for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Jan 2004 10:31:02 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!news.loxinfo.co.th!peony.singnet.com.sg!columbine.singnet.com.sg!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 220.255.17.214 User-Agent: Opera7.23/Linux M2 build 518 Original-Xref: shelby.stanford.edu gnu.emacs.help:119716 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15658 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15658 Courtesy of Jose Ruiz. ------- Forwarded message ------- From: "Jose A. Ortega Ruiz" To: Edward Wijaya Subject: Re: Killing Buffers Date: Fri, 02 Jan 2004 14:04:55 +0100 > Edward Wijaya writes: > >> Hi, >> >> I am looking for a key that: >> 1. Kill all the existing buffer without having have to close Emacs > > hi, i've got this code in my .emacs: > > ;;; kill all buffers > (defun my-blank-slate-emacs () > "kill all buffers, leaving *scratch* only" > (interactive) > ;;close all frames but one, first > (mapcar (lambda (x) (delete-frame x)) > (cdr (visible-frame-list))) > ;;then, kill all buffers > (mapcar (lambda (x) (kill-buffer x)) > (buffer-list)) > ;;make there be only one window holding buffer *scratch* > (delete-other-windows)) > (global-set-key "\C-x!" 'my-blank-slate-emacs) > > hth, > jao