문제

Is there any way to set some windows non visitable in emacs?

For example, in gdb show-many-windows view, I dont want to switch to local variables window or stack window every time.

도움이 되었습니까?

해결책

C-x o is set to other-window. It is notoriously hard to customize, but here you go: It respects the window parameter 'no-other-window. Your goal will be to do (set-window-parameter gdb-window 'no-other-window t). Now, the only part that remains is to hook us into gud and set those properties on the windows.

A good start is

(defun make-selected-window-unselectable ()
  (interactive)
  (set-window-parameter (selected-window) 'no-other-window t))
(global-set-key "\M-p" 'make-selected-window-unselectable)

Someone will probably haggle about the name, as the window is not truly unselectable, but it will make do.

다른 팁

Instead of trying to customize other-window you could try using WindMove which enables frame navigation by direction.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top