[英]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中寻找一些配置,这有助于我配置这样的东西:
.clj
file, cider-jack-in
started by default. 当选择了clojure模式/或者我打开了.clj
文件时,默认情况下启动cider-jack-in
。 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.