all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: PJ Weisberg <pj@irregularexpressions.net>
To: martin rudalics <rudalics@gmx.at>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Restore window configuration after Ediff
Date: Sat, 16 Apr 2011 01:33:01 -0700	[thread overview]
Message-ID: <BANLkTi=Cv1HfEbHvvGrKqdqOs3TuriAHbA@mail.gmail.com> (raw)
In-Reply-To: <4DA946F1.9030301@gmx.at>

On Sat, Apr 16, 2011 at 12:36 AM, martin rudalics <rudalics@gmx.at> wrote:
>> ======================================================================
>> (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.
>
> 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



  reply	other threads:[~2011-04-16  8:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-16  7:36 Restore window configuration after Ediff martin rudalics
2011-04-16  8:33 ` PJ Weisberg [this message]
2011-04-16 10:08   ` martin rudalics
2011-04-16 18:26     ` PJ Weisberg
2011-04-17 10:24       ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2011-04-15 22:33 PJ Weisberg
     [not found] ` <yu9y639d2yl.fsf@nyu.edu>
2011-04-17 18:09   ` PJ Weisberg
2011-04-18 17:31 ` Guilherme Gondim

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='BANLkTi=Cv1HfEbHvvGrKqdqOs3TuriAHbA@mail.gmail.com' \
    --to=pj@irregularexpressions.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rudalics@gmx.at \
    /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.