From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: elisp shell command for opening the current dir in OS Date: Mon, 8 Jun 2009 08:21:47 -0700 (PDT) Organization: http://groups.google.com Message-ID: <607143dd-cd00-46e5-b8aa-85d6cf37478d@37g2000yqp.googlegroups.com> 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 1244499548 16687 80.91.229.12 (8 Jun 2009 22:19:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2009 22:19:08 +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 Jun 09 00:19:06 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 1MDnBF-0006YA-Bq for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jun 2009 00:19:01 +0200 Original-Received: from localhost ([127.0.0.1]:48684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDnBE-0000BZ-Ml for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 18:19:00 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!37g2000yqp.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1244474507 9813 127.0.0.1 (8 Jun 2009 15:21:47 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 8 Jun 2009 15:21:47 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 37g2000yqp.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.30 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169819 X-Mailman-Approved-At: Mon, 08 Jun 2009 18:17:28 -0400 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:65061 Archived-At: On Jun 8, 7:25 am, rustom wrote: > On Jun 8, 7:10 pm, 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. > If you use w32-browser C-Ret does open and Alt-Ret does open explorerhttp= ://www.emacswiki.org/emacs/w32-browser.el Thanks rustom. That does it. (defun open-in-desktop () "Open the current file's folder in desktop." (interactive) (cond ((string-equal system-type "windows-nt") (w32-shell-execute "explore" ".")) ((string-equal system-type "darwin") (shell-command "open .")) ) ) btw, just curious, if anyone would mod the code so it works on linuxes too. Xah =E2=88=91 http://xahlee.org/ =E2=98=84