Re: Adapting frame to match size of the invoking window

[email protected] Wed, 29 Jul 2026 12:34:49 -0400
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
Heime <[email protected]> writes:

> galaxiakos-du makes a frame using parameters in frame-prmt.  I want=20
> to change this behaviour, making the frame take the size of the parent
> window from which the command was executed.  The text scale of the window
> has also to be applied to keep the same dimensions.=20
>

It sounds like you want to use the variable
=E2=80=98frame-inherited-parameters=E2=80=99, which is described after the
description of =E2=80=98make-frame=E2=80=99 in (info "(elisp) Creating Fram=
es"):

    -- Variable: frame-inherited-parameters
        This variable specifies the list of frame parameters that a newly
        created frame inherits from the currently selected frame.  For each
        parameter (a symbol) that is an element in this list and has not
        been assigned earlier when processing =E2=80=98make-frame=E2=80=99,=
 the function
        sets the value of that parameter in the created frame to its value
        in the selected frame.

So, you would change:

>   (let ( (frm  (make-frame frame-prmt))
>          (bfr  (get-buffer-create bfr-name)) )
>   ...)

to:
   (let* ((frame-inherited-parameters '(height width))
          (frm  (make-frame))
          (bfr  (get-buffer-create bfr-name)))
   ...)

--=20
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.