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: Fri, 7 Mar 2014 22:34:45 +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 1394228126 723 80.91.229.3 (7 Mar 2014 21:35:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2014 21:35:26 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 07 22:35:36 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 1WM2QZ-0008Qn-JK for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2014 22:35:35 +0100 Original-Received: from localhost ([::1]:38327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WM2QZ-0004tQ-4U for ged-emacs-devel@m.gmane.org; Fri, 07 Mar 2014 16:35:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WM2QT-0004mY-Ft for emacs-devel@gnu.org; Fri, 07 Mar 2014 16:35:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WM2QQ-0000wu-Ol for emacs-devel@gnu.org; Fri, 07 Mar 2014 16:35:29 -0500 Original-Received: from mail-yh0-x229.google.com ([2607:f8b0:4002:c01::229]:32867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WM2QQ-0000wp-FE for emacs-devel@gnu.org; Fri, 07 Mar 2014 16:35:26 -0500 Original-Received: by mail-yh0-f41.google.com with SMTP id v1so280695yhn.14 for ; Fri, 07 Mar 2014 13:35:26 -0800 (PST) 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=t98Z94fwihfAAXMZrpdsgKRZbbOtZwya5gIr1hJcVZc=; b=TQ1vzSRcUTwvXmAlwj0ZB0+QhHgaVprBhAAuVRb7OjPJWm2T6VBhErdHAd/Z8PCArh om7/o5AGCXnG/nCbmXQbMr54CPhe/MIWJQx26S0dRsoKeLhydVYBnxG3GRiOWjVtAESD z7v/UXuCMsjg5c0W0KlywvXcfOc3yIBx/bHB7u87MJ4VuMQXY5V7Le7YLVEKbFXK2ixG nQOwhbD+A6RLZSYsDDgqFgIVyyb1N+/zWG62gIHfU78ku5UoJl+IL1TG/CDOtDseLJY4 xcUgmXO74rj/NurcWGJJnyymobxIdGTJKqLELD8mdJGmYiOw8KzIvRDZT2HTdGAdZrQ4 MptQ== X-Received: by 10.236.134.48 with SMTP id r36mr3747731yhi.133.1394228125868; Fri, 07 Mar 2014 13:35:25 -0800 (PST) Original-Received: by 10.170.163.3 with HTTP; Fri, 7 Mar 2014 13:34:45 -0800 (PST) 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:170212 Archived-At: On Fri, Mar 7, 2014 at 9:32 PM, Stefan Monnier wrote: > Could we instead make frameset-restore return a list of (FRAME > . ACTION), so we can then use a plain dolist if we want to do some > extra cleanup. We could do that, but a priori I think the most common use case for frameset-restore is to substitute the current frame(s) for the ones restored from the frameset, so with your proposal the default call for frameset restore would go from (frameset-restore fs) ; all the current defaults make sense in this case to (dolist (frame-action (frameset-restore fs)) (with-demoted-errors "Error deleting frame: %s" (when (memq (cdr frame-action) '(:ignored :rejected)) (delete-frame (car frame-action))))) i.e., we're offloading complexity from the occasional use of CLEANUP's FUNC variant to the common case. To avoid that we would still need a way to tell frameset-restore to default to :delete, and then we're back to CLEANUP. J