emacs-devel
[Top][All Lists]
Advanced

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

(no subject)


From: Drew Adams
Subject: (no subject)
Date: Sat, 9 Oct 2004 17:10:25 -0700

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
buffer.

 - 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
done).

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

 - Drew





reply via email to

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