2

I wrote this function to basically bring my cursor back to the dired buffer, after opening the file in another window. This is so that I can scroll down the buffer, pressing o to keep previewing the files in the directory. However, after the function is called, my cursor just stays at the other window, where the file has been opened.

 (defun tian-emacs-macros/dired-find-file-other-window ()
  (interactive)
  (save-excursion
    (dired-find-file-other-window)))
Drew
  • 75,699
  • 9
  • 109
  • 225
Tian
  • 288
  • 1
  • 8

1 Answers1

3

You don't need to write a custom function this time. You're looking for dired-display-file, bound to C-o.

aadcg
  • 1,203
  • 6
  • 13