[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

customize doesn't play well with non-nil pop-up-frames

From: Drew Adams
Subject: customize doesn't play well with non-nil pop-up-frames
Date: Wed, 27 Oct 2004 15:06:39 -0700

I sent this to emacs-devel a few weeks ago, but I should have sent it here.
This is either a bug or an enhancement request, depending on how you look at
it. Essentially, the custom*-other-window commands don't play well with
(pop-up-frames t).


Commands like `customize-group-other-window', and function
`custom-buffer-create-other-window' were apparently designed _not_ to select
the custom buffer after displaying it.

This can be inconvenient if you use separate frames, instead of windows
(pop-up-frames t).

For example, suppose I want to do something to or in the custom buffer after
it is displayed. To be more specific, suppose I want to resize (fit) the
frame to the buffer if the custom buffer is alone in its frame (which it
will be, because of pop-up-frames).

What are my options?

 1. Is there a hook that's run after display of the custom buffer? I don't
think so; I find only custom-mode-hook, which is run before the buffer is
displayed. Doing the frame fitting at that time is no good.

 2. How about using a defadvice-after? Well, that would be logical, except
that the custom buffer is not selected. I could select it in the defadvice,
but then I would need to copy & use the code that creates the buffer name.
Which more or less amounts to option #3.

 3. _Redefine_ the functions.

So, in order to avoid having people redefine such functions just to do
something simple after the buffer is displayed, how about making one of
these changes?

 - Select the custom buffer in the other window/frame. OK by me -- I don't
understand why this isn't done now; after all, the custom buffer is mainly
for editing. But, I can anticipate others groaning, and I'm sure there must
be good reasons (with pop-up-frames nil) for the current behavior. After
all, all of these functions go out of their way to unselect the custom

 - Select the custom buffer, but only if pop-up-frames is t. OK by me, but
it seems like kind of a hack.

 - Provide an after-display hook for the customize functions; it would be
run with the custom buffer selected (before unselecting it as is currently

Any reason we shouldn't implement one of these (or another)?

 - Drew

In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2004-07-26 on BERATUNG4
configured using `configure --with-gcc
(3.3) --cflags -I../../jpeg-6b-1/include -I../../libpng-1.2.4-1/include -I..
/../tiff-3.5.7/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.1.4-1/in

reply via email to

[Prev in Thread] Current Thread [Next in Thread]