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)))

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.