From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christoph Scholtes Newsgroups: gmane.emacs.devel Subject: quit-window Date: Sat, 22 Oct 2011 14:43:55 -0600 Message-ID: <86mxcsvjsk.fsf@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319316253 16478 80.91.229.12 (22 Oct 2011 20:44:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2011 20:44:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 22 22:44:09 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 1RHiQK-0006Zw-G1 for ged-emacs-devel@m.gmane.org; Sat, 22 Oct 2011 22:44:08 +0200 Original-Received: from localhost ([::1]:43667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHiQJ-0006ZY-Fk for ged-emacs-devel@m.gmane.org; Sat, 22 Oct 2011 16:44:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHiQG-0006Z6-1I for emacs-devel@gnu.org; Sat, 22 Oct 2011 16:44:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHiQC-0002W8-FU for emacs-devel@gnu.org; Sat, 22 Oct 2011 16:44:03 -0400 Original-Received: from mail-gy0-f169.google.com ([209.85.160.169]:44316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHiQC-0002Vx-9W for emacs-devel@gnu.org; Sat, 22 Oct 2011 16:44:00 -0400 Original-Received: by gyf3 with SMTP id 3so5703118gyf.0 for ; Sat, 22 Oct 2011 13:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:subject:user-agent:date:message-id:mime-version :content-type; bh=oMtPZNNMc0AElHSSF/YPMJJTyUmLlUvNZf2f7ztkJ7o=; b=Xk2zWFtnjZK6J6567wtcL/WgwBip/mNGZOcT6OkkgseEJbwYL6ZWrHX7bQBMvimsOu +/qX9nz93M3H21XPU/OQFUwY6TcLX86QXlKbsqH7pHUiTFzXaPjOUETVKWN9rJ7tWxOV j3MUb9EEO15Hjo/fIoH3D5u8dSyLr/AyFjBoE= Original-Received: by 10.236.174.105 with SMTP id w69mr28075010yhl.32.1319316239448; Sat, 22 Oct 2011 13:43:59 -0700 (PDT) Original-Received: from MARVIN (71-212-159-198.hlrn.qwest.net. [71.212.159.198]) by mx.google.com with ESMTPS id w69sm25238103yhl.15.2011.10.22.13.43.58 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 22 Oct 2011 13:43:59 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (windows-nt) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.160.169 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:145424 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. However, some modes are inhibiting consistency by wrapping quit-window in a function, which in most cases performs some kind of cleanup. This creates inconsistency in the interface since, for example, `C-u q' to kill the buffer is not available anymore unless the wrapper passes on the argument to quit-window. Take for example `info-emacs-manual', which provides `Info-exit' bound to `q' in its map. `q' will quit the window and bury the buffer, but `C-u q' will *not* kill the buffer. I have identified at least 18 modes that do something similar. Maybe some special case even needs to, but most of the time it could be cleaned up, IMO. Also, some of these exit wrappers explicitely restore a previous window configuration. Doesn't quit-window handle that already? Finally, if there is mode-specific cleanup to be done, could we provide a quit-window-hook to connect to so we can eliminate the need for wrappers? This would allow a more consistent behavior between the modes. Maybe it's just me, but often I am surprised as a user by the difference in behavior of certain commands, especially when it comes to window manipulation (quit, kill, bury etc.). Christoph