all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
@ 2015-09-04 15:20 Devon Buchanan
  2015-09-04 19:17 ` martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Devon Buchanan @ 2015-09-04 15:20 UTC (permalink / raw)
  To: 21413

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-04 15:20 bug#21413: Top of buffer hidden when toolbar hidden and frame height is large Devon Buchanan
@ 2015-09-04 19:17 ` martin rudalics
  2015-09-05 10:10   ` Devon Buchanan
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2015-09-04 19:17 UTC (permalink / raw)
  To: Devon Buchanan, 21413

 > 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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-04 19:17 ` martin rudalics
@ 2015-09-05 10:10   ` Devon Buchanan
  2015-09-05 10:43     ` martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Devon Buchanan @ 2015-09-05 10:10 UTC (permalink / raw)
  To: martin rudalics; +Cc: 21413

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-05 10:10   ` Devon Buchanan
@ 2015-09-05 10:43     ` martin rudalics
  2015-09-05 12:02       ` Devon Buchanan
  0 siblings, 1 reply; 8+ messages in thread
From: martin rudalics @ 2015-09-05 10:43 UTC (permalink / raw)
  To: Devon Buchanan; +Cc: 21413

 > 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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-05 10:43     ` martin rudalics
@ 2015-09-05 12:02       ` Devon Buchanan
  2015-09-05 13:28         ` martin rudalics
  0 siblings, 1 reply; 8+ messages in thread
From: Devon Buchanan @ 2015-09-05 12:02 UTC (permalink / raw)
  To: martin rudalics; +Cc: 21413

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-05 12:02       ` Devon Buchanan
@ 2015-09-05 13:28         ` martin rudalics
  2015-09-05 13:53           ` martin rudalics
  2015-09-05 14:05           ` Devon Buchanan
  0 siblings, 2 replies; 8+ messages in thread
From: martin rudalics @ 2015-09-05 13:28 UTC (permalink / raw)
  To: Devon Buchanan; +Cc: 21413

 > 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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-05 13:28         ` martin rudalics
@ 2015-09-05 13:53           ` martin rudalics
  2015-09-05 14:05           ` Devon Buchanan
  1 sibling, 0 replies; 8+ messages in thread
From: martin rudalics @ 2015-09-05 13:53 UTC (permalink / raw)
  To: Devon Buchanan; +Cc: 21413

 > 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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#21413: Top of buffer hidden when toolbar hidden and frame height is large
  2015-09-05 13:28         ` martin rudalics
  2015-09-05 13:53           ` martin rudalics
@ 2015-09-05 14:05           ` Devon Buchanan
  1 sibling, 0 replies; 8+ messages in thread
From: Devon Buchanan @ 2015-09-05 14:05 UTC (permalink / raw)
  To: martin rudalics; +Cc: 21413

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-05 14:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 15:20 bug#21413: Top of buffer hidden when toolbar hidden and frame height is large Devon Buchanan
2015-09-04 19:17 ` martin rudalics
2015-09-05 10:10   ` Devon Buchanan
2015-09-05 10:43     ` martin rudalics
2015-09-05 12:02       ` Devon Buchanan
2015-09-05 13:28         ` martin rudalics
2015-09-05 13:53           ` martin rudalics
2015-09-05 14:05           ` Devon Buchanan

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.