help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How can I make emacs open next directory in same window?


From: Arnaldo Mandel
Subject: RE: How can I make emacs open next directory in same window?
Date: Tue, 26 Aug 2008 12:24:57 -0300

cnb wrote (on Aug 26, 2008):
 > How can I make emacs open next directory in same window when I use the
 > mouse? Let's say I have 2 split windows and then I have the
 > directories open in one and a program ion the tiher. now if click the
 > folders they open in the program-window instead of the same window.
 > 

This works, you don't even need to point exactly at the filename:

(defun mouse-find-file (click)
  "Inspect the file the mouse is pointing at."
  (interactive "@e")
  (mouse-set-point click)
  (find-file (dired-get-filename)))

I bind it like this:

(define-key dired-mode-map [mouse-2] 'mouse-find-file)


am

-- 
Arnaldo Mandel                        
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]