My emacs behave more or less the way I want using this common elisp bit:
(defun toggle-current-window-dedication ()
(interactive)
(let* ((window (selected-window))
(dedicated (window-dedicated-p window)))
(set-window-dedicated-p window (not dedicated))
(message "Window %sdedicated to %s"
(if dedicated "no longer " "")
(buffer-name))))
(global-set-key [pause] 'toggle-current-window-dedication)
Unfortunately, dired uses a directory for the name of the buffer, so selecting a window only dedicates it to this directory. When you move up or down, it opens a new buffer in a separate window. What I would like to do is to select the window in the main mode (in this case step-by-step), and all the new buffers that by default for this mode prefer this window. Is it possible?
source
share