From: Xah Lee <xahlee@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 08:21:47 -0700 (PDT) [thread overview]
Message-ID: <607143dd-cd00-46e5-b8aa-85d6cf37478d@37g2000yqp.googlegroups.com> (raw)
In-Reply-To: b68f5b23-e557-466f-b568-33af945ed5f7@q14g2000vbn.googlegroups.com
On Jun 8, 7:25 am, rustom <rustompm...@gmail.com> wrote:
> 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.
> 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
∑ http://xahlee.org/
☄
next prev parent reply other threads:[~2009-06-08 15:21 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
2009-06-08 15:21 ` Xah Lee [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=607143dd-cd00-46e5-b8aa-85d6cf37478d@37g2000yqp.googlegroups.com \
--to=xahlee@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).