【问题标题】:Is there a way to fix window buffer in emacs for cider error/repl有没有办法在 emacs 中修复 cider error/repl 的窗口缓冲区
【发布时间】:2015-06-02 15:27:22
【问题描述】:

使用 emacs 24.4,带有 clojure 模式和 cider-jack-in。每当我评估错误的异常时,错误缓冲区会随机替换任何其他屏幕分割中的缓冲区。现在我正在 init.el 中寻找一些配置,以帮助我配置如下内容:

  1. 选择Clojure模式/或我打开.clj file,cider-jack-in默认开始。
  2. 屏幕应该分成 4 个部分 1 个我打开的当前缓冲区/文件、1 个临时缓冲区、repl 和 clojure 错误消息缓冲区。

【问题讨论】:

标签: emacs configuration clojure cider


【解决方案1】:

我的初始化文件中有两个与类似要求相关的设置:

(add-to-list 'same-window-buffer-names "<em>nrepl</em>")

same-window-buffer-names 是 Emacs 的内置功能。

另一个是我使用的辅助函数,它利用粘性窗口扩展。

;; Toggle window dedication
(defun toggle-window-dedicated ()
  "Toggle whether the current active window is dedicated or not"
  (interactive)
  (message
   (if (let (window (get-buffer-window (current-buffer)))
         (set-window-dedicated-p window
                                 (not (window-dedicated-p window))))
       "Window '%s' is dedicated"
     "Window '%s' is normal")
   (current-buffer)))

这不是您问题的完整答案,但希望是一个好的起点:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-05
    • 1970-01-01
    • 2011-06-22
    • 2014-04-29
    • 2023-03-08
    相关资源
    最近更新 更多