• make-frame opens small a frame

    From Ben Bacarisse@ben.usenet@bsb.me.uk to gnu.emacs.help on Fri Apr 21 13:11:58 2023
    From Newsgroup: gnu.emacs.help

    I've upgraded my Ubuntu so I'm fixing all the things that have broken!

    New emacs is 28.2. The frame size I want is given in my .Xresources
    file and that's working. Emacs starts with a frame of the requested
    size. What's more (as expected) default-frame-alist gets set from the X resource values.

    However, make-frame opens a tiny window of about 41x6 even though it is supposed to use default-frame-alist.

    This happens with emacs -q and emacs -Q so I don't think it's my
    configuration. (Of course, with -Q X resources are not used so
    everything is at its default value so for all I know a tiny new frame
    might be the expected result here.)

    The variables window-system-default-frame-alist, initial-frame-alist and frame-inherited-parameters are nil. I've never used frame-inherited-parameters, so I tried setting it to '(width height)
    just in case. No change.

    Searching Emacs News did not help except to tell me about a new command, clone-frame, that is suppose to ignore default-frame-alist and use the
    selected frame parameters. Running clone-frame from a large frame still creates a tiny frame.

    emacsclient behaves oddly. After starting the server, the first use of emacsclient opens a frame of the requested size, but every subsequent
    use opens a tiny window. This is the behaviour I first noticed since I
    use emacsclient all the time.

    Any help much appreciated...
    --
    Ben.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Javier@invalid@invalid.invalid to gnu.emacs.help on Sat Apr 22 00:12:22 2023
    From Newsgroup: gnu.emacs.help

    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    However, make-frame opens a tiny window of about 41x6 even though it is supposed to use default-frame-alist.

    It's hard to understand what you mean, since in emacs-speak 'window' means
    a frme subdivision.

    With this everything will open in a new frame. No more window splitting.

    (setq pop-up-frames t)

    Otherwise use the extra optional arguments of make-frame:

    (describe-function make-frame)

    (make-frame &optional PARAMETERS)

    Return a newly created frame displaying the current buffer.
    Optional argument PARAMETERS is an alist of frame parameters for
    the new frame. Each element of PARAMETERS should have the
    form (NAME . VALUE), for example:

    (name . STRING) The frame should be named STRING.

    (width . NUMBER) The frame should be NUMBER characters in width.
    (height . NUMBER) The frame should be NUMBER text lines high.

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ben Bacarisse@ben.usenet@bsb.me.uk to gnu.emacs.help on Sat Apr 22 12:32:21 2023
    From Newsgroup: gnu.emacs.help

    Javier <invalid@invalid.invalid> writes:

    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    However, make-frame opens a tiny window of about 41x6 even though it is
    supposed to use default-frame-alist.

    It's hard to understand what you mean, since in emacs-speak 'window' means
    a frme subdivision.

    Sorry. I tried to use "frame" every time but I slipped up. It's the
    frame size that's wrong: "make-frame opens small a frame".

    With this everything will open in a new frame. No more window splitting.

    (setq pop-up-frames t)

    Its the frame size that's the problem, not the opening of them.

    Otherwise use the extra optional arguments of make-frame:

    (describe-function make-frame)

    (make-frame &optional PARAMETERS)

    Return a newly created frame displaying the current buffer.
    Optional argument PARAMETERS is an alist of frame parameters for
    the new frame. Each element of PARAMETERS should have the
    form (NAME . VALUE), for example:

    (name . STRING) The frame should be named STRING.

    (width . NUMBER) The frame should be NUMBER characters in width.
    (height . NUMBER) The frame should be NUMBER text lines high.

    make-frame should use default-frame-alist:

    "In addition, any parameter specified in rCydefault-frame-alistrCO,
    but not present in PARAMETERS, is applied."

    but it does not. Any thoughts on what I should try?

    As it happens, make-frame appears to ignore explicit parameters as well. Executing (make-frame '((width . 80) (height . 45))) opens a small frame
    of the same size as plain (make-frame). Something very odd going on...
    --
    Ben.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Javier@invalid@invalid.invalid to gnu.emacs.help on Sat Apr 22 15:49:42 2023
    From Newsgroup: gnu.emacs.help

    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    As it happens, make-frame appears to ignore explicit parameters as well. Executing (make-frame '((width . 80) (height . 45))) opens a small frame
    of the same size as plain (make-frame). Something very odd going on...

    I also find that extremely bizarre. In my computer it works fine.

    I would check the x-toolkit used for compiling emacs.

    emacs --batch --exec '(print system-configuration-options)'

    'gtk' changes a lot and tends to be buggy. With 'lucid' features are
    more stable.

    You can always compile emacs from source with the lucid toolkit

    ./configure --with-x-toolkit=lucid --prefix=${HOME}/local ; make ; make install --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ben Bacarisse@ben.usenet@bsb.me.uk to gnu.emacs.help on Sun Apr 23 00:18:46 2023
    From Newsgroup: gnu.emacs.help

    Javier <invalid@invalid.invalid> writes:

    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    As it happens, make-frame appears to ignore explicit parameters as well.
    Executing (make-frame '((width . 80) (height . 45))) opens a small frame
    of the same size as plain (make-frame). Something very odd going on...

    I also find that extremely bizarre. In my computer it works fine.

    I would check the x-toolkit used for compiling emacs.

    emacs --batch --exec '(print system-configuration-options)'

    'gtk' changes a lot and tends to be buggy. With 'lucid' features are
    more stable.

    Yes, years ago I chose the GTK version for no good reason than having a consistent look.

    You can always compile emacs from source with the lucid toolkit

    ./configure --with-x-toolkit=lucid --prefix=${HOME}/local ; make ;
    make install

    Ubuntu provides an emacs-lucid package, and that does indeed behave
    correctly. It seems it's an emacs/GTK bug.

    Since I've "fixed" the problem with a key binding to set the width and
    height from default-frame-alist, I may just live it. I find the
    old-fashioned toolkit a bit clunky, but I'll run it for a bit and see
    how I can get over the flashbacks it gives me!

    Many thanks.
    --
    Ben.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Javier@invalid@invalid.invalid to gnu.emacs.help on Sun Apr 23 00:29:00 2023
    From Newsgroup: gnu.emacs.help

    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    Since I've "fixed" the problem with a key binding to set the width and
    height from default-frame-alist, I may just live it.

    You should be able to also change that with a hook, without keybindings.

    -- Variable: after-make-frame-functions
    An abnormal hook run by rCymake-framerCO after it created the frame.
    Each function in rCyafter-make-frame-functionsrCO receives one
    argument, the frame just created.


    I find the old-fashioned toolkit a bit clunky, but I'll run it for a
    bit and see how I can get over the flashbacks it gives me!

    The most shocking thing is the scrollbar that appears on the left side,
    but you can change that with xresources or frame-parameters

    M-: (info "(emacs) Table of Resources")
    M-: (info "(elisp) Window Frame Parameters")

    rCyverticalScrollBarsrCO (class rCyScrollBarsrCO)
    Give frames scroll bars on the left if rCyleftrCO, on the right if
    rCyrightrCO; donrCOt have scroll bars if rCyoffrCO (*note Scroll Bars::).

    Another annoyance is that the scrollbar behaves like a xterm
    scrollbar (should be used with the central button of the mouse).
    Anyway nowadays most scrolling is done with the mouse-wheel.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ben Bacarisse@ben.usenet@bsb.me.uk to gnu.emacs.help on Sun Apr 23 03:18:55 2023
    From Newsgroup: gnu.emacs.help

    Javier <invalid@invalid.invalid> writes:

    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    Since I've "fixed" the problem with a key binding to set the width and
    height from default-frame-alist, I may just live it.

    You should be able to also change that with a hook, without keybindings.

    -- Variable: after-make-frame-functions
    An abnormal hook run by rCymake-framerCO after it created the frame.
    Each function in rCyafter-make-frame-functionsrCO receives one
    argument, the frame just created.

    Yes, that was the next step, but that won't fix clone-frame (unless the "parent" frame is already the default size). And there are some cases
    where resizing will be wrong like running ediff so it's going to get
    more and more fussy.

    I find the old-fashioned toolkit a bit clunky, but I'll run it for a
    bit and see how I can get over the flashbacks it gives me!

    The most shocking thing is the scrollbar that appears on the left side,
    but you can change that with xresources or frame-parameters

    Yes, I ditch the scrollbars years ago, even with the GTK version where
    they look fine. I started using emacs on glass tty's so I don't see the
    value in a scrollbar.

    M-: (info "(emacs) Table of Resources")
    M-: (info "(elisp) Window Frame Parameters")

    rCyverticalScrollBarsrCO (class rCyScrollBarsrCO)
    Give frames scroll bars on the left if rCyleftrCO, on the right if
    rCyrightrCO; donrCOt have scroll bars if rCyoffrCO (*note Scroll Bars::).

    Another annoyance is that the scrollbar behaves like a xterm
    scrollbar (should be used with the central button of the mouse).
    Anyway nowadays most scrolling is done with the mouse-wheel.

    If I remove the 3D effect on the menu bar, and pick a compatible colour,
    I think the lucid version will look much the same for the most part. I
    rarely use anything that pops up a menu and I live with the look of
    those.

    It's very easy to switch between them so I'll try each for while.
    Thanks again for your help.
    --
    Ben.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ralf Fassel@ralfixx@gmx.de to gnu.emacs.help on Mon Apr 24 11:57:07 2023
    From Newsgroup: gnu.emacs.help

    * Javier <invalid@invalid.invalid>
    | Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    | > As it happens, make-frame appears to ignore explicit parameters as well.
    | > Executing (make-frame '((width . 80) (height . 45))) opens a small frame
    | > of the same size as plain (make-frame). Something very odd going on...

    | I also find that extremely bizarre. In my computer it works fine.

    | I would check the x-toolkit used for compiling emacs.

    | emacs --batch --exec '(print system-configuration-options)'

    | 'gtk' changes a lot and tends to be buggy.

    Mine is

    "GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)"
    (opensuse 15.4)

    and 'make-frame' works as intended with parameters.

    R'
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ben Bacarisse@ben.usenet@bsb.me.uk to gnu.emacs.help on Mon Apr 24 14:07:35 2023
    From Newsgroup: gnu.emacs.help

    Ralf Fassel <ralfixx@gmx.de> writes:

    * Javier <invalid@invalid.invalid>
    | Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    | > As it happens, make-frame appears to ignore explicit parameters as well. | > Executing (make-frame '((width . 80) (height . 45))) opens a small frame | > of the same size as plain (make-frame). Something very odd going on...

    | I also find that extremely bizarre. In my computer it works fine.

    | I would check the x-toolkit used for compiling emacs.

    | emacs --batch --exec '(print system-configuration-options)'

    | 'gtk' changes a lot and tends to be buggy.

    Mine is

    "GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)"
    (opensuse 15.4)

    and 'make-frame' works as intended with parameters.

    Yes, 27.2 using GTK+ worked for me too. I dread updates; something
    always breaks!
    --
    Ben.
    --- Synchronet 3.21d-Linux NewsLink 1.2