Making frames match original frame or current window size
Heime <[email protected]> Sun, 02 Aug 2026 11:46:43 +0000
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <BMe3v8uB214ExwioRk1OsxcV7eXm3cyHxS9BChwFAtfNXR_36VMqZ1FLQ66pCuBPizc66VMp4c2PoT3HUt7TDBcKS03jHnjHSe99i51riZs=@protonmail.com> |
This makes a new frame of the same size of the original.
I also want to have the option for the new frame to have
the size of the current window. How can I do this?
(defun galaxiakos-du (frm-name bfr-name &rest implfds)
"Call multiple implanted functions passed as arguments.
This allows dynamic insertion within the buffer.
FRM-NAME Name for the frame.
BFR-NAME Name for the buffer.
IMPLFDS Implanted feed functions."
=20
(interactive)
(let* ( (frame-inherited-parameters '(width height))
=09 (frm (make-frame galaxiakos-frame-prmt))
(bfr (get-buffer-create bfr-name))
(scale text-scale-mode-amount) )
;; Change frame parameter for name
(set-frame-parameter frm 'name frm-name)
;; Iterate and call each function passed as argument
(select-frame frm)
(with-current-buffer bfr
(dolist (implfd implfds)
(funcall implfd))
(goto-char (point-min)))
;; Display the buffer in the selected frame
(switch-to-buffer bfr)
;; Enable `text-scale-mode' and set the scaling level to the value
;; at the start of the function execution.
(text-scale-set scale) ))