all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Window size specification ignored
@ 2005-09-11 15:14 August Karlstrom
  2005-09-11 16:40 ` Peter Dyballa
       [not found] ` <mailman.6586.1126458402.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: August Karlstrom @ 2005-09-11 15:14 UTC (permalink / raw)


Hi all,

In Ubuntu 5.04 Emacs always starts up with a maximized window, the setting

    (setq default-frame-alist '((height . 38)))

in ~/.emacs is ignored. I haven't encountered this problem in Fedora or 
in Windows. Any clues?


Regards,

August

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

* Re: Window size specification ignored
  2005-09-11 15:14 Window size specification ignored August Karlstrom
@ 2005-09-11 16:40 ` Peter Dyballa
       [not found] ` <mailman.6586.1126458402.20277.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2005-09-11 16:40 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 11.09.2005 um 17:14 schrieb August Karlstrom:

> In Ubuntu 5.04 Emacs always starts up with a maximized window, the 
> setting
>
>    (setq default-frame-alist '((height . 38)))
>
> in ~/.emacs is ignored. I haven't encountered this problem in Fedora 
> or in Windows. Any clues?
>

There is also initial-frame-alist ... but no real clue!

--
Greetings

   Pete

A lot of us are working harder than we want, at things we don't like to
do.  Why? ...In order to afford the sort of existence we don't care to 
live.
	-- Bradford Angier

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

* Re: Window size specification ignored
       [not found] ` <mailman.6586.1126458402.20277.help-gnu-emacs@gnu.org>
@ 2005-09-11 17:52   ` August Karlstrom
  2005-09-11 21:54     ` Peter Dyballa
       [not found]     ` <mailman.6621.1126476194.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: August Karlstrom @ 2005-09-11 17:52 UTC (permalink / raw)


Peter Dyballa wrote:
> 
> Am 11.09.2005 um 17:14 schrieb August Karlstrom:
> 
>> In Ubuntu 5.04 Emacs always starts up with a maximized window, the 
>> setting
>>
>>    (setq default-frame-alist '((height . 38)))
>>
>> in ~/.emacs is ignored. I haven't encountered this problem in Fedora 
>> or in Windows. Any clues?
>>
> 
> There is also initial-frame-alist ... but no real clue!

The option initial-frame-alist doesn't seem to be supported in version 
21.3.1. When I run emacs with

    emacs -g <w>x<h>

I get a non-maximized window of size w x (h - 3) if h <= 32. If h > 32 
the window is maximized. The setting in ~/.emacs is still ignored, even 
if I set height to e.g. 24. Strange indeed.


August

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

* Re: Window size specification ignored
  2005-09-11 17:52   ` August Karlstrom
@ 2005-09-11 21:54     ` Peter Dyballa
       [not found]     ` <mailman.6621.1126476194.20277.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2005-09-11 21:54 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 11.09.2005 um 19:52 schrieb August Karlstrom:

> When I run emacs with
>
>    emacs -g <w>x<h>
>
> I get a non-maximized window of size w x (h - 3) if h <= 32. If h > 32 
> the window is maximized. The setting in ~/.emacs is still ignored, 
> even if I set height to e.g. 24. Strange indeed.
>

There might be some bug in Ubuntu -- or in your .emacs file! To try to 
find where this error comes from you can launch GNU Emacs with the -Q 
or the -q options, together with -g WxH. With -q Emacs does not load 
.emacs nor default.el, with -Q even the site-{start|init}.el files 
aren't loaded and no splash screen is shown. So there is a difference 
and you can get a glue where the error happens.

Modern Emacsen understand --fullheight/-fh, --fullscreen/-fs, 
--fullwidth/-fw. Are you sure you never use these switches, neither on 
the command line (in an alias, and you can check what has been passed 
to Emacs with ps) nor in .emacs nor as an X ressource (xrdb -query)? 
Some X ressources are unspecific so that many X clients can use it.

--
Greetings

   Pete

"I love deadlines. I love the whooshing noise they make as they go by" 
(Douglas Adams)

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

* Re: Window size specification ignored
       [not found]     ` <mailman.6621.1126476194.20277.help-gnu-emacs@gnu.org>
@ 2005-09-11 22:48       ` August Karlstrom
  2005-09-11 23:35         ` Peter Dyballa
       [not found]         ` <mailman.6627.1126481765.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: August Karlstrom @ 2005-09-11 22:48 UTC (permalink / raw)


Peter Dyballa wrote:
> 
> Am 11.09.2005 um 19:52 schrieb August Karlstrom:
> 
>> When I run emacs with
>>
>>    emacs -g <w>x<h>
>>
>> I get a non-maximized window of size w x (h - 3) if h <= 32. If h > 32 
>> the window is maximized. The setting in ~/.emacs is still ignored, 
>> even if I set height to e.g. 24. Strange indeed.
>>
> 
> There might be some bug in Ubuntu -- or in your .emacs file! To try to 
> find where this error comes from you can launch GNU Emacs with the -Q or 
> the -q options, together with -g WxH. With -q Emacs does not load .emacs 
> nor default.el, with -Q even the site-{start|init}.el files aren't 
> loaded and no splash screen is shown. So there is a difference and you 
> can get a glue where the error happens.

There is no default.el or site-start.el and the site-init.elc file 
doesn't give any clues:

<shell-command>

$ cat /usr/share/emacs/21.3/lisp/site-init.elc
;ELC\x14
;;; Compiled by root@terranova.warthogs.hbd.com on Sat Mar  5 01:41:49 2005
;;; from file /build/buildd/emacs21-21.3+1/lisp/site-init.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
          (< (aref emacs-version (1- (length emacs-version))) ?A)
          (or (and (boundp 'epoch::version) epoch::version)
              (string-lessp emacs-version "19.29")))
     (error "`site-init.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\30\302\"\x10\301\207" [Info-default-directory-list append 
("/usr/share/info/emacs-21/")] 3)

</shell-command>

If I invoke

    $ /usr/bin/emacs

when ~/.emacs contains only

    (setq default-frame-alist
       '((width . 80)
         (height . 24)
         (foreground-color . "wheat")
         (background-color . "darkslategrey")))

The display colors are changed, so obviously the file is read, but the 
window is (still) maximized. I will send a bug report to the Ubuntu team.


Thanks for your help,

August

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

* Re: Window size specification ignored
  2005-09-11 22:48       ` August Karlstrom
@ 2005-09-11 23:35         ` Peter Dyballa
       [not found]         ` <mailman.6627.1126481765.20277.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2005-09-11 23:35 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 12.09.2005 um 00:48 schrieb August Karlstrom:

> If I invoke
>
>    $ /usr/bin/emacs
>

I wanted to make you try

	/usr/bin/emacs -q

and

	/usr/bin/emacs -Q

The latter method should launch GNU Emacs without loading *any* local 
Ubuntu customisation. If they launch differently, then you have a clue 
that some Ubuntu customisation file is causing the too big appearence. 
If they appear in both cases the same then there can be an X resource 
causing this. Check files like .xinitrc and .Xdefaults, and check the 
output of 'xrdb -query' too! Comment out lines in .xinitrc, the file 
that launches X11, which have to do with xrdb, log off, and log in 
again. Now you should have less X resources set.

It's good use to launch an application by its path name -- but what 
when this path name is a script that launches the final application? 
It's not likely, but ps would reveal this.

I have in Mac OS X these two aliases to check this:

	for csh family: alias PS        "ps -lwwgx   | egrep UID\|\!:1 | grep 
-v grep"
	for  sh family: PS    () { ps -lwwgx  | egrep UID\|${1} | grep -v grep 
; }

In a shell you simply type 'PS emacs' and you get something like:

pete 161 /\ PS emacs
   UID   PID  PPID CPU PRI NI      VSZ    RSS WCHAN  STAT  TT       TIME 
COMMAND
   501  4107  4094   0  31  0    53288  17432 -      S     ??    7:10.04 
/usr/local/bin/emacs-22.0.50 -geometry 85x45+18+240
   501 26465     1   0  31  0    22728    536 -      S     ??    0:00.01 
-bin/tcsh -i -c /usr/local/bin/emacs-23.0.0 --debug-init -geometry  
100x57+666+44
   501 26470 26465   0  31  0    75008  39136 -      R     ??    3:41.96 
/usr/local/bin/emacs-23.0.0 --debug-init -geometry 100x57+666+44


--
Greetings

   Pete

There are two major products that come out of Berkeley: LSD and UNIX. 
We don't believe this to be a coincidence. - Jeremy S. Anderson

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

* Re: Window size specification ignored
       [not found]         ` <mailman.6627.1126481765.20277.help-gnu-emacs@gnu.org>
@ 2005-09-12  0:58           ` August Karlstrom
  2005-09-12  8:57             ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: August Karlstrom @ 2005-09-12  0:58 UTC (permalink / raw)


Peter Dyballa wrote:
> I wanted to make you try
> 
>     /usr/bin/emacs -q

OK

    $ /usr/bin/emacs -q -g <w>x<h>

works as expected. Without the geometry option Emacs starts maximized.

> and
> 
>     /usr/bin/emacs -Q

If I do this Emacs starts (maximized) with the message 'Unknown option 
-Q' in the mode line. If I invoke

    $ /usr/bin/emacs -q --no-site-file -g <w>x<h>

the geometry specification works as expected. Without it Emacs starts 
maximized. In all cases I use my minimal ~/.emacs file

    (setq default-frame-alist
          '((width . 80)
            (height . 24)
            (foreground-color . "wheat")
            (background-color . "darkslategrey")))

> The latter method should launch GNU Emacs without loading *any* local 
> Ubuntu customisation. If they launch differently, then you have a clue 
> that some Ubuntu customisation file is causing the too big appearence. 
> If they appear in both cases the same then there can be an X resource 
> causing this. 

Yes, I get the same behavior with `-q' and `-q --no-site-file'.

> Check files like .xinitrc and .Xdefaults, 

I have no such files:

    $ locate .xinitrc
    $ locate .Xdefaults

> and check the 
> output of 'xrdb -query' too! 

And what should I look for?

    $ xrdb -query | grep -i emacs
    Emacs*Background:       #ffffff
    Emacs*Dialog*background:        #efebe7
    Emacs*Dialog*foreground:        #101010
    Emacs*Foreground:       #000000
    Emacs*XlwScrollBar.Background:  #efebe7
    Emacs*XlwScrollBar.Foreground:  #101010
    Emacs*backgroundToolBarColor:   #efebe7
    Emacs*bottomToolBarShadowColor: #efebe7
    Emacs*menubar*background:       #efebe7
    Emacs*menubar*foreground:       #101010
    Emacs*popup*Background: #efebe7
    Emacs*popup*Foreground: #101010
    Emacs*toolBarShadowThickness:   0
    Emacs*topToolBarShadowColor:    #efebe7
    Emacs.default.attributeBackground:      #ffffff
    Emacs.default.attributeForeground:      #000000

> Comment out lines in .xinitrc, the file 
> that launches X11, which have to do with xrdb, log off, and log in 
> again. Now you should have less X resources set.

As mentioned, I have no such file.

> It's good use to launch an application by its path name -- but what when 
> this path name is a script that launches the final application? It's not 
> likely, but ps would reveal this.

    $ ls -l /usr/bin/emacs
    lrwxrwxrwx  1 root root 23 2005-09-08 23:36 /usr/bin/emacs ->
    /etc/alternatives/emacs
    $ ls -l /etc/alternatives/emacs
    lrwxrwxrwx  1 root root 18 2005-09-08 23:36 /etc/alternatives/emacs
    -> /usr/bin/emacs21-x
    $ ls -l /usr/bin/emacs21-x
    -rwxr-xr-x  1 root root 4359220 2005-03-05 02:43 /usr/bin/emacs21-x

The file /usr/bin/emacs21-x is a binary file.

> I have in Mac OS X these two aliases to check this:
> 
>     for csh family: alias PS        "ps -lwwgx   | egrep UID\|\!:1 | 
> grep -v grep"
>     for  sh family: PS    () { ps -lwwgx  | egrep UID\|${1} | grep -v 
> grep ; }
> 
> In a shell you simply type 'PS emacs' and you get something like:
> 
> pete 161 /\ PS emacs
>   UID   PID  PPID CPU PRI NI      VSZ    RSS WCHAN  STAT  TT       TIME 
> COMMAND
>   501  4107  4094   0  31  0    53288  17432 -      S     ??    7:10.04 
> /usr/local/bin/emacs-22.0.50 -geometry 85x45+18+240
>   501 26465     1   0  31  0    22728    536 -      S     ??    0:00.01 
> -bin/tcsh -i -c /usr/local/bin/emacs-23.0.0 --debug-init -geometry  
> 100x57+666+44
>   501 26470 26465   0  31  0    75008  39136 -      R     ??    3:41.96 
> /usr/local/bin/emacs-23.0.0 --debug-init -geometry 100x57+666+44

I tried

    $ ps -lwwgx | egrep UID\|emacs | grep -v grep;
    Warning: bad ps syntax, perhaps a bogus '-'? See
    http://procps.sf.net/faq.html
    F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME
    COMMAND

Am I missing something?


Regards,

August

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

* Re: Window size specification ignored
  2005-09-12  0:58           ` August Karlstrom
@ 2005-09-12  8:57             ` Peter Dyballa
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2005-09-12  8:57 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 12.09.2005 um 02:58 schrieb August Karlstrom:

> Am I missing something?
>

At least the correct Ubuntu ps syntax ... I am using a BSD style ps. 
'man ps', inside Emacs as 'M-x manual-entry ps' or F1 F2, should be 
your friend. And it's worth doing the experiments inside GNU Emacs in 
its shell buffer.


Ubuntu's setup with so many sym-links reminds of Fink for Mac OS X: I 
never knew exactly which file now was executing, and even worse: the 
Fink folks messed up the site specific things with a lot of 
intermediate and extra files that loaded each others for unknown 
reasons (it is similiar to some so-called Carbon Emacsen). Do you have 
an idea how much longer it takes to launch Fink's GNU Emacs 21.3.50 
with -Q then without -Q? Minutes. Really.

Beside this I have the feeling that Ubuntu is using a pretty old Emacs. 
Have you checked its version? This could explain that it does not 
understand -Q. Apple's gift of GNU Emacs 21.2, for use inside a 
terminal emulation only, does not understand -Q too.

Are you able to 'trace' a programme's execution, i.e. follow it opening 
and closing files, doing system calls, receiving signals etc? This way 
you would find which Ubuntu specific Elisp files were executed at 
start-up ... but it's much easier to get GNU Emacs 22.0.50 from CVS and 
compile it yourself. A (much better then) nice'd 'make bootstrap' in 
the background will take one or two hours while you're having 
breakfast, lunch, or dinner, or going shopping -- it should be more 
satisfactory in the end! To do this you'll need many Ubuntu dev 
packages, containing C header files needed for 'dev-elopment', i.e. 
compiling a software.

--
Greetings

   Pete

Without vi there is only GNU Emacs

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

end of thread, other threads:[~2005-09-12  8:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-11 15:14 Window size specification ignored August Karlstrom
2005-09-11 16:40 ` Peter Dyballa
     [not found] ` <mailman.6586.1126458402.20277.help-gnu-emacs@gnu.org>
2005-09-11 17:52   ` August Karlstrom
2005-09-11 21:54     ` Peter Dyballa
     [not found]     ` <mailman.6621.1126476194.20277.help-gnu-emacs@gnu.org>
2005-09-11 22:48       ` August Karlstrom
2005-09-11 23:35         ` Peter Dyballa
     [not found]         ` <mailman.6627.1126481765.20277.help-gnu-emacs@gnu.org>
2005-09-12  0:58           ` August Karlstrom
2005-09-12  8:57             ` Peter Dyballa

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.