GNU bug report logs - #21413
Top of buffer hidden when toolbar hidden and frame height is large

Previous Next

Package: emacs;

Reported by: Devon Buchanan <devon <at> divinenephron.co.uk>

Date: Fri, 4 Sep 2015 15:34:02 UTC

Severity: normal

Tags: fixed

Found in version 24.5.1

Fixed in version 25.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21413 in the body.
You can then email your comments to 21413 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Fri, 04 Sep 2015 15:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Buchanan <devon <at> divinenephron.co.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 04 Sep 2015 15:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Buchanan <devon <at> divinenephron.co.uk>
To: submit <at> debbugs.gnu.org
Subject: Top of buffer hidden when toolbar hidden and frame height is large
Date: Fri, 04 Sep 2015 16:20:16 +0100
Package: emacs
Version: 24.5.1

* Brief summary

When I turn tool-bar-mode off and make a frame taller than the 
height available on my screen the top of the buffer is hidden 
until I re-size the window.

* Steps to reproduce

Here are the steps to reproduce the problem using the NS build of 
emacs on OS X 10.10.4.

cat >> test-init.el <<EOF
(tool-bar-mode -1)
(setq default-frame-alist '((height . 100)))
EOF
open -a Emacs.app --args -Q -l ~/test-init.el

This opens a graphical emacs frame showing the *scratch* buffer. 
Neither the cursor is visible, nor is the text normally shown in 
the *scratch* buffer. Scrolling up will not make either of these 
visible. C-x C-f <some file name> RET will display the contents of 
that buffer with some or all of the lines at the start hidden.

The hidden sections of the buffer can be made visible by clicking 
and dragging on any edge of the window and resizing it.

* Expected behaviour

When I set the frame size to be taller than the screen will allow, I
expect the frame to occupy as much vertical space as possible without
the top of the buffer being hidden. This is the behaviour seen when
tool-bar-mode is on.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Fri, 04 Sep 2015 19:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Devon Buchanan <devon <at> divinenephron.co.uk>, 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Fri, 04 Sep 2015 21:17:45 +0200
> Here are the steps to reproduce the problem using the NS build of emacs on OS X 10.10.4.
>
> cat >> test-init.el <<EOF
> (tool-bar-mode -1)
> (setq default-frame-alist '((height . 100)))
> EOF
> open -a Emacs.app --args -Q -l ~/test-init.el
>
> This opens a graphical emacs frame showing the *scratch*
> buffer. Neither the cursor is visible, nor is the text normally shown
> in the *scratch* buffer. Scrolling up will not make either of these
> visible. C-x C-f <some file name> RET will display the contents of
> that buffer with some or all of the lines at the start hidden.
>
> The hidden sections of the buffer can be made visible by clicking and
> dragging on any edge of the window and resizing it.

> * Expected behaviour
>
> When I set the frame size to be taller than the screen will allow, I
> expect the frame to occupy as much vertical space as possible without
> the top of the buffer being hidden. This is the behaviour seen when
> tool-bar-mode is on.

This is probably beyond Emacs' control.  I suppose that your window
manager normally tries to assure that the tool bar is visible.  When
there's no tool bar it simply puts the frame somwhere if it's taller
than your screen.

What happpens when you also explicitly put the top left edge at some
visible position like with

(setq default-frame-alist '((top . 5) (left . 5) (height . 100)))

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Sat, 05 Sep 2015 10:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: Devon Buchanan <devon <at> divinenephron.co.uk>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Sat, 05 Sep 2015 11:10:30 +0100
On Fri, Sep 04 2015, martin rudalics wrote:
>  > Here are the steps to reproduce the problem using the NS 
>  > build of emacs on OS X 10.10.4.
>  >
>  > cat >> test-init.el <<EOF (tool-bar-mode -1) (setq 
>  > default-frame-alist '((height . 100))) EOF open -a Emacs.app 
>  > --args -Q -l ~/test-init.el
>  >
>  > This opens a graphical emacs frame showing the *scratch* 
>  > buffer. Neither the cursor is visible, nor is the text 
>  > normally shown in the *scratch* buffer. Scrolling up will not 
>  > make either of these visible. C-x C-f <some file name> RET 
>  > will display the contents of that buffer with some or all of 
>  > the lines at the start hidden.
>  >
>  > The hidden sections of the buffer can be made visible by 
>  > clicking and dragging on any edge of the window and resizing 
>  > it.
>
>  > * Expected behaviour
>  >
>  > When I set the frame size to be taller than the screen will 
>  > allow, I expect the frame to occupy as much vertical space as 
>  > possible without the top of the buffer being hidden. This is 
>  > the behaviour seen when tool-bar-mode is on.
>
> This is probably beyond Emacs' control.  I suppose that your 
> window manager normally tries to assure that the tool bar is 
> visible.  When there's no tool bar it simply puts the frame 
> somwhere if it's taller than your screen.
>
> What happpens when you also explicitly put the top left edge at 
> some visible position like with
>
> (setq default-frame-alist '((top . 5) (left . 5) (height . 
> 100)))
>
> martin

The below produces the same behaviour described previously.

cat >> test-init.el <<EOF (tool-bar-mode -1) (setq 
default-frame-alist '((top .5) (left .5) (height . 100))) EOF open 
-a Emacs.app --args -Q -l ~/test-init.el

In both the first example I gave, and this latest one the title bar and
all other edges of the frame are is visible on the screen. It does not
appear like my window manager has drawn a large window and put part of
it off the screen. The frame appears as if the top part of it was drawn
in the invisible area above the title bar.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Sat, 05 Sep 2015 10:44:01 GMT) Full text and rfc822 format available.

Message #14 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Devon Buchanan <devon <at> divinenephron.co.uk>
Cc: 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Sat, 05 Sep 2015 12:43:31 +0200
> In both the first example I gave, and this latest one the title bar and
> all other edges of the frame are is visible on the screen. It does not
> appear like my window manager has drawn a large window and put part of
> it off the screen. The frame appears as if the top part of it was drawn
> in the invisible area above the title bar.

Thanks for the clarification.  I doubt it will help much but in such a
mangled frame please put the following snippet in *scratch* with point
after it, type C-x C-e, and post whatever it inserts here.

(progn
  (insert (format "%s" (frame-geometry)))
  (insert (format "%s" (frame-edges nil 'outer)))
  (insert (format "%s" (frame-edges nil 'native)))
  (insert (format "%s" (frame-edges nil 'inner))))

Also: Can you reproduce the problem with an already existing or another,
newly created one or is only the initial frame affected?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Sat, 05 Sep 2015 12:03:02 GMT) Full text and rfc822 format available.

Message #17 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: Devon Buchanan <devon <at> divinenephron.co.uk>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Sat, 05 Sep 2015 13:02:02 +0100
On Sat, Sep 05 2015, martin rudalics wrote:
> I doubt it will help much but in such a mangled frame please put 
> the following snippet in *scratch* with point after it, type C-x 
> C-e, and post whatever it inserts here.
>
> (progn 
>    (insert (format "%s" (frame-geometry))) (insert (format "%s" 
>    (frame-edges nil 'outer))) (insert (format "%s" (frame-edges 
>    nil 'native))) (insert (format "%s" (frame-edges nil 
>    'inner))))

I was not able to find the functions frame-geometry and 
frame-edges in emacs 24.5.1. M-x appropos found some functions 
which appear similar however. Here is the results of evaluating 
them in a mangled frame.

cat >> test-init.el <<EOF (tool-bar-mode -1) (setq 
default-frame-alist '((height . 100))) EOF open -a Emacs.app 
--args -Q -l ~/test-init.el

(progn 
 (insert (format "%s" (current-frame-configuration))) (insert 
 (format "%s" (window-edges))) (insert (format "%s" 
 (window-pixel-edges))) (insert (format "%s" 
 (window-absolute-pixel-edges))) (insert (format "%s" 
 (window-inside-edges))) (insert (format "%s" 
 (window-inside-pixel-edges))) (insert (format "%s" 
 (window-inside-absolute-pixel-edges))))

(frame-configuration (#<frame *scratch* 0x104833a48> 
                    ((tool-bar-position . top) 
                     (parent-id) (explicit-name) (display . 
                     Hester.home) (visibility . t) (icon-name) 
                     (window-id . 1) (bottom-divider-width . 0) 
                     (right-divider-width . 0) (top . 23) (left . 
                     5) (buried-buffer-list) (buffer-list 
                     *scratch*) (unsplittable) (minibuffer . 
                     #<window 4 on  *Minibuf-0*>) (modeline . t) 
                     (width . 80) (height . 100) (name . 
                     *scratch*) (environment) (cursor-color . 
                     black) (background-mode . light) 
                     (display-type . color) 
                     (horizontal-scroll-bars . t) (window-system 
                     . ns) (fullscreen) (alpha) (scroll-bar-width 
                     . 15) (cursor-type . box) (auto-lower) 
                     (auto-raise) (icon-type) (title) 
                     (buffer-predicate) (tool-bar-lines . 0) 
                     (menu-bar-lines . 1) (right-fringe . 11) 
                     (left-fringe . 10) (line-spacing) 
                     (background-color . White) (foreground-color 
                     . Black) (vertical-scroll-bars . right) 
                     (internal-border-width . 2) (border-width . 
                     0) (font . 
                     -*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1) 
                    (fontsize . 0) (font-backend mac-ct ns)) 
                   #<window-configuration>)) 
(0 0 85 99)(2 2 598 1388)(7 47 603 1433)(2 0 80 98)(12 2 572 
1374)(17 47 577 1419)

After resizing the window by dragging on its right border with my 
mouse the frame became un-mangled. Here is the output for that 
frame.

(progn 
 (insert (format "%s" (current-frame-configuration))) (insert 
 (format "%s" (window-edges))) (insert (format "%s" 
 (window-pixel-edges))) (insert (format "%s" 
 (window-absolute-pixel-edges))) (insert (format "%s" 
 (window-inside-edges))) (insert (format "%s" 
 (window-inside-pixel-edges))) (insert (format "%s" 
 (window-inside-absolute-pixel-edges))))

(frame-configuration (#<frame *scratch* 0x104820448> 
                     ((tool-bar-position . top) 
                      (parent-id) (explicit-name) (display . 
                      Hester.home) (visibility . t) (icon-name) 
                      (window-id . 1) (bottom-divider-width . 0) 
                      (right-divider-width . 0) (top . 28) (left 
                      . 0) (buried-buffer-list) (buffer-list 
                      *scratch*) (unsplittable) (minibuffer . 
                      #<window 4 on  *Minibuf-0*>) (modeline . t) 
                      (width . 80) (height . 53) (name . 
                      *scratch*) (environment) (cursor-color . 
                      black) (background-mode . light) 
                      (display-type . color) 
                      (horizontal-scroll-bars . t) (window-system 
                      . ns) (fullscreen) (alpha) 
                      (scroll-bar-width . 15) (cursor-type . box) 
                      (auto-lower) (auto-raise) (icon-type) 
                      (title) (buffer-predicate) (tool-bar-lines 
                      . 0) (menu-bar-lines . 1) (right-fringe . 
                      11) (left-fringe . 10) (line-spacing) 
                      (background-color . White) 
                      (foreground-color . Black) 
                      (vertical-scroll-bars . right) 
                      (internal-border-width . 2) (border-width . 
                      0) (font . 
                      -*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1) 
                      (fontsize . 0) (font-backend mac-ct ns)) 
                     #<window-configuration>)) 
(0 0 85 52)(2 2 598 730)(2 52 598 780)(2 0 80 51)(12 2 572 716)(12 
52 572 766)

> Also: Can you reproduce the problem with an already existing or 
> another, newly created one or is only the initial frame 
> affected?

When I create new frames with command-n it is not affected. Only 
the initial frame is affected under the conditions I described. 
The result of running the above in a frame created with command-n 
is:

(progn 
 (insert (format "%s" (current-frame-configuration))) (insert 
 (format "%s" (window-edges))) (insert (format "%s" 
 (window-pixel-edges))) (insert (format "%s" 
 (window-absolute-pixel-edges))) (insert (format "%s" 
 (window-inside-edges))) (insert (format "%s" 
 (window-inside-pixel-edges))) (insert (format "%s" 
 (window-inside-absolute-pixel-edges))))
(frame-configuration (#<frame *scratch* 0x103255e50>
                     ((tool-bar-position . top)
                      (parent-id)
                      (explicit-name)
                      (display . Hester.home)
                      (visibility . t)
                      (icon-name)
                      (window-id . 2)
                      (bottom-divider-width . 0)
                      (right-divider-width . 0)
                      (top . 42)
                      (left . 0)
                      (buried-buffer-list)
                      (buffer-list *scratch*)
                      (unsplittable)
                      (minibuffer . #<window 6 on  *Minibuf-0*>)
                      (modeline . t)
                      (width . 80)
                      (height . 51)
                      (name . *scratch*)
                      (cursor-color . black)
                      (background-mode . light)
                      (display-type . color)
                      (fullscreen)
                      (alpha)
                      (scroll-bar-width . 15)
                      (cursor-type . box)
                      (auto-lower)
                      (auto-raise)
                      (icon-type)
                      (title)
                      (buffer-predicate)
                      (tool-bar-lines . 0)
                      (menu-bar-lines . 1)
                      (right-fringe . 11)
                      (left-fringe . 10)
                      (line-spacing)
                      (background-color . White)
                      (foreground-color . Black)
                      (vertical-scroll-bars . right)
                      (internal-border-width . 2)
                      (border-width . 0)
                      (font . 
                      -*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1)
                      (fontsize . 0)
                      (font-backend mac-ct ns))
                     #<window-configuration>)
                    (#<frame *scratch* 0x100815848>
                     ((tool-bar-position . top)
                      (parent-id)
                      (explicit-name)
                      (display . Hester.home)
                      (visibility . t)
                      (icon-name)
                      (window-id . 1)
                      (bottom-divider-width . 0)
                      (right-divider-width . 0)
                      (top . 28)
                      (left . 0)
                      (buried-buffer-list)
                      (buffer-list *scratch*)
                      (unsplittable)
                      (minibuffer . #<window 4 on  *Minibuf-0*>)
                      (modeline . t)
                      (width . 80)
                      (height . 100)
                      (name . *scratch*)
                      (environment)
                      (cursor-color . black)
                      (background-mode . light)
                      (display-type . color)
                      (horizontal-scroll-bars . t)
                      (window-system . ns)
                      (fullscreen)
                      (alpha)
                      (scroll-bar-width . 15)
                      (cursor-type . box)
                      (auto-lower)
                      (auto-raise)
                      (icon-type)
                      (title)
                      (buffer-predicate)
                      (tool-bar-lines . 0)
                      (menu-bar-lines . 1)
                      (right-fringe . 11)
                      (left-fringe . 10)
                      (line-spacing)
                      (background-color . White)
                      (foreground-color . Black)
                      (vertical-scroll-bars . right)
                      (internal-border-width . 2)
                      (border-width . 0)
                      (font . 
                      -*-Menlo-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1)
                      (fontsize . 0)
                      (font-backend mac-ct ns))
                     #<window-configuration>))
(0 0 85 50)(2 2 598 702)(2 66 598 766)(2 0 80 49)(12 2 572 688)(12 
66 572 752)

Devon




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Sat, 05 Sep 2015 13:30:06 GMT) Full text and rfc822 format available.

Message #20 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Devon Buchanan <devon <at> divinenephron.co.uk>
Cc: 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Sat, 05 Sep 2015 15:28:59 +0200
> I was not able to find the functions frame-geometry and frame-edges in
> emacs 24.5.1. M-x appropos found some functions which appear similar
> however. Here is the results of evaluating them in a mangled frame.

I see.  These are not very indicative though, they mostly tell what
Emacs thinks about itself.

The one thing that strikes me are the values for ‘window-pixel-edges’.
IIUC you get for a "mangled" frame (2 2 598 730) and for an "unmangled"
frame (2 2 598 702).  Correct?  If you put these frames side-by-side on
your screen, do they visibly have the same height and do they both have
no tool bar?

In any case 730 - 2 gives a presumed height of 728 pixels for the first
frame and 702 - 2 a height of 700 for the second frame.  Would you say
that a mangled frame's window is missing 28 pixels at the top?

Anyway, could you try downloading one of the latest nightly builds from
here and try with them?

http://emacsformacosx.com/builds

Maybe the bug has been even fixed there.

Thanks, martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Sat, 05 Sep 2015 13:54:02 GMT) Full text and rfc822 format available.

Message #23 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Devon Buchanan <devon <at> divinenephron.co.uk>
Cc: 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Sat, 05 Sep 2015 15:53:01 +0200
> If you put these frames side-by-side on
> your screen, do they visibly have the same height
                       ^^^^^^^

Sorry for that.  I shoudn't ask you to see things which are off-screen.

> and do they both have
> no tool bar?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21413; Package emacs. (Sat, 05 Sep 2015 14:07:01 GMT) Full text and rfc822 format available.

Message #26 received at 21413 <at> debbugs.gnu.org (full text, mbox):

From: Devon Buchanan <devon <at> divinenephron.co.uk>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 21413 <at> debbugs.gnu.org
Subject: Re: bug#21413: Top of buffer hidden when toolbar hidden and frame
 height is large
Date: Sat, 05 Sep 2015 15:05:58 +0100
On Sat, Sep 05 2015, martin rudalics wrote:
>
> Anyway, could you try downloading one of the latest nightly 
> builds from here and try with them?
>
> http://emacsformacosx.com/builds
>
> Maybe the bug has been even fixed there.

The latest nightly build [1] doesn't have the bug - I'll check 
there first next time thanks!

[1]: 
http://emacsformacosx.com/emacs-builds/Emacs-2015-09-05_01-41-06-ac9da24-universal.dmg

Devon




Added tag(s) fixed. Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Tue, 25 Apr 2017 12:22:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 21413 <at> debbugs.gnu.org and Devon Buchanan <devon <at> divinenephron.co.uk> Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Tue, 25 Apr 2017 12:22:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 24 May 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.