[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: describe-{function,variable} shrinks frame (GTK+/KDE)
From: |
Stephen Berman |
Subject: |
Re: describe-{function,variable} shrinks frame (GTK+/KDE) |
Date: |
Sun, 18 Nov 2007 00:42:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
On Sat, 17 Nov 2007 10:16:17 +0100 martin rudalics <address@hidden> wrote:
>> This recipe isn't completely reliable: what seems to be constant are the
>> prior invocation of Info and unsplitting the windows between the
>> describe-* calls; otherwise, sometimes the shrinkage happens after the
>> first call to describe-{function,variable}, sometimes it takes several
>> iterations of steps 2.-5. The function/variable names are examples,
>> probably any will do. Once the shrinkage begins, it progresses with
>> subsequent describe-* calls.
>
> Leaving an Emacs frame for some time unattended with
>
> (defun foo ()
> (interactive)
> (while t
> (split-window)
> (when (zerop (logand (random) 1))
> (other-window 1))
> (sit-for 0.5)
> (if (zerop (logand (random) 1))
> (delete-window)
> (delete-other-windows))
> (sit-for 0.5)))
>
> doesn't show the behavior (just to rule out more trivial causes like
> window splitting / deleting)?
No, this does not change frame-height. In fact, I had already manually
tried repeatedly splitting and unspitting and did not see any problem.
But your test gave me an idea to try and reproduce the behavior I
observed programmatically. I started Emacs with -Q and evalled the
following functions:
(defun srb-randsym ()
"Return a random Emacs lisp symbol."
(random t)
(let* ((rnum (random (length obarray)))
(elt (aref obarray rnum)))
elt))
(defun srb-shrink-test-0 ()
"Call Info, then repeatedly call describe-function or
describe-variable on a random elisp function or variable, deleting
the Help buffer in between. If the frame height changes, stop."
(interactive)
(info)
(let ((ht (frame-height))
elt)
(message "frame height: %d" ht)
(sit-for 0.5)
(setq elt (srb-randsym))
(while (not (or (functionp elt) (boundp elt)))
(setq elt (srb-randsym)))
(cond ((functionp elt)
(describe-function elt))
((boundp elt)
(describe-variable elt))
(t 'ignore))
(sit-for 0.5)
(delete-other-windows)
(sit-for 0.5)
(if (= ht (frame-height))
(srb-shrink-test-0)
(message "frame height: %d" (frame-height)))))
I invoked srb-shrink-test-0 and let it run though many iterations, but
frame-height remained unchanged. Then I evalled the following function,
which differs from the above only in calling
describe-{function,variable} interactively:
(defun srb-shrink-test-1 ()
"Call Info, then repeatedly call describe-function or
describe-variable interactively, deleting the Help buffer in
between. If the frame height changes, stop."
(interactive)
(info)
(let ((ht (frame-height))
elt)
(message "frame height: %d" ht)
(sit-for 0.5)
(setq elt (srb-randsym))
(while (not (or (functionp elt) (boundp elt)))
(setq elt (srb-randsym)))
(cond ((functionp elt)
(call-interactively 'describe-function))
((boundp elt)
(call-interactively 'describe-variable))
(t 'ignore))
(sit-for 0.5)
(delete-other-windows)
(sit-for 0.5)
(if (= ht (frame-height))
(srb-shrink-test-1)
(message "frame height: %d" (frame-height)))))
I invoked this and frame-height diminished by one line after the first
interactive call. I have repeated this many times and every time
frame-height has shrunk, whereas with srb-shrink-test-0 it has never
shrunk. It seems that call-interactively is somehow involved in
shrinking frame-height. I looked at the source code but found nothing
suggestive; but it is a very long and complex function, and I don't know
what to look for. It doesn't help that this problem seems to be
restricted to GTK+ builds running under gtk-qt.
Steve Berman
- describe-{function,variable} shrinks frame (GTK+/KDE), Stephen Berman, 2007/11/16
- Re: describe-{function,variable} shrinks frame (GTK+/KDE), martin rudalics, 2007/11/17
- Re: describe-{function,variable} shrinks frame (GTK+/KDE),
Stephen Berman <=
- Re: describe-{function,variable} shrinks frame (GTK+/KDE), martin rudalics, 2007/11/18
- Re: describe-{function,variable} shrinks frame (GTK+/KDE), Stephen Berman, 2007/11/18
- Re: describe-{function,variable} shrinks frame (GTK+/KDE), martin rudalics, 2007/11/18
- Re: describe-{function,variable} shrinks frame (GTK+/KDE), Stephen Berman, 2007/11/19
- GTK+/KDE frame shrinking has to do with tool bar (was Re: describe-{function, variable} shrinks frame (GTK+/KDE)), Stephen Berman, 2007/11/19
- Re: GTK+/KDE frame shrinking has to do with tool bar (was Re: describe-{function, variable} shrinks frame (GTK+/KDE)), Jan Djärv, 2007/11/20
- Re: GTK+/KDE frame shrinking has to do with tool bar, Stephen Berman, 2007/11/20
- Re: GTK+/KDE frame shrinking has to do with tool bar (was Re: describe-{function, variable} shrinks frame (GTK+/KDE)), martin rudalics, 2007/11/20
Re: describe-{function,variable} shrinks frame (GTK+/KDE), Richard Stallman, 2007/11/17