OSX:
La compilación de desarrollador de Emacs Trunk tiene una función llamada toggle-frame-maximized
, que se incluye en .../lisp/frame.el
. Esa función se puede agregar al after-init-hook
o emacs-startup-hook
, o simplemente se incluye en el archivo .emacs
que se carga al inicio. En OSX, aumenta tanto el ancho como la altura de una sola vez.
Windows XP:
El siguiente comando se puede utilizar después de un comando make-frame
, o después de Emacs genera la trama inicial.
(w32-send-sys-command 61488)
OSX y Windows
Aquí se muestra un ejemplo para ajustar el tamaño de la trama inicial y la ubicación - lo tengo cerca del comienzo de mi archivo .emacs
:
(let ((frame (selected-frame)))
(cond
((eq system-type 'darwin)
(setq ns-auto-hide-menu-bar t)
(set-frame-position frame 0 0) ;; must come after `ns-auto-hide-menu-bar`
(cond
((and
(= 1920 (display-pixel-width))
(= 1080 (display-pixel-height)))
(set-frame-size frame 1895 1054 t))
((and
(= 1920 (display-pixel-width))
(= 1200 (display-pixel-height)))
(set-frame-size frame 1895 1174 t))
((and
(= 1280 (display-pixel-width))
(= 800 (display-pixel-height)))
(set-frame-size frame 1265 774 t))))
((and
(eq system-type 'windows-nt)
(equal (w32-version) '(5 1 2600)))
;; (w32-send-sys-command #xf030)
(set-frame-position frame 0 0)
(cond
((and
(= 1920 (display-pixel-width))
(= 1003 (display-pixel-height)))
(set-frame-size frame 1898 924 t))
((and
(= 1920 (display-pixel-width))
(= 1123 (display-pixel-height)))
(set-frame-size frame 1876 1052 t))
((and
(= 1280 (display-pixel-width))
(= 723 (display-pixel-height)))
(set-frame-size frame 1250 670 t))))
((and
(eq system-type 'windows-nt)
(equal (w32-version) '(6 1 7601)))
(set-frame-position frame 0 0)
(cond
((and
(= 1920 (display-pixel-width))
(= 1080 (display-pixel-height)))
(set-frame-size frame 1890 1003 t))
(t
(message "Not yet contemplated."))))))
Aquí hay un ejemplo de lo que uso para crear nuevos cuadros: controlando el tamaño y la ubicación exactos:
(defun lawlist-make-frame (&optional alist)
(let ((frame (make-frame alist)))
(set-frame-position frame 0 0)
(cond
((eq system-type 'darwin)
(cond
((and
(= 1920 (display-pixel-width))
(= 1080 (display-pixel-height)))
(set-frame-size frame 1895 1054 t))
((and
(= 1920 (display-pixel-width))
(= 1200 (display-pixel-height)))
(set-frame-size frame 1895 1174 t))
((and
(= 1280 (display-pixel-width))
(= 800 (display-pixel-height)))
(set-frame-size frame 1265 774 t))))
((and
(eq system-type 'windows-nt)
(equal (w32-version) '(5 1 2600)))
(select-frame frame)
(cond
((and
(= 1920 (display-pixel-width))
(= 1003 (display-pixel-height)))
(set-frame-size frame 1898 924 t))
((and
(= 1920 (display-pixel-width))
(= 1123 (display-pixel-height)))
(set-frame-size frame 1876 1052 t))
((and
(= 1280 (display-pixel-width))
(= 723 (display-pixel-height)))
(set-frame-size frame 1250 670 t))))
((and
(eq system-type 'windows-nt)
(equal (w32-version) '(6 1 7601)))
(select-frame frame)
(cond
((and
(= 1920 (display-pixel-width))
(= 1080 (display-pixel-height)))
(set-frame-size frame 1890 1003 t))
(t
(message "Not yet contemplated.")))))))
¿Por qué no pones '-frame-alist' inicial o los correspondientes recursos' xrdb' a la geometría que desea en su lugar? Consulte http://stackoverflow.com/questions/92971/how-do-i-set-the-size-of-emacs-window para ver el código y los punteros. – tripleee
Quiero tener pantalla completa, la respuesta aceptada satisface mi necesidad. gracias por el enlace por cierto. – kindahero