unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Browsing dirs from Dired with graphical explorer
Date: Mon, 22 Sep 2008 15:37:55 +0200	[thread overview]
Message-ID: <87skrsz4gc.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: gb81ks$ssr$1@registered.motzarella.org

Richard Riley <rileyrgdev@gmail.com> writes:

Hi Richard,

>> There's `xdg-open' which given a directory or file argument should
>> open it with the system's default application.
>
> Where is this defined? It does not exist on my debian system.

Here on Gentoo GNU/Linux it's in the xdg-utils package.

> Also would you know how to make "e" open the directory/file under the
> cursor? Your comments above indicate you thought this to be the case -
> it actually opens the current dir.

Ah, ok.  I wasn't too sure what `dired-current-directory' returns.

Assuming you have xdg-open installed, something like this might do the
trick.

--8<---------------cut here---------------start------------->8---
(defun dired-open-externally ()
  "Open the current directory in your OS's file manager."
  (interactive)
  (start-process "dired-external" nil "xdg-open" (dired-get-file-for-visit)))
--8<---------------cut here---------------end--------------->8---

Then the logic what application to use for opening the given file or
directory is inside xdg-open.  On GNU/Linux it takes these informations
from /etc/mailcap and ~/.mailcap, AFAICT.

Bye,
Tassilo





  parent reply	other threads:[~2008-09-22 13:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22  8:31 Browsing dirs from Dired with graphical explorer Sébastien Vauban
2008-09-22 10:04 ` Tassilo Horn
2008-09-22 12:45   ` Lennart Borgman (gmail)
     [not found]   ` <mailman.19685.1222087548.18990.help-gnu-emacs@gnu.org>
2008-09-22 12:58     ` Sébastien Vauban
     [not found] ` <mailman.19679.1222078001.18990.help-gnu-emacs@gnu.org>
2008-09-22 12:05   ` Richard Riley
2008-09-22 13:06     ` Rupert Swarbrick
2008-09-22 13:37     ` Tassilo Horn [this message]
     [not found]     ` <mailman.19686.1222090826.18990.help-gnu-emacs@gnu.org>
2008-09-22 15:47       ` Richard Riley
2008-09-22 19:15         ` Tassilo Horn
     [not found]         ` <mailman.19711.1222111115.18990.help-gnu-emacs@gnu.org>
2008-09-22 22:07           ` Richard Riley
2008-09-23  7:58             ` Tassilo Horn
     [not found]             ` <mailman.19745.1222156700.18990.help-gnu-emacs@gnu.org>
2008-09-23 11:58               ` Richard Riley
2008-09-23 12:00                 ` Richard Riley
2008-09-24 17:28                   ` Richard Riley
2008-09-22 12:55   ` Rupert Swarbrick
2008-09-22 13:13   ` Sébastien Vauban

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=87skrsz4gc.fsf@thinkpad.tsdh.de \
    --to=tassilo@member.fsf.org \
    --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).