all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Window too big
@ 2015-10-06  1:19 Hendrik Boom
  2015-10-06  1:36 ` Emanuel Berg
  2015-11-03  3:09 ` Michael Heerdegen
  0 siblings, 2 replies; 12+ messages in thread
From: Hendrik Boom @ 2015-10-06  1:19 UTC (permalink / raw)
  To: help-gnu-emacs

When I start emacs from the menu in xcfe, it always is slightly taller 
than my screen.  I have to mouse around and make it smaller before it is 
usable.  Is there something I can put, say, in my ~/.emacs file to change 
how tall it is?

-- hendrik




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

* Re: Window too big
  2015-10-06  1:19 Window too big Hendrik Boom
@ 2015-10-06  1:36 ` Emanuel Berg
  2015-11-02 14:26   ` Hendrik Boom
  2015-11-09 20:25   ` Hendrik Boom
  2015-11-03  3:09 ` Michael Heerdegen
  1 sibling, 2 replies; 12+ messages in thread
From: Emanuel Berg @ 2015-10-06  1:36 UTC (permalink / raw)
  To: help-gnu-emacs

Hendrik Boom <hendrik@topoi.pooq.com> writes:

> When I start emacs from the menu in xcfe, it always is
> slightly taller than my screen. I have to mouse around
> and make it smaller before it is usable. Is there
> something I can put, say, in my ~/.emacs file to
> change how tall it is?

If you don't start Emacs from the menu in xcfe, but
open a terminal emulator window (e.g., xterm) and type
'emacs', you can append options that will allow you to
easily fine tune what should happen. I'm sure you can
modify the menu item to encompass such options, but at
least in the experimentation phase, and actually
every time else as well, it is faster, and more
powerful, to do it from a command interpreter. Anyway,
here are some of the options you wish to examine - do

    $ man emacs

for more!

      -fh, --fullheight
              Make the first frame as high as the screen.

      -fs, --fullscreen
              Make the first frame fullscreen.

      -fw, --fullwidth
              Make the first frame as wide as the screen.

      -mm, --maximized
              Maximize the first frame, like "-fw -fh".

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: Window too big
       [not found] <mailman.485.1444094378.16064.help-gnu-emacs@gnu.org>
@ 2015-10-06 14:42 ` J G Miller
  2015-10-07  9:42   ` Michael Heerdegen
       [not found]   ` <mailman.46.1444210988.916.help-gnu-emacs@gnu.org>
  2015-11-10  2:06 ` Dan Espen
  1 sibling, 2 replies; 12+ messages in thread
From: J G Miller @ 2015-10-06 14:42 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday, October 6th, 2015, at 01:19:22 +0000, Hendrik Boom observed:

> When I start emacs from the menu in xcfe, it always is slightly taller 
> than my screen.  I have to mouse around and make it smaller before it is 
> usable.  Is there something I can put, say, in my ~/.emacs file to change 
> how tall it is?

emacs can use the apps-default emacs.geometry to comply with height and width
and position.

So you can create an apps-default Emacs file in a directory in the apps-default
search path or a directory specified by the environmental variable XAPPLRESDIR
and put in a line

emacs.geometry: widthxheight+x_position+y_position

In fact you could have -x_position or -y_position if you wanted the
position to be relative to the right or bottom of the screen.

Optionally the values in the Emacs apps-default file can be loaded into the
X11 resource database property with xrdb (during the Xsession startup sequence)
for faster loading (instead of emacs searching for the apps-default file).

You can also set frame sizes (and other properties) in emacsrc file with

(cond ((eq window-system 'x)

       (setq default-frame-alist
             '((user-position . t)
               (user-size     . t)
               (height        . 42)
               (width         . 108)
               (top           .  0)
               (left          .  0)
               (cursor-color  . "#dddd44")
               (mouse-color   . "#ffffaa")))

)

but the values for height widrth and position here are overriden (in my experience)
by the Emacs apps-default values if they are set.


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

* Re: Window too big
  2015-10-06 14:42 ` J G Miller
@ 2015-10-07  9:42   ` Michael Heerdegen
       [not found]   ` <mailman.46.1444210988.916.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Heerdegen @ 2015-10-07  9:42 UTC (permalink / raw)
  To: help-gnu-emacs

J G Miller <miller@yoyo.ORG> writes:

> You can also set frame sizes (and other properties) in emacsrc file with
>
> (cond ((eq window-system 'x)
>
>        (setq default-frame-alist
>              '((user-position . t)
>                (user-size     . t)
>                (height        . 42)
>                (width         . 108)
>                (top           .  0)
>                (left          .  0)
>                (cursor-color  . "#dddd44")
>                (mouse-color   . "#ffffaa")))
>
> )
>
> but the values for height widrth and position here are overriden (in
> my experience) by the Emacs apps-default values if they are set.

    ;; let the first frame appear according to `default-frame-alist'
    (modify-frame-parameters (selected-frame) default-frame-alist)

in the init file can work around that problem.  The starting frame is a
bit special in Emacs.


Michael.




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

* Re: Window too big
       [not found]   ` <mailman.46.1444210988.916.help-gnu-emacs@gnu.org>
@ 2015-10-07 12:29     ` J G Miller
  0 siblings, 0 replies; 12+ messages in thread
From: J G Miller @ 2015-10-07 12:29 UTC (permalink / raw)
  To: help-gnu-emacs

On Wednesday, October 7th, 2015, at 11:42:45h +0200,
Michael Heerdegen explained:

>     ;; let the first frame appear according to `default-frame-alist'
>     (modify-frame-parameters (selected-frame) default-frame-alist)
> 
> in the init file can work around that problem.  The starting frame is a
> bit special in Emacs.

Thanks for the explanation and the solution.

I had always wondered why it never seemed to behave quite as expected.


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

* Re: Window too big
  2015-10-06  1:36 ` Emanuel Berg
@ 2015-11-02 14:26   ` Hendrik Boom
  2015-11-03  2:39     ` Emanuel Berg
  2015-11-09 20:25   ` Hendrik Boom
  1 sibling, 1 reply; 12+ messages in thread
From: Hendrik Boom @ 2015-11-02 14:26 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, 06 Oct 2015 03:36:20 +0200, Emanuel Berg wrote:

> Hendrik Boom <hendrik@topoi.pooq.com> writes:
> 
>> When I start emacs from the menu in xcfe, it always is slightly taller
>> than my screen. I have to mouse around and make it smaller before it is
>> usable. Is there something I can put, say, in my ~/.emacs file to
>> change how tall it is?
> 
> If you don't start Emacs from the menu in xcfe, but open a terminal
> emulator window (e.g., xterm) and type 'emacs', you can append options
> that will allow you to easily fine tune what should happen. I'm sure you
> can modify the menu item to encompass such options, but at least in the
> experimentation phase, and actually every time else as well, it is
> faster, and more powerful, to do it from a command interpreter. Anyway,
> here are some of the options you wish to examine - do
> 
>     $ man emacs
> 
> for more!
> 
>       -fh, --fullheight
>               Make the first frame as high as the screen.
> 
>       -fs, --fullscreen
>               Make the first frame fullscreen.
> 
>       -fw, --fullwidth
>               Make the first frame as wide as the screen.
> 
>       -mm, --maximized
>               Maximize the first frame, like "-fw -fh".

Should I conclude there is no way within emacs to set the variable that 
control window size (or shoulf I say, panel size?)  There does seem to be 
a way to request full-screen mode, so there must be a way for emacs to 
determine the screen size

Or that emacs has the wrong default size for my computer, or that xcfe 
has simply decided to override them with the wrong values?

-- hendrik




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

* Re: Window too big
  2015-11-02 14:26   ` Hendrik Boom
@ 2015-11-03  2:39     ` Emanuel Berg
  0 siblings, 0 replies; 12+ messages in thread
From: Emanuel Berg @ 2015-11-03  2:39 UTC (permalink / raw)
  To: help-gnu-emacs

Hendrik Boom <hendrik@topoi.pooq.com> writes:

> Should I conclude there is no way within emacs to
> set the variable that control window size (or shoulf
> I say, panel size?)

There are windows in Emacs. For example, evaluate
these:

    (split-window-vertically)
    (other-window 1)

And you can get properties as data from those, e.g.
with:

    (window-height)

But, what you are talking about seems (?) to be the
windows of the window manager of your window system
(e.g., X) and/or desktop (e.g, GNOME, KDE). And those
windows can be resized from outside of Emacs, and from
within Emacs.

> There does seem to be a way to request full-screen
> mode, so there must be a way for emacs to determine
> the screen size

Indeed, you can use, as a CLI option

    -fs, --fullscreen
            Make the first frame fullscreen.

or, in Emacs:

    (toggle-frame-fullscreen)

Perhaps what you look for is:

    frame-pixel-height
      Function: Return a FRAME's height in pixels.
    frame-pixel-width
      Function: Return FRAME's width in pixels.

?

> Or that emacs has the wrong default size for my
> computer, or that xcfe has simply decided to
> override them with the wrong values?

I have no idea, but probably it is still easier to
configure this "back" to what you want in Emacs,
instead of messing with that. It is not like it is
a costly operation :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: Window too big
  2015-10-06  1:19 Window too big Hendrik Boom
  2015-10-06  1:36 ` Emanuel Berg
@ 2015-11-03  3:09 ` Michael Heerdegen
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Heerdegen @ 2015-11-03  3:09 UTC (permalink / raw)
  To: Hendrik Boom; +Cc: help-gnu-emacs

Hendrik Boom <hendrik@topoi.pooq.com> writes:

> When I start emacs from the menu in xcfe, it always is slightly taller
> than my screen.  I have to mouse around and make it smaller before it
> is usable.  Is there something I can put, say, in my ~/.emacs file to
> change how tall it is?

Dunno why this happens in your case, maybe the cause is outside Emacs.

From within Emacs: of course can you control the default frame sizes.
Have a look at

   (info "(emacs) Frame Parameters")

You want to configure `default-frame-alist'.


Michael.



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

* Re: Window too big
  2015-10-06  1:36 ` Emanuel Berg
  2015-11-02 14:26   ` Hendrik Boom
@ 2015-11-09 20:25   ` Hendrik Boom
  2015-11-09 20:44     ` Random832
  1 sibling, 1 reply; 12+ messages in thread
From: Hendrik Boom @ 2015-11-09 20:25 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, 06 Oct 2015 03:36:20 +0200, Emanuel Berg wrote:

> Hendrik Boom <hendrik@topoi.pooq.com> writes:
> 
>> When I start emacs from the menu in xcfe, it always is slightly taller
>> than my screen. I have to mouse around and make it smaller before it is
>> usable. Is there something I can put, say, in my ~/.emacs file to
>> change how tall it is?
> 
> If you don't start Emacs from the menu in xcfe, but open a terminal
> emulator window (e.g., xterm) and type 'emacs', you can append options
> that will allow you to easily fine tune what should happen. I'm sure you
> can modify the menu item to encompass such options, but at least in the
> experimentation phase, and actually every time else as well, it is
> faster, and more powerful, to do it from a command interpreter. Anyway,
> here are some of the options you wish to examine - do
> 
>     $ man emacs
> 
> for more!
> 
>       -fh, --fullheight
>               Make the first frame as high as the screen.

Someone must be lying to it about how big the screen is.  When I use -fh, 
the main edit buffer just fits on the screen, the status line and the 
place you type filenames to edit does not.

I should try again with a  different window manager, see if that makes a 
difference.

-- hendrik

-- hendrik




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

* Re: Window too big
  2015-11-09 20:25   ` Hendrik Boom
@ 2015-11-09 20:44     ` Random832
  2015-11-10  1:33       ` Emanuel Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Random832 @ 2015-11-09 20:44 UTC (permalink / raw)
  To: help-gnu-emacs

Hendrik Boom <hendrik@topoi.pooq.com> writes:
> Someone must be lying to it about how big the screen is.  When I use -fh, 
> the main edit buffer just fits on the screen, the status line and the 
> place you type filenames to edit does not.

Those are called the modeline and the minibuffer respectively.

Would they fit on the screen if the title bar were moved off the screen?
Maybe Emacs doesn't know how tall the title bar is. What window manager
does XFCE use, anyway?




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

* Re: Window too big
  2015-11-09 20:44     ` Random832
@ 2015-11-10  1:33       ` Emanuel Berg
  0 siblings, 0 replies; 12+ messages in thread
From: Emanuel Berg @ 2015-11-10  1:33 UTC (permalink / raw)
  To: help-gnu-emacs

Random832 <random832@fastmail.com> writes:

> Would they fit on the screen if the title bar were
> moved off the screen? Maybe Emacs doesn't know how
> tall the title bar is. What window manager does XFCE
> use, anyway?

The default is xfwm4 tho the natural flow of
configurablility runs in the opposite direction. (Or
should, at least.)

Yeah, these kinds of problems illustrate the kind of
problems you get with GUIs in general and with
"desktop environments" in particular...

My piece of advice to the OP (if he insists sticking
to a GUI Emacs) is, disable the login manager for xfce
(which is slim by default), then use ~/.xinitrc to
specify exactly what software to run.

You can check out an example here, which uses openbox
as window manager:

    http://user.it.uu.se/~embe8573/conf/.xinitrc

If that solves the problem it is either an XFCE/xfwm4
problem so then you know what not to use :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: Window too big
       [not found] <mailman.485.1444094378.16064.help-gnu-emacs@gnu.org>
  2015-10-06 14:42 ` J G Miller
@ 2015-11-10  2:06 ` Dan Espen
  1 sibling, 0 replies; 12+ messages in thread
From: Dan Espen @ 2015-11-10  2:06 UTC (permalink / raw)
  To: help-gnu-emacs

Hendrik Boom <hendrik@topoi.pooq.com> writes:

> When I start emacs from the menu in xcfe, it always is slightly taller 
> than my screen.  I have to mouse around and make it smaller before it is 
> usable.  Is there something I can put, say, in my ~/.emacs file to change 
> how tall it is?

Changing the initial frame size from your .emacs is not recommended.
You'll end up with the window first being mapped at one size, and then
changing as you watch emacs start.

The recommended way is to use XResources like this:

emacs.geometry: 81x56

Experiment with the last number to get the right height.
Notice that the geometry is stated in character units.

You put XResources in a file like ~/.Xdefaults.
Use xrdb to test your changes.

-- 
Dan Espen


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

end of thread, other threads:[~2015-11-10  2:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06  1:19 Window too big Hendrik Boom
2015-10-06  1:36 ` Emanuel Berg
2015-11-02 14:26   ` Hendrik Boom
2015-11-03  2:39     ` Emanuel Berg
2015-11-09 20:25   ` Hendrik Boom
2015-11-09 20:44     ` Random832
2015-11-10  1:33       ` Emanuel Berg
2015-11-03  3:09 ` Michael Heerdegen
     [not found] <mailman.485.1444094378.16064.help-gnu-emacs@gnu.org>
2015-10-06 14:42 ` J G Miller
2015-10-07  9:42   ` Michael Heerdegen
     [not found]   ` <mailman.46.1444210988.916.help-gnu-emacs@gnu.org>
2015-10-07 12:29     ` J G Miller
2015-11-10  2:06 ` Dan Espen

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.