[arch-general] Emacs 23 window resize on startup
Hello list! I know this is not an Arch specific question but I thought maybe something similar occurred to someone here and he knows a solution. I just updated to Emacs 23 which has new fancy font code with antialiasing etc. However the default font of 12pt is way too big for my taste. So I changed it to 10pt and saved the configuration to my ~/.emacs file. Everything works fine -- the font is smaller now -- but: Every time I start Emacs now the window first resizes to the dimensions that would be needed by the old (bigger) font. The (yet empty) window is then displayed and layouted by the window manager (KDE 4’s kwin). I configured it to center all new windows by default because I like it that way. Then the Emacs window resizes itself to match the new (smaller) font and the window is no longer centered! This may seem like a minor issue and I know it is. But it nevertheless annoys me and I did not find a way to change this behaviour! Is there a way to do so? Emacs should just first resize the window to match the font size the user has actually configured and then display the window! Greetings! Edgar
At Thu, 30 Jul 2009 15:15:46 +0200, Edgar Kalkowski wrote:
Hello list!
I know this is not an Arch specific question but I thought maybe something similar occurred to someone here and he knows a solution.
I just updated to Emacs 23 which has new fancy font code with antialiasing etc. However the default font of 12pt is way too big for my taste. So I changed it to 10pt and saved the configuration to my ~/.emacs file.
Everything works fine -- the font is smaller now -- but: Every time I start Emacs now the window first resizes to the dimensions that would be needed by the old (bigger) font. The (yet empty) window is then displayed and layouted by the window manager (KDE 4’s kwin). I configured it to center all new windows by default because I like it that way. Then the Emacs window resizes itself to match the new (smaller) font and the window is no longer centered!
This may seem like a minor issue and I know it is. But it nevertheless annoys me and I did not find a way to change this behaviour! Is there a way to do so? Emacs should just first resize the window to match the font size the user has actually configured and then display the window!
Greetings!
Edgar
I have a similar problem, but it's the opposite: I use a tiling WM, so Emacs starts maximized and then, when it changes the font, it grows beyond the screen border. I'd like to hear if someone knows a solution. Greetings, Andre
On Thu, Jul 30, 2009 at 15:37, <andre.ramaciotti@gmail.com> wrote:
At Thu, 30 Jul 2009 15:15:46 +0200, Edgar Kalkowski wrote:
Hello list!
I know this is not an Arch specific question but I thought maybe something similar occurred to someone here and he knows a solution.
I just updated to Emacs 23 which has new fancy font code with antialiasing etc. However the default font of 12pt is way too big for my taste. So I changed it to 10pt and saved the configuration to my ~/.emacs file.
Everything works fine -- the font is smaller now -- but: Every time I start Emacs now the window first resizes to the dimensions that would be needed by the old (bigger) font. The (yet empty) window is then displayed and layouted by the window manager (KDE 4’s kwin). I configured it to center all new windows by default because I like it that way. Then the Emacs window resizes itself to match the new (smaller) font and the window is no longer centered!
This may seem like a minor issue and I know it is. But it nevertheless annoys me and I did not find a way to change this behaviour! Is there a way to do so? Emacs should just first resize the window to match the font size the user has actually configured and then display the window!
Greetings!
Edgar
I have a similar problem, but it's the opposite: I use a tiling WM, so Emacs starts maximized and then, when it changes the font, it grows beyond the screen border. I'd like to hear if someone knows a solution.
Greetings, Andre
Hi, as a workaround, until someone comes up with a nice lisp solution, you can set the font for emacs in your ~/.Xresources (or whatever you call it). For example: $ cat >> .Xresources << EOF Emacs*font: Terminus 10 EOF $ xrdb -merge .Xresources At least it works for me (and my tiling wm). Regards, chressie
At Thu, 30 Jul 2009 16:34:25 +0200, Christian Himpel wrote:
On Thu, Jul 30, 2009 at 15:37, <andre.ramaciotti@gmail.com> wrote:
At Thu, 30 Jul 2009 15:15:46 +0200, Edgar Kalkowski wrote:
Hello list!
I know this is not an Arch specific question but I thought maybe something similar occurred to someone here and he knows a solution.
I just updated to Emacs 23 which has new fancy font code with antialiasing etc. However the default font of 12pt is way too big for my taste. So I changed it to 10pt and saved the configuration to my ~/.emacs file.
Everything works fine -- the font is smaller now -- but: Every time I start Emacs now the window first resizes to the dimensions that would be needed by the old (bigger) font. The (yet empty) window is then displayed and layouted by the window manager (KDE 4’s kwin). I configured it to center all new windows by default because I like it that way. Then the Emacs window resizes itself to match the new (smaller) font and the window is no longer centered!
This may seem like a minor issue and I know it is. But it nevertheless annoys me and I did not find a way to change this behaviour! Is there a way to do so? Emacs should just first resize the window to match the font size the user has actually configured and then display the window!
Greetings!
Edgar
I have a similar problem, but it's the opposite: I use a tiling WM, so Emacs starts maximized and then, when it changes the font, it grows beyond the screen border. I'd like to hear if someone knows a solution.
Greetings, Andre
Hi,
as a workaround, until someone comes up with a nice lisp solution, you can set the font for emacs in your ~/.Xresources (or whatever you call it).
For example:
$ cat >> .Xresources << EOF Emacs*font: Terminus 10 EOF $ xrdb -merge .Xresources
At least it works for me (and my tiling wm).
Regards, chressie
Thanks for the tip. :)
Hi Christian! Thank you for this tip but I’m afraid it does not work for me. I executed the commands you suggested and they worked without printing any error (at first they did because of a typo of mine). The result is that my Emacs window now starts up quite small in the middle of the screen and the is almost (before the actual content is drawn) resized to a bigger size. But this also makes it appear not centered but rather asymmetrical somewhat left of the center of the screen. Perhaps I’ll try my luck on the Emacs help mailing list in a few days or so. Edgar Am oder ungefähr am Donnerstag, 30. Juli 2009, um 16:34:25 schrieb Christian Himpel:
Hi,
as a workaround, until someone comes up with a nice lisp solution, you can set the font for emacs in your ~/.Xresources (or whatever you call it).
For example:
$ cat >> .Xresources << EOF Emacs*font: Terminus 10 EOF $ xrdb -merge .Xresources
At least it works for me (and my tiling wm).
Regards, chressie
On Thu, Jul 30, 2009 at 17:12, Edgar Kalkowski<eMail@edgar-kalkowski.de> wrote:
Hi Christian!
Thank you for this tip but I’m afraid it does not work for me. I executed the commands you suggested and they worked without printing any error (at first they did because of a typo of mine). The result is that my Emacs window now starts up quite small in the middle of the screen and the is almost (before the actual content is drawn) resized to a bigger size. But this also makes it appear not centered but rather asymmetrical somewhat left of the center of the screen.
Perhaps I’ll try my luck on the Emacs help mailing list in a few days or so.
Edgar
Am oder ungefähr am Donnerstag, 30. Juli 2009, um 16:34:25 schrieb Christian Himpel:
Hi,
as a workaround, until someone comes up with a nice lisp solution, you can set the font for emacs in your ~/.Xresources (or whatever you call it).
For example:
$ cat >> .Xresources << EOF Emacs*font: Terminus 10 EOF $ xrdb -merge .Xresources
At least it works for me (and my tiling wm).
Regards, chressie
Maybe you haven't installed the terminus font? $ pacman -S terminus-font But you can use any other font, of course. An "easy" way to find out what fonts you can use might be: - open your emacs frame - hold the SHIFT key pressed while clicking Mouse button 1 (in the emacs window of course) - select "change buffer font..." and a dialog window should appear - in the "pick a font" dialog you can select a font (Family) and size (Size) - if you found you favourite font, replace the "Emacs*font: Terminus 10" line with your favourite "Emacs*font: Family Size" combination, i.e. $ sed -e 's;\(Emacs\*font:\).*;\1 Monospace 10;' .Xresources - $ xrdb -merge .Xresources btw. if your window manager does not include the .Xresources file automagically, you should do a "$ xrdb -merge .Xresources" in your .xinitrc or whereever Regards, chressie
On Thu, Jul 30, 2009 at 11:12 AM, Edgar Kalkowski<eMail@edgar-kalkowski.de> wrote:
Hi Christian!
Thank you for this tip but I’m afraid it does not work for me. I executed the commands you suggested and they worked without printing any error (at first they did because of a typo of mine). The result is that my Emacs window now starts up quite small in the middle of the screen and the is almost (before the actual content is drawn) resized to a bigger size. But this also makes it appear not centered but rather asymmetrical somewhat left of the center of the screen.
Perhaps I’ll try my luck on the Emacs help mailing list in a few days or so.
Edgar
The starting window size can be specified in .Xresources, e.g. : emacs*geometry: 100x50 That might fix your problem.
Hi! Thanks all for your help! I finally got things quite working by specifying window geometry and font on the command line via --font and --geometry switches. This works as expected and it seems that Emacs only reads the ~/.emacs file after the window has already been displayed. Edgar Am oder ungefähr am Freitag, 31. Juli 2009, um 08:25:12 schrieb Eric Bélanger:
On Thu, Jul 30, 2009 at 11:12 AM, Edgar Kalkowski<eMail@edgar-kalkowski.de> wrote:
Hi Christian!
Thank you for this tip but I’m afraid it does not work for me. I executed the commands you suggested and they worked without printing any error (at first they did because of a typo of mine). The result is that my Emacs window now starts up quite small in the middle of the screen and the is almost (before the actual content is drawn) resized to a bigger size. But this also makes it appear not centered but rather asymmetrical somewhat left of the center of the screen.
Perhaps I’ll try my luck on the Emacs help mailing list in a few days or so.
Edgar
The starting window size can be specified in .Xresources, e.g. :
emacs*geometry: 100x50
That might fix your problem.
Le jeudi 30 à 15:15, Edgar Kalkowski a écrit :
I just updated to Emacs 23 which has new fancy font code with antialiasing etc. However the default font of 12pt is way too big for my taste. So I changed it to 10pt and saved the configuration to my ~/.emacs file.
Everything works fine -- the font is smaller now -- but: Every time I start Emacs now the window first resizes to the dimensions that would be needed by the old (bigger) font.
I am not familiar enough with emacs' start-up process, but I would venture that the initial frame is created before your init file is read. Try specifying the font with a --font argument. And kudos to Jürgen Hötzel for having made emacs23 available hours after its release :-) -- Fred
participants (5)
-
andre.ramaciotti@gmail.com
-
Christian Himpel
-
Edgar Kalkowski
-
Eric Bélanger
-
Frédéric Perrin