From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: rustom Newsgroups: gmane.emacs.help Subject: Re: elisp shell command for opening the current dir in OS Date: Mon, 8 Jun 2009 07:25:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1244473375 25921 80.91.229.12 (8 Jun 2009 15:02:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2009 15:02:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 08 17:02:53 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 1MDgNA-0000iR-1w for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 17:02:52 +0200 Original-Received: from localhost ([127.0.0.1]:49504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDgN9-00027e-Li for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 11:02:51 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!q14g2000vbn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: 220.225.70.2 Original-X-Trace: posting.google.com 1244471107 13083 127.0.0.1 (8 Jun 2009 14:25:07 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 8 Jun 2009 14:25:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q14g2000vbn.googlegroups.com; posting-host=220.225.70.2; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui User-Agent: G2/1.0 X-HTTP-Via: 1.1 PT-PROXY1, 1.1 PT-PROXY2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729), gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169816 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:65045 Archived-At: On Jun 8, 7:10=C2=A0pm, Xah Lee wrote: > how to get emacs on windows to open the current dir the OS's file > manager? > > on os x, i just do > (shell-command "open .") > > On Windows Vista, i tried > (shell-command "explorer .") > which does the job but freezes emacs in the background until the > folder is closed. > > I tried > (shell-command "explorer . &") > but that still leaves a running process. > This is annoying when you call shell command again, cause it'll ask > you if you want to kill previous instance. > > (shell-command "start explorer . ") > seems to invoke cmd-shell. > > Thanks. > > Here's the function i'm trying to write: > > (defun open-in-desktop () > =C2=A0 "Open the current file in desktop." > =C2=A0 (interactive) > =C2=A0 (let (cmdStr) > =C2=A0 =C2=A0 (cond > =C2=A0 =C2=A0 =C2=A0((string-equal system-type "windows-nt") (setq cmdStr= "explorer . > &")) > =C2=A0 =C2=A0 =C2=A0((string-equal system-type "darwin") (setq cmdStr "op= en .")) > =C2=A0 =C2=A0 =C2=A0) > =C2=A0 =C2=A0 (shell-command cmdStr) > =C2=A0 =C2=A0 ) > =C2=A0 ) > > =C2=A0 Xah > =E2=88=91http://xahlee.org/ > > =E2=98=84 If you use w32-browser C-Ret does open and Alt-Ret does open explorer http://www.emacswiki.org/emacs/w32-browser.el