在不活动期间隐藏Emacs回波区域 [英] Hide Emacs echo area during inactivity

查看:138
本文介绍了在不活动期间隐藏Emacs回波区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

回音区域是模式行下方Emacs底部的行:

The echo area is the line at the bottom of Emacs below the mode line:

                     ~                       ~
                     |                       |
                     +-----------------------+
                     |-U:--- mode-line       |
                     +-----------------------+
                     | M-x echo-area         |
                     +-----------------------+

现在,模式行是高度可定制的,而回声区域更加僵化(并且大部分时间未使用)。问题很简单:是否可以在不活动期间隐藏回声区域,一旦需要您注意,可以重新显示:

Now the mode line is highly customizable while the echo area is more rigid (and unused a lot of the time). The question is pretty simple: is it possible to hide the echo area during inactivity and redisplay it once it needs your attention:

  ~                       ~             ~                       ~
  |                       |             |                       |
  |                       |             +-----------------------+
  |                       |             |-U:--- mode-line       |
  +-----------------------+             +-----------------------+
  |-U:--- mode-line       |             | M-x echo-area         |
  +-----------------------+             +-----------------------+

          Inactive                                Active

这与Google的方式相似当您将鼠标悬停在链接上时,Chrome会显示网址,默认情况下隐藏命令行的Firefox addon Pentadactyl。

This is similar to the way Google Chrome displays URLs when you hover your mose over a link and the Firefox addon Pentadactyl where the command-line is hidden by default.

推荐答案

这不是你问的答案,它不会给你微型缓冲区,但它会回收一些屏幕的房地产。

This is NOT the answer to what you are asking, it will not give you the mini-buffer, but it will reclaim a bit of screen real estate

(defun toggle-mode-line () "toggles the modeline on and off"
  (interactive) 
  (setq mode-line-format
    (if (equal mode-line-format nil)
        (default-value 'mode-line-format)) )
  (redraw-display))

(global-set-key [M-f12] 'toggle-mode-line)

为了完整起见, luddite-mode

(global-set-key [f12] '(lambda () (interactive) (menu-bar-mode nil) (scroll-bar-mode nil)))

当然,最好从这开始:

(cond ((> emacs-major-version 20)
       (tool-bar-mode -1) ; introduced in emacs 21
       (menu-bar-mode -1)
       (scroll-bar-mode -1)
       (menu-bar-showhide-fringe-menu-customize-disable)
       (blink-cursor-mode -1)
       (windmove-default-keybindings 'meta)))

我将热切地等待这个问题的答案,并将其纳入 luddite-mode

I will eagerly be awaiting the answer to this question and incorporate it in luddite-mode

这篇关于在不活动期间隐藏Emacs回波区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆