How do I set the size of Emacs' window?

前端 未结 10 1464
陌清茗
陌清茗 2020-12-04 06:19

I\'m trying to detect the size of the screen I\'m starting emacs on, and adjust the size and position the window it is starting in (I guess that\'s the frame in emacs-speak)

10条回答
  •  时光说笑
    2020-12-04 06:35

    Taken from: http://www.gnu.org/software/emacs/windows/old/faq4.html

    (setq default-frame-alist
          '((top . 200) (left . 400)
            (width . 80) (height . 40)
            (cursor-color . "white")
            (cursor-type . box)
            (foreground-color . "yellow")
            (background-color . "black")
            (font . "-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1")))
    
    (setq initial-frame-alist '((top . 10) (left . 30)))
    

    The first setting applies to all emacs frames including the first one that pops up when you start. The second setting adds additional attributes to the first frame. This is because it is sometimes nice to know the original frame that you start emacs in.

提交回复
热议问题