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: elisp shell command for opening the current dir in OS Date: Mon, 8 Jun 2009 07:10:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: 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 1244499440 16369 80.91.229.12 (8 Jun 2009 22:17:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2009 22:17:20 +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:17:17 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 1MDn9W-0005tl-97 for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jun 2009 00:17:14 +0200 Original-Received: from localhost ([127.0.0.1]:47687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDn9V-0007Pt-M3 for geh-help-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 18:17:13 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!l12g2000yqo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1244470203 28692 127.0.0.1 (8 Jun 2009 14:10:03 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 8 Jun 2009 14:10:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l12g2000yqo.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:169814 X-Mailman-Approved-At: Mon, 08 Jun 2009 18:16:51 -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:65059 Archived-At: 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 () "Open the current file in desktop." (interactive) (let (cmdStr) (cond ((string-equal system-type "windows-nt") (setq cmdStr "explorer . &")) ((string-equal system-type "darwin") (setq cmdStr "open .")) ) (shell-command cmdStr) ) ) Xah =E2=88=91 http://xahlee.org/ =E2=98=84