Function: frame--size-history
frame--size-history is a byte-compiled function defined in
frame.el.gz.
Signature
(frame--size-history &optional FRAME)
Documentation
Print history of resize operations for FRAME.
This function dumps a prettified version of frame-size-history
into a buffer called *frame-size-history*. The optional argument
FRAME denotes the frame whose history will be dumped; it defaults
to the selected frame.
Storing information about resize operations is off by default.
If you set the variable frame-size-history like this
(setq frame-size-history '(100))
then Emacs will save information about the next 100 significant operations affecting any frame's size in that variable. This function prints the entries for FRAME stored in that variable in a more legible way.
All lines start with an indication of the requested action. An
entry like menu-bar-lines or scroll-bar-width indicates that
a change of the corresponding frame parameter or Lisp variable
was requested. An entry like gui_figure_window_size indicates
that that C function was executed, an entry like ConfigureNotify
indicates that that event was received.
In long entries, a number in parentheses displays the INHIBIT
parameter passed to the C function adjust_frame_size. Such
entries may also display changes of frame rectangles in a form
like R=n1xn2~>n3xn4 where R denotes the rectangle type (TS for
text, NS for native and IS for inner frame rectangle sizes, all
in pixels, TC for text rectangle sizes in frame columns and
lines), n1 and n2 denote the old width and height and n3 and n4
the new width and height in the according units. MS stands for
the minimum inner frame size in pixels, IH and IV, if present,
indicate that resizing horizontally and/or vertically was
inhibited (either by frame-inhibit-implied-resize or because of
the frame's fullscreen state).
Shorter entries represent C functions that process width and height changes of the native rectangle where PS stands for the frame's present pixel width and height, XS for a requested pixel width and height and DS for some earlier requested but so far delayed pixel width and height.
Very short entries represent calls of C functions that do not directly ask for size changes but may indirectly affect the size of frames like calls to map a frame or change its visibility.
Source Code
;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defun frame--size-history (&optional frame)
"Print history of resize operations for FRAME.
This function dumps a prettified version of `frame-size-history'
into a buffer called *frame-size-history*. The optional argument
FRAME denotes the frame whose history will be dumped; it defaults
to the selected frame.
Storing information about resize operations is off by default.
If you set the variable `frame-size-history' like this
(setq frame-size-history '(100))
then Emacs will save information about the next 100 significant
operations affecting any frame's size in that variable. This
function prints the entries for FRAME stored in that variable in
a more legible way.
All lines start with an indication of the requested action. An
entry like `menu-bar-lines' or `scroll-bar-width' indicates that
a change of the corresponding frame parameter or Lisp variable
was requested. An entry like gui_figure_window_size indicates
that that C function was executed, an entry like ConfigureNotify
indicates that that event was received.
In long entries, a number in parentheses displays the INHIBIT
parameter passed to the C function adjust_frame_size. Such
entries may also display changes of frame rectangles in a form
like R=n1xn2~>n3xn4 where R denotes the rectangle type (TS for
text, NS for native and IS for inner frame rectangle sizes, all
in pixels, TC for text rectangle sizes in frame columns and
lines), n1 and n2 denote the old width and height and n3 and n4
the new width and height in the according units. MS stands for
the minimum inner frame size in pixels, IH and IV, if present,
indicate that resizing horizontally and/or vertically was
inhibited (either by `frame-inhibit-implied-resize' or because of
the frame's fullscreen state).
Shorter entries represent C functions that process width and
height changes of the native rectangle where PS stands for the
frame's present pixel width and height, XS for a requested pixel
width and height and DS for some earlier requested but so far
delayed pixel width and height.
Very short entries represent calls of C functions that do not
directly ask for size changes but may indirectly affect the size
of frames like calls to map a frame or change its visibility."
(let ((history (reverse frame-size-history))
entry item)
(setq frame (window-normalize-frame frame))
(with-current-buffer (get-buffer-create "*frame-size-history*")
(erase-buffer)
(insert (format "Frame size history of %s\n" frame))
(while (consp (setq entry (pop history)))
(setq item (car entry))
(cond
((not (consp item))
;; An item added quickly for debugging purposes.
(insert (format "%s\n" entry)))
((and (eq (nth 0 item) frame) (= (nth 1 item) 1))
;; Length 1 is a "plain event".
(insert (format "%s\n" (nth 2 item))))
((and (eq (nth 0 item) frame) (= (nth 1 item) 2))
;; Length 2 is an "extra" item.
(insert (format "%s" (nth 2 item)))
(setq item (nth 0 (cdr entry)))
(insert (format ", PS=%sx%s" (nth 0 item) (nth 1 item)))
(when (or (>= (nth 2 item) 0) (>= (nth 3 item) 0))
(insert (format ", XS=%sx%s" (nth 2 item) (nth 3 item))))
(setq item (nth 1 (cdr entry)))
(when (or (>= (nth 0 item) 0) (>= (nth 1 item) 0))
(insert (format ", DS=%sx%s" (nth 0 item) (nth 1 item))))
(insert "\n"))
((and (eq (nth 0 item) frame) (= (nth 1 item) 5))
;; Length 5 is an `adjust-frame-size' item.
(insert (format "%s (%s)" (nth 3 item) (nth 2 item)))
(setq item (nth 0 (cdr entry)))
(unless (and (= (nth 0 item) (nth 2 item))
(= (nth 1 item) (nth 3 item)))
(insert (format ", TS=%sx%s~>%sx%s"
(nth 0 item) (nth 1 item) (nth 2 item) (nth 3 item))))
(setq item (nth 1 (cdr entry)))
(unless (and (= (nth 0 item) (nth 2 item))
(= (nth 1 item) (nth 3 item)))
(insert (format ", TC=%sx%s~>%sx%s"
(nth 0 item) (nth 1 item) (nth 2 item) (nth 3 item))))
(setq item (nth 2 (cdr entry)))
(unless (and (= (nth 0 item) (nth 2 item))
(= (nth 1 item) (nth 3 item)))
(insert (format ", NS=%sx%s~>%sx%s"
(nth 0 item) (nth 1 item) (nth 2 item) (nth 3 item))))
(setq item (nth 3 (cdr entry)))
(unless (and (= (nth 0 item) (nth 2 item))
(= (nth 1 item) (nth 3 item)))
(insert (format ", IS=%sx%s~>%sx%s"
(nth 0 item) (nth 1 item) (nth 2 item) (nth 3 item))))
(setq item (nth 4 (cdr entry)))
(insert (format ", MS=%sx%s" (nth 0 item) (nth 1 item)))
(when (nth 2 item) (insert " IH"))
(when (nth 3 item) (insert " IV"))
(insert "\n")))))))