From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: delete-other-frames Date: Tue, 23 Aug 2016 17:09:04 +0300 Message-ID: <83k2f7fugv.fsf@gnu.org> References: <57BC072F.9070704@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1471961379 27677 195.159.176.226 (23 Aug 2016 14:09:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Aug 2016 14:09:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 23 16:09:31 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcCOP-0006eF-Rx for ged-emacs-devel@m.gmane.org; Tue, 23 Aug 2016 16:09:29 +0200 Original-Received: from localhost ([::1]:46746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcCON-0003k2-5r for ged-emacs-devel@m.gmane.org; Tue, 23 Aug 2016 10:09:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcCOF-0003hG-JX for emacs-devel@gnu.org; Tue, 23 Aug 2016 10:09:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcCOD-0007XL-5d for emacs-devel@gnu.org; Tue, 23 Aug 2016 10:09:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcCOD-0007Wn-2A; Tue, 23 Aug 2016 10:09:17 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4216 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bcCO7-0008Fw-AA; Tue, 23 Aug 2016 10:09:15 -0400 In-reply-to: <57BC072F.9070704@gmx.at> (message from martin rudalics on Tue, 23 Aug 2016 10:19:59 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:206765 Archived-At: > Date: Tue, 23 Aug 2016 10:19:59 +0200 > From: martin rudalics > > The problematic code in ‘delete-other-frames’ is this: > > ;; Delete mon-minibuffer-only frames first, because `delete-frame' > ;; signals an error when trying to delete a mini-frame that's > ;; still in use by another frame. > (dolist (frame frames) > (unless (eq (frame-parameter frame 'minibuffer) 'only) > (delete-frame frame))) > > Here we try to delete all frames whose `minibuffer' parameter is not > `only'. However, the minibuffer window of a minibuffer-less frame might > be on a _normal_ frame as in our example: The minibuffer window of the > frame ‘less’ is owned by the initial frame and ‘delete-other-frames’ > tries to delete that frame before ‘less’, resulting in the error cited > above. > > Should we document the current behavior in the doc-string or should we > amend the code? IMO, amend the code. > (2) The doc-string says "Delete all frames on the current terminal, > except FRAME." IIUC this doesn't make much sense when FRAME is not on > the current terminal. In that case, ‘delete-other-frames’ will delete > all frames on the current terminal and leave the frames on FRAME's > terminal alone. In order to delete all other frames on FRAME's terminal > one has to make that terminal current first. If that is the desired > behavior, we should mention it in the doc-string. Otherwise, we should > delete all other frames on FRAME's terminal. The latter, I think.