From: PJ Weisberg <pj@irregularexpressions.net>
To: help-gnu-emacs <Help-gnu-emacs@gnu.org>
Subject: Restore window configuration after Ediff
Date: Fri, 15 Apr 2011 15:33:10 -0700 [thread overview]
Message-ID: <BANLkTinX3zJuaw+EUKtQ3jE-CPtsRj4Jiw@mail.gmail.com> (raw)
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
next reply other threads:[~2011-04-15 22:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 22:33 PJ Weisberg [this message]
[not found] ` <yu9y639d2yl.fsf@nyu.edu>
2011-04-17 18:09 ` Restore window configuration after Ediff PJ Weisberg
2011-04-18 17:31 ` Guilherme Gondim
-- strict thread matches above, loose matches on Subject: below --
2011-04-16 7:36 martin rudalics
2011-04-16 8:33 ` PJ Weisberg
2011-04-16 10:08 ` martin rudalics
2011-04-16 18:26 ` PJ Weisberg
2011-04-17 10:24 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTinX3zJuaw+EUKtQ3jE-CPtsRj4Jiw@mail.gmail.com \
--to=pj@irregularexpressions.net \
--cc=Help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.