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: Restore window configuration after Ediff Date: Fri, 15 Apr 2011 15:33:10 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1302906808 21980 80.91.229.12 (15 Apr 2011 22:33:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2011 22:33:28 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 16 00:33:24 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 1QArZr-0002zT-H1 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Apr 2011 00:33:23 +0200 Original-Received: from localhost ([::1]:33880 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QArZr-0001t4-2r for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Apr 2011 18:33:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QArZl-0001sn-Ai for Help-gnu-emacs@gnu.org; Fri, 15 Apr 2011 18:33:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QArZk-00025u-EE for Help-gnu-emacs@gnu.org; Fri, 15 Apr 2011 18:33:17 -0400 Original-Received: from smtpauth21.prod.mesa1.secureserver.net ([64.202.165.38]:58417) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QArZk-00025m-3z for Help-gnu-emacs@gnu.org; Fri, 15 Apr 2011 18:33:16 -0400 Original-Received: (qmail 2044 invoked from network); 15 Apr 2011 22:33:12 -0000 Original-Received: from unknown (209.85.161.41) by smtpauth21.prod.mesa1.secureserver.net (64.202.165.38) with ESMTP; 15 Apr 2011 22:33:12 -0000 Original-Received: by fxm18 with SMTP id 18so2702358fxm.0 for ; Fri, 15 Apr 2011 15:33:10 -0700 (PDT) Original-Received: by 10.223.73.133 with SMTP id q5mr2652535faj.127.1302906790208; Fri, 15 Apr 2011 15:33:10 -0700 (PDT) Original-Received: by 10.223.78.195 with HTTP; Fri, 15 Apr 2011 15:33:10 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 64.202.165.38 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:80812 Archived-At: I'm not 100% sure if this is a bug or if I'm trying to do something I should try to do. I'm trying to call ediff-buffers and then use a hook to restore the frame to its original state after Ediff is done. Here's some sample code: ====================================================================== (defvar saved-configuration nil) (defun do-ediff() (interactive) (add-hook 'ediff-quit-hook 'do-ediff-cleanup) (setq saved-configuration (current-window-configuration)) (ediff-buffers "*scratch*" "*scratch*")) (defun do-ediff-cleanup() (set-window-configuration saved-configuration) (remove-hook 'ediff-quit-hook 'do-ediff-cleanup)) ====================================================================== The problem is that after I quit ediff, the ediff control frame doesn't always disappear. I get the behavior I want if I use ediff-after-quit-hook-internal instead of ediff-quit-hook, but the "internal" part of that name tells me that's a bad idea. Is there a better way to accomplish what I'm trying to do? -PJ