From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: Restore window configuration after Ediff Date: Sat, 16 Apr 2011 01:33:01 -0700 Message-ID: References: <4DA946F1.9030301@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1302942801 605 80.91.229.12 (16 Apr 2011 08:33:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2011 08:33:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: martin rudalics Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 16 10:33:16 2011 Return-path: Envelope-to: geh-help-gnu-emacs@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 1QB0wN-0006Dj-CJ for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Apr 2011 10:33:15 +0200 Original-Received: from localhost ([::1]:38580 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB0wM-0000tj-UK for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Apr 2011 04:33:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB0wG-0000tb-5g for help-gnu-emacs@gnu.org; Sat, 16 Apr 2011 04:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QB0wF-0003iu-1L for help-gnu-emacs@gnu.org; Sat, 16 Apr 2011 04:33:08 -0400 Original-Received: from p3plsmtpa07-01.prod.phx3.secureserver.net ([173.201.192.230]:59072) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QB0wE-0003iq-RO for help-gnu-emacs@gnu.org; Sat, 16 Apr 2011 04:33:07 -0400 Original-Received: (qmail 7709 invoked from network); 16 Apr 2011 08:33:04 -0000 Original-Received: from unknown (209.85.161.41) by p3plsmtpa07-01.prod.phx3.secureserver.net (173.201.192.230) with ESMTP; 16 Apr 2011 08:33:03 -0000 Original-Received: by fxm18 with SMTP id 18so2862630fxm.0 for ; Sat, 16 Apr 2011 01:33:01 -0700 (PDT) Original-Received: by 10.223.35.147 with SMTP id p19mr786050fad.13.1302942781818; Sat, 16 Apr 2011 01:33:01 -0700 (PDT) Original-Received: by 10.223.78.195 with HTTP; Sat, 16 Apr 2011 01:33:01 -0700 (PDT) In-Reply-To: <4DA946F1.9030301@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 173.201.192.230 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80814 Archived-At: On Sat, Apr 16, 2011 at 12:36 AM, martin rudalics wrote: >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> (defvar saved-configuration nil) >> >> (defun do-ediff() >> =A0 (interactive) >> =A0 (add-hook 'ediff-quit-hook 'do-ediff-cleanup) >> =A0 (setq saved-configuration (current-window-configuration)) >> =A0 (ediff-buffers "*scratch*" "*scratch*")) >> >> (defun do-ediff-cleanup() >> =A0 (set-window-configuration saved-configuration) >> =A0 (remove-hook 'ediff-quit-hook 'do-ediff-cleanup)) >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> The problem is that after I quit ediff, the ediff control frame >> doesn't always disappear. > > Replace `current-window-configuration' by `current-frame-configuration' > and `set-window-configuration' by `set-frame-configuration'. > > martin > It looks like current-frame-configuration returns a list of all frames with parameters and window configurations for each of them. I'd prefer to just save and restore state of the one frame that was selected when I started Ediff. Is there a reason that the code I have *shouldn't* work (besides the fact that it doesn't)? I.e., is there a gap in my understanding? -PJ