我正在尝试在全屏模式下使用 emacs 并使用合适的字体。我有一台基于 nvidia 的笔记本电脑,运行 Ubuntu。第一次加载时,字体很大,比如 16pt 字体。我使用菜单选项设置了合适的字体(8pt)。

现在,当我在全屏模式下运行 emacs 时,它会调整窗口以适应大字体,然后加载我的 8pt 字体。现在我的屏幕的一半是迷你缓冲区。如何正确设置字体以便可以使用全屏模式。

我尝试在我的 x 配置中指定显示大小,但 X 未启动。我听说你还需要为 nvidia 驱动程序做一些其他事情......但不确定这是如何运作的。

有帮助吗?

解决方案

我用下面的(从 http://www.emacswiki.org/emacs/FullScreen)在我的.emacs:

(defun toggle-fullscreen (&optional f)
  (interactive)
  (let ((current-value (frame-parameter nil 'fullscreen)))
    (set-frame-parameter nil 'fullscreen
                         (if (equal 'fullboth current-value)
                             (if (boundp 'old-fullscreen) old-fullscreen nil)
                           (progn (setq old-fullscreen current-value)
                                  'fullboth)))))

(global-set-key [f11] 'toggle-fullscreen)

;; Make new frames fullscreen by default. Note: this hook doesn't do
;; anything to the initial frame if it's in your .emacs, since that file is
;; read _after_ the initial frame is created.
(add-hook 'after-make-frame-functions 'toggle-fullscreen)

然后将F11开启/关闭全屏。

其他提示

这很困难,因为我无法在我的机器上复制这个问题。我只是添加 -fs ,它似乎有效。如果你只是想要更多的房地产......为您做这些工作:

  • 放弃菜单/工具栏
    • 添加 (menu-bar-mode 0)(tool-bar-mode 0) 到 .emacs
    • 启动并最大化
    • 你应该只拥有常规的 DE 框架,但没有其他东西
    • 使用以下命令从 emacs 切换 M-x menu-bar-modeM-x tool-bar-mode 如所须

  • 手动全屏emacs
    • 我可以启动 emacs,右键单击窗口栏并选择 xfce 全屏
    • 我设置了 F11 来执行此操作,但它似乎在 emacs 中不起作用(emacs 似乎尝试将其解释为键绑定,而不是将键传递给 DE)
    • 如果这有效,也许在你的 DE 中找到一个 emacs 不关心的绑定并正常最大化

  • 将两者结合起来
    • 我定期启动 emacs (/usr/bin/emacs)
    • 我禁用了工具栏模式和菜单栏模式
    • 我通过在窗口栏上单击鼠标右键手动全屏
    • 我明白了
    • 这是整个屏幕,而不仅仅是窗口内容的截图

你觉得这些想法怎么样?抱歉,我无法为 Ubuntu 和/或 nvidia 提供更多帮助。没有经验,如果无法重现问题就很困难!也许如果 emacs 定期为您启动,上述内容可以帮助您接近(或完全)实现您的期望。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top