Re: Adapting frame to match size of the invoking window

Heime <[email protected]> Wed, 29 Jul 2026 22:18:39 +0000
Newsgroups gmane.emacs.help
Message-ID <HObrC8bBnBh42AnMQx_0ZT5jmBznmmKZ-5mFlnisnBI7eNvhUfMRtRmLHwWpKMvwoz6pN0augZBlZiKOFWml_quruuZ42Ug1x-URkQzXgIA=@protonmail.com>
On Thursday, July 30th, 2026 at 4:35 AM, [email protected] <[email protected]=
> wrote:

> Heime <[email protected]> writes:
>=20
> > galaxiakos-du makes a frame using parameters in frame-prmt.  I want
> > 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 wind=
ow
> > 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 th=
e
> description of =E2=80=98make-frame=E2=80=99 in (info "(elisp) Creating Fr=
ames"):
>=20
>     -- Variable: frame-inherited-parameters
>         This variable specifies the list of frame parameters that a newly
>         created frame inherits from the currently selected frame.  For ea=
ch
>         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 valu=
e
>         in the selected frame.
>=20
> So, you would change:
>=20
> >   (let ( (frm  (make-frame frame-prmt))
> >          (bfr  (get-buffer-create bfr-name)) )
> >   ...)
>=20
> to:
>    (let* ((frame-inherited-parameters '(height width))
>           (frm  (make-frame))
>           (bfr  (get-buffer-create bfr-name)))
>    ...)
=20
Although the frame size changes, it is not equivalent to that of the parent=
 frame.