From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: quit-window new behavior with frames Date: Thu, 22 Sep 2011 10:40:30 +0200 Message-ID: <87ipol2cn5.fsf@gmail.com> References: <87litzbkyx.fsf@gmail.com> <4E68E4AD.3060205@gmx.at> <874o053ybm.fsf@gmail.com> <4E7ADC88.60606@gmx.at> <87vcsl2fje.fsf@gmail.com> <4E7AEC5B.9020801@gmx.at> <87mxdx2cqd.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316680857 12273 80.91.229.12 (22 Sep 2011 08:40:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Sep 2011 08:40:57 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 22 10:40:54 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 1R6epx-0003cI-Qh for ged-emacs-devel@m.gmane.org; Thu, 22 Sep 2011 10:40:53 +0200 Original-Received: from localhost ([::1]:56463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6epx-0001yf-A6 for ged-emacs-devel@m.gmane.org; Thu, 22 Sep 2011 04:40:53 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6epv-0001yZ-3c for emacs-devel@gnu.org; Thu, 22 Sep 2011 04:40:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6ept-0005Y5-Tz for emacs-devel@gnu.org; Thu, 22 Sep 2011 04:40:51 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:58412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6ept-0005Xd-P0 for emacs-devel@gnu.org; Thu, 22 Sep 2011 04:40:49 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R6epn-0003X8-3r for emacs-devel@gnu.org; Thu, 22 Sep 2011 10:40:43 +0200 Original-Received: from 96.211.85.79.rev.sfr.net ([79.85.211.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Sep 2011 10:40:43 +0200 Original-Received: from thierry.volpiatto by 96.211.85.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Sep 2011 10:40:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 96.211.85.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:X70/uLR4cUTgI3rGoXW7KGKoN7A= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:144180 Archived-At: Sorry for the duplicate mail. Thierry Volpiatto writes: > martin rudalics writes: > >>> It now quit the help buffer, but don't delete the frame. >> >> Please debug `quit-window' and tell me why the conjunction below returns >> nil in your case. >> >> ((and (not prev-buffer) >> (eq (nth 1 quit-restore) 'frame) >> (eq (window-deletable-p window) 'frame) >> (eq (nth 3 quit-restore) buffer)) >> ;; WINDOW's frame can be deleted. >> (delete-frame (window-frame window)) >> >> Thanks, martin > > There is a previous buffer. ("*scratch*") > > #+BEGIN_SRC lisp > ((and (not prev-buffer) ; => Return nil here. > (eq (nth 1 quit-restore) 'frame) > (eq (window-deletable-p window) 'frame) > (eq (nth 3 quit-restore) buffer)) > ;; WINDOW's frame can be deleted. > (delete-frame (window-frame window)) > > #+END_SRC > > And this is working: > > #+BEGIN_SRC lisp > ((and (or (not prev-buffer) > (window-dedicated-p)) > (eq (nth 1 quit-restore) 'frame) > (eq (window-deletable-p window) 'frame) > (eq (nth 3 quit-restore) buffer)) > ;; WINDOW's frame can be deleted. > (delete-frame (window-frame window)) > > #+END_SRC -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997