[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Browsing dirs from Dired with graphical explorer
From: |
Richard Riley |
Subject: |
Re: Browsing dirs from Dired with graphical explorer |
Date: |
Mon, 22 Sep 2008 17:47:28 +0200 |
User-agent: |
Emacs 22.2.1/No Gnus v0.11 |
Tassilo Horn <tassilo@member.fsf.org> writes:
> 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.
Yes - I was being stupid - I thought you were referring to an elisp
function! :-;
>
>> 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.
>
> (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)))
>
> 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
If I "xdg-open ." from the command line it works great.
If I change xdg-open for nautilus in the code below it works. (Using
nautilus that is).
But using xdk-open there it does not work for me (debian). Does it work
on your Linux install?
-->-->--
(defun dired-open-externally ()
"Open the current directory in your OS's file manager."
(interactive)
(let ((fileobject (dired-get-file-for-visit)))
(start-process "dired-external" nil "xdg-open" fileobject)
(message "file is %s" fileobject)
)
)
(define-key dired-mode-map (kbd "e") 'dired-open-externally)
-->-->--
- Browsing dirs from Dired with graphical explorer, Sébastien Vauban, 2008/09/22
- Message not available
- Re: Browsing dirs from Dired with graphical explorer, Richard Riley, 2008/09/22
- Re: Browsing dirs from Dired with graphical explorer, Rupert Swarbrick, 2008/09/22
- Re: Browsing dirs from Dired with graphical explorer, Tassilo Horn, 2008/09/22
- Message not available
- Re: Browsing dirs from Dired with graphical explorer,
Richard Riley <=
- Re: Browsing dirs from Dired with graphical explorer, Tassilo Horn, 2008/09/22
- Message not available
- Re: Browsing dirs from Dired with graphical explorer, Richard Riley, 2008/09/22
- Re: Browsing dirs from Dired with graphical explorer, Tassilo Horn, 2008/09/23
- Message not available
- Re: Browsing dirs from Dired with graphical explorer, Richard Riley, 2008/09/23
- Re: Browsing dirs from Dired with graphical explorer, Richard Riley, 2008/09/23
- Re: Browsing dirs from Dired with graphical explorer, Richard Riley, 2008/09/24
Message not available
Message not available