如何在 emacs 中指定一个用于打开新文件/缓冲区的窗口?
当我打开一个文件时,比如说使用o
命令,它会在一个新窗口中打开。但我希望这个文件在我指定的窗口中打开。
(defun dired-window () (window-at (frame-width) 1))
(eval-after-load 'dired
'(define-key dired-mode-map (kbd "o")
(lambda ()
(interactive)
(let ((dired-window (dired-window)))
(set-window-buffer dired-window
(find-file-noselect
(dired-get-file-for-visit)))
(select-window dired-window)))))