unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Xah Lee <xahlee@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: elisp shell command for opening the current dir in OS
Date: Tue, 9 Jun 2009 00:51:01 +0200	[thread overview]
Message-ID: <e01d8a50906081551k52dad62ap1f51cd3fe9ae10b6@mail.gmail.com> (raw)
In-Reply-To: <607143dd-cd00-46e5-b8aa-85d6cf37478d@37g2000yqp.googlegroups.com>

On Mon, Jun 8, 2009 at 5:21 PM, Xah Lee<xahlee@gmail.com> wrote:
> 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.


I am not sure where I left this, but did you try sex-mode (included in
nXhtml)? I think that I in the end for consistency used functions from
org-mode for opening files.

If sex-mode is on certain files will be opened in external
applications by Emacs when you do for example find-file. This should
work under both windows and GNU/Linux.




      reply	other threads:[~2009-06-08 22:51 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
2009-06-08 22:51     ` Lennart Borgman [this message]

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=e01d8a50906081551k52dad62ap1f51cd3fe9ae10b6@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xahlee@gmail.com \
    /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).