简体   繁体   English

有没有办法在emacs中修复窗口缓冲区以获取苹果酒错误/ repl

[英]Is there a way to fix window buffer in emacs for cider error/repl

Using emacs 24.4, with clojure mode and cider-jack-in . 使用emacs 24.4,使用clojure模式和cider-jack-in Anytime I evaluate a wrong exception the error buffer randomly replaces buffers in any other screen splits. 无论何时我评估错误的异常,错误缓冲区都会随机替换任何其他屏幕分割中的缓冲区。 Now I am looking for some configuration in init.el which help me to configure something like this: 现在我在init.el中寻找一些配置,这有助于我配置这样的东西:

  1. When clojure mode is selected/or I opened a .clj file, cider-jack-in started by default. 当选择了clojure模式/或者我打开了.clj文件时,默认情况下启动cider-jack-in
  2. The screen should split in 4 parts 1 current buffer/file i opened, 1 more scratch buffer, repl and clojure error msg buffer. 屏幕应分为4个部分1个当前缓冲区/文件我打开,1个临时缓冲区,repl和clojure错误消息缓冲区。

I have two settings in my init files related to similar requirement: 我的init文件中有两个与类似要求相关的设置:

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

same-window-buffer-names is a built-in feature of Emacs. same-window-buffer-names是Emacs的内置功能。

The other one is a helper function I use that harnesses the sticky-windows extension. 另一个是我使用的辅助函数,它利用了sticky-windows扩展。

;; 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)))

It's not a full answer to your question, but hopefully a good starting point :) 这不是你问题的完整答案,但希望是一个很好的起点:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM