From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: Freezing frameset-restore Date: Mon, 10 Mar 2014 14:04:28 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1394456705 20379 80.91.229.3 (10 Mar 2014 13:05:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2014 13:05:05 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 14:05:14 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WMztK-0007a9-M3 for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2014 14:05:14 +0100 Original-Received: from localhost ([::1]:48688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMztK-0005sX-8U for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2014 09:05:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMztG-0005rx-HP for emacs-devel@gnu.org; Mon, 10 Mar 2014 09:05:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMztF-0005uW-8R for emacs-devel@gnu.org; Mon, 10 Mar 2014 09:05:10 -0400 Original-Received: from mail-yh0-x229.google.com ([2607:f8b0:4002:c01::229]:40747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMztF-0005uQ-4v for emacs-devel@gnu.org; Mon, 10 Mar 2014 09:05:09 -0400 Original-Received: by mail-yh0-f41.google.com with SMTP id v1so2312718yhn.14 for ; Mon, 10 Mar 2014 06:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+NjGXJCgw4DrsKOTFh3cd4yFwcZUijMqIQ6HP2RUZwU=; b=R+DhYJo33claqwwJnVkQvFgEO7+NcUhaDlIgc4YhHy3aYHotJ0TMLfhKnR0p8NA24V jN2q99PdiGCxIYTRqdk5rHVih3Z0Pj8EGRyl/P1tDI22dXm270/X4wUUmHpKCwsewLdB CxzdVObcjkuWdmycIzNDJYqFDXFgs03yfN4yTJvBl1vKq2mqBbmWMnF1Xhkr2lBzbFZS FlWhtbE5rsbd4UrWgwiWLq1NnhtyAVOGO4q7Swl6Tu1ABNYjox5IUvjBm1F7aMkSz775 ZhGDuizBJoZRlLLlH5UyIYo0CjDkuChcsJrItwvPCxpKLEtjK9CJux7cBxq59K0v+Pxn s/9w== X-Received: by 10.236.101.18 with SMTP id a18mr44553708yhg.65.1394456708775; Mon, 10 Mar 2014 06:05:08 -0700 (PDT) Original-Received: by 10.170.163.3 with HTTP; Mon, 10 Mar 2014 06:04:28 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::229 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:170249 Archived-At: On Mon, Mar 10, 2014 at 6:26 AM, Juanma Barranquero wrote: > That's why I'm strongly > convinced that having > > (frameset-restore fs :cleanup 'keep) > (frameset-restore fs :cleanup 'delete) > (frameset-restore fs :cleanup #'my-custom-function) > > and let frameset-restore worry about looping, error protection and > default cases is much, much cleaner that the alternatives we've been > hashing for the past couple days The more I think about it, the more I believe it makes no sense to separate cleanup from frameset-restore. It is not an additional, optional part of frameset restoration, it is an integral part of it, even in these cases where the cleanup consists in doing nothing. If frameset-restore just created new frames, separating both operations would be reasonable. But frameset restoration isn't like that, it already can reuse exiting frames; it moves them, changes their visibility, resizes them. The whole experience of restoring a frameset includes deciding what to do with the remaining frames.