From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: escherdragon@gmail.com Newsgroups: gmane.emacs.help Subject: Re: Sunrise Commander: Version 3 released. Date: Wed, 18 Mar 2009 02:42:34 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7d4d510f-9b6d-4164-b494-5e2a7db10b9f@v15g2000yqn.googlegroups.com> References: <83101699-846a-45a0-9632-6c95a6c1a4d9@e3g2000vbe.googlegroups.com> <753c080b-d061-46cc-8c60-6fbe6a08934b@e1g2000pra.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237372864 5064 80.91.229.12 (18 Mar 2009 10:41:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Mar 2009 10:41:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 18 11:42:21 2009 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 1LjtDk-00025Q-CL for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 11:42:00 +0100 Original-Received: from localhost ([127.0.0.1]:53089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjtCO-00011x-3p for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Mar 2009 06:40:36 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v15g2000yqn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 69 Original-NNTP-Posting-Host: 62.111.135.130 Original-X-Trace: posting.google.com 1237369354 30938 127.0.0.1 (18 Mar 2009 09:42:34 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 18 Mar 2009 09:42:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v15g2000yqn.googlegroups.com; posting-host=62.111.135.130; posting-account=mkEKGAoAAACAV2vhv5r9WHXWqsdL_niD User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 Voyager:3128 (squid) Original-Xref: news.stanford.edu gnu.emacs.help:167746 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:63042 Archived-At: On Mar 18, 9:57 am, rustom wrote: (...) > This makes the command `op file' behave like double click in eshell > > So then I need to redefine dired-find-file thus: > > (defun dired-find-file () > (interactive) > (eshell/op (dired-get-file-for-visit)) > ) > > So some questions: > How do you put such a redefinition on a hook? (Needs to be defuned > after dired is require-d) > It needs to be more sophisticated: eg this way hitting return on a > directory opens windows explorer but it should probably open another > dired. More generally all the emacs-ish should stay in emacs with the > w32-shell-execute only used as a catch-all for files that emacs cant/ > shouldnt handle. Oh, once again I forgot point 0.5 :) 0.5) Get and install Markus Triska's openwith -- it will allow to open your files using external programs based on file extension. It can be found in the Emacs Wiki: http://www.emacswiki.org/emacs/OpenWith Isn't this solution good enough? I find it fantastic, but to be honest I haven't tried it on Windows. Another possibility for you rodent lovers ;-) would be to give dired- dd (http://www.asahi-net.or.jp/~pi9s-nnb/dired-dd-home.html) a try. Unfortunately it won't work right out of the box with sunrise, but after applying the following patch to dired-dd it does (I'm currently trying to get in contact with the author to have it included in the standard distribution of dired-dd): *************************** CUT HERE *************************** 1569c1569 < (if (not (eq major-mode 'dired-mode)) --- > (if (not (derived-mode-p 'dired-mode)) 1793c1793 < (if (eq 'dired-mode major-mode) --- > (if (derived-mode-p 'dired-mode) 1836c1836 < (if (setq target-diredp (eq 'dired-mode major-mode)) --- > (if (setq target-diredp (derived-mode-p 'dired-mode)) *************************** CUT HERE *************************** I could write a sunrise extension to make sunrise appear as clean dired to dired-dd (in fact I already have) but I think this direct modification of dired-dd is a more elegant solution. For a better effect add this to your .emacs file after requiring dired-dd: (setq dired-dd-find-file-method 'sr-advertised-find-file) Dired DD has all bells and whistles one can possibly imagine for the mouse (even assigning sounds to operations!) Cheers, -- Jos=E9 A. Romero L. escherdragon@gmail.com "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed)