【问题标题】:Set emacs window width equals to LCD's width设置emacs窗口宽度等于LCD的宽度
【发布时间】:2014-08-16 03:03:07
【问题描述】:

我想改变emacs的宽度,使其适合LCD的宽度。

【问题讨论】:

标签: emacs


【解决方案1】:

除了@lawlist 在他的评论中发布的线程中的详细信息之外,获得全宽的最简单方法是相应地设置框架参数。以下将做到这一点:

(set-frame-parameter (selected-frame) 'fullscreen 'fullwidth)

但是,要在启动时自动发生这种情况,您应该在 initial-frame-alist 文件中的某个位置设置参数:

(setq initial-frame-alist
      '((fullscreen . fullwidth)))

【讨论】:

    【解决方案2】:

    除了@lawlist 在评论中提到的线程中给出的elisp 方法之外,您还可以在~/.Xdefaults 文件中设置emacs 几何,例如:

    Emacs.geometry: 100x29+-2+-2
    

    这四个数字代表左上角的宽度、高度和位置(可选) 现在只需运行xrdb ~/.Xdefaults,从现在开始,emacs 将始终以这个几何图形开始。

    .Xdefaults 方法的好处是您可以在一处为不同程序设置参数(不仅是几何),但使用类似的语法,例如

    ! geometry
    Emacs.geometry: 100x29
    xpdf.geometry:  80x25
    xterm*geometry: 70x20
    
    ! foreground color
    Emacs*foreground: white
    xpdf*foreground: black
    xterm*foreground: light grey
    
    ! background
    Emacs*background: #445566
    xpdf*background:  white
    xterm*background: #262729
    
    ! other stuff
    xterm*toolBar:            true
    xpdf*urlCommand:          /usr/bin/firefox %s
    

    【讨论】:

      猜你喜欢
      • 2013-06-03
      • 2014-01-12
      • 2020-06-11
      • 1970-01-01
      • 2016-04-01
      • 1970-01-01
      • 2013-01-20
      • 1970-01-01
      • 2014-05-29
      相关资源
      最近更新 更多