How do I make this Emacs frame keep its buffer and not get resized?

前端 未结 4 1920
天涯浪人
天涯浪人 2020-12-03 02:59

My Emacs frame looks like this:

+---------------------------+
|             |             |
|             |             |
|             |      B      |
|             


        
4条回答
  •  离开以前
    2020-12-03 03:34

    One possibility is to dedicate the window to its buffer, using set-window-dedicated-p. This will not prevent the window from being resized manually, only protect it from being clobbered by display-buffer. For example,

    (add-hook 'shell-mode-hook
          (lambda ()
            (interactive)
            (set-window-dedicated-p (selected-window) 1)))
    

    Replace shell-mode-hook as necessary.

提交回复
热议问题