From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arnaldo Mandel Newsgroups: gmane.emacs.help Subject: RE: How can I make emacs open next directory in same window? Date: Tue, 26 Aug 2008 12:24:57 -0300 Message-ID: <18612.8265.668406.941699@gargle.gargle.HOWL> References: <51649209-120e-4b90-b7f8-acc10be23221@e53g2000hsa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1219764511 23683 80.91.229.12 (26 Aug 2008 15:28:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2008 15:28:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 26 17:29:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KY0Ty-0006DT-LN for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Aug 2008 17:29:23 +0200 Original-Received: from localhost ([127.0.0.1]:50715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY0T0-0008D6-3E for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Aug 2008 11:28:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KY0Pn-0004j9-1Q for help-gnu-emacs@gnu.org; Tue, 26 Aug 2008 11:25:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KY0Pk-0004fI-Mb for help-gnu-emacs@gnu.org; Tue, 26 Aug 2008 11:25:02 -0400 Original-Received: from [199.232.76.173] (port=41796 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY0Pk-0004f9-CY for help-gnu-emacs@gnu.org; Tue, 26 Aug 2008 11:25:00 -0400 Original-Received: from hope.ime.usp.br ([143.107.45.8]:34475) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KY0Pj-0006IM-O6 for help-gnu-emacs@gnu.org; Tue, 26 Aug 2008 11:25:00 -0400 Original-Received: (qmail 17357 invoked from network); 26 Aug 2008 15:25:38 -0000 Original-Received: from galena.ime.usp.br (143.107.45.17) by hope.ime.usp.br with QMQP; 26 Aug 2008 15:25:38 -0000 Original-Newsgroups: gnu.emacs.help In-Reply-To: <51649209-120e-4b90-b7f8-acc10be23221@e53g2000hsa.googlegroups.com> X-Mailer: VM 7.19 under Emacs 21.2.2 Full-Name: Arnaldo Mandel X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57005 Archived-At: 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 am@ime.usp.br