all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: rustom <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: elisp shell command for opening the current dir in OS
Date: Mon, 8 Jun 2009 07:25:07 -0700 (PDT)	[thread overview]
Message-ID: <b68f5b23-e557-466f-b568-33af945ed5f7@q14g2000vbn.googlegroups.com> (raw)
In-Reply-To: b7372c59-20ec-4538-a350-a76426ca4e52@l12g2000yqo.googlegroups.com

On Jun 8, 7:10 pm, Xah Lee <xah...@gmail.com> 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 ()
>   "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
> ∑http://xahlee.org/
>
> ☄
If you use w32-browser C-Ret does open and Alt-Ret does open explorer
http://www.emacswiki.org/emacs/w32-browser.el


  reply	other threads:[~2009-06-08 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 14:10 elisp shell command for opening the current dir in OS Xah Lee
2009-06-08 14:25 ` rustom [this message]
2009-06-08 15:21   ` Xah Lee
2009-06-08 22:51     ` Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b68f5b23-e557-466f-b568-33af945ed5f7@q14g2000vbn.googlegroups.com \
    --to=rustompmody@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.