From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: quit-window Date: Sun, 23 Oct 2011 16:27:31 +0300 Organization: JURTA Message-ID: <87obx77tms.fsf@mail.jurta.org> References: <86mxcsvjsk.fsf@googlemail.com> <4EA3DC67.8050607@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319376625 29709 80.91.229.12 (23 Oct 2011 13:30:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 Oct 2011 13:30:25 +0000 (UTC) Cc: Christoph Scholtes , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 23 15:30:21 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RHy84-0007Ky-Nh for ged-emacs-devel@m.gmane.org; Sun, 23 Oct 2011 15:30:20 +0200 Original-Received: from localhost ([::1]:43412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHy84-0006Yy-5J for ged-emacs-devel@m.gmane.org; Sun, 23 Oct 2011 09:30:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHy7w-0006Gk-2W for emacs-devel@gnu.org; Sun, 23 Oct 2011 09:30:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHy7u-0006OP-OK for emacs-devel@gnu.org; Sun, 23 Oct 2011 09:30:11 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:43947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHy7u-0006OH-FT for emacs-devel@gnu.org; Sun, 23 Oct 2011 09:30:10 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id B40B46E8097; Sun, 23 Oct 2011 06:30:09 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 9C3C4451C375; Sun, 23 Oct 2011 06:30:08 -0700 (PDT) In-Reply-To: <4EA3DC67.8050607@gmx.at> (martin rudalics's message of "Sun, 23 Oct 2011 11:20:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.113.175.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145434 Archived-At: >> quit-window bound to `q' in a keymap provides a nice, consistent UI for >> getting rid of the window and killing/burying its buffer. > > But only when you are viewing a buffer. BTW, what do you think about adding to window.el something like: (defun quit-window-kill-buffer () "Quit WINDOW and kill its buffer." (interactive) (quit-window t)) The problem is that for some modes it's desirable to kill buffers as well when quitting. Then it would be easier to put in .emacs: (define-key dired-mode-map "q" 'quit-window-kill-buffer) Or even better to add a new customizable variable with a list of modes where `q' kills the buffer, e.g. `quit-window-kill-buffer-modes' that could be customized to add modes like `dired-mode'.