From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rupert Swarbrick Newsgroups: gmane.emacs.help Subject: Re: Browsing dirs from Dired with graphical explorer Date: Mon, 22 Sep 2008 14:06:15 +0100 Organization: albasani.net Message-ID: References: <87tzc8k2eq.fsf@mundaneum.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1222090924 32568 80.91.229.12 (22 Sep 2008 13:42:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2008 13:42:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 22 15:43:01 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Khlgr-0002xP-0f for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Sep 2008 15:43:01 +0200 Original-Received: from localhost ([127.0.0.1]:56906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Khlfo-0004Uo-DA for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Sep 2008 09:41:56 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 106 Original-X-Trace: news.albasani.net N+5G8LsRcts8NPs4POKopfqzDnlwK424P02QBK89+DDYnKul5+XkXnqMeYXIb4tBYXD79IiVCwC3SxvZMZtfi/Q1Gt79jrz9J9LcTc2RqzOtEHOdqkFzb1Hxje0uBhq+ Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Mon, 22 Sep 2008 13:06:23 +0000 (UTC) X-User-ID: sR+bZak3mu2zDSqCG66wlNn2VxVkWNhrPSye42ulkcg= Cancel-Lock: sha1:E8mkikrJil/TUYKyzdlxDIPcaHE= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) X-NNTP-Posting-Host: Xn0TvjvwbLnUI8bYehfJGfa5nYlSCC9EgUHptDFsAb8= Original-Xref: news.stanford.edu gnu.emacs.help:162554 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57896 Archived-At: --=-=-= Content-Transfer-Encoding: quoted-printable Richard Riley writes: >> >> 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. This may be a trifle OT but on my system: rupert@hake:~ dpkg -S xdg-open=20 xdg-utils: /usr/bin/xdg-open xdg-utils: /usr/share/man/man1/xdg-open.1.gz rupert@hake:~ apt-cache show xdg-utils Package: xdg-utils Priority: optional Section: utils Installed-Size: 256 Maintainer: Per Olofsson Architecture: all Version: 1.0.2-6 Recommends: iceweasel | www-browser, x11-utils, x11-xserver-utils, file, mi= me-support, shared-mime-info Suggests: desktop-file-utils, libgnome2-0, exo-utils, libgnomevfs2-bin, kde= libs4c2a, konqueror, libgtk2.0-bin Filename: pool/main/x/xdg-utils/xdg-utils_1.0.2-6_all.deb Size: 53260 MD5sum: a7185ac590bf72ee8c490e4fd7abeb65 SHA1: 0f6be668c7a92a9da3bb2e682135cb79781ffd57 SHA256: 1786908c1abf66841f44f384fed1eb1a875f0c2d36ffb45ff4fe48ad55205e84 Description: desktop integration utilities from freedesktop.org xdg-utils contains utilities for integrating applications with the desktop environment, regardless of which desktop environment is used. They are part of freedesktop.org's Portland project. . The following utilities are included: . * xdg-desktop-menu - Install desktop menu items * xdg-desktop-icon - Install icons on the user's desktop * xdg-icon-resource - Install icon resources * xdg-mime - Gather MIME information about a file * xdg-open - Open a URL in the user's preferred application that handles the respective URL or file type * xdg-email - Open the user's preferred email client, potentially with subject and other info filled in * xdg-screensaver - Enable, disable, or suspend the screensaver Homepage: http://portland.freedesktop.org/ Tag: devel::runtime, implemented-in::shell, interface::commandline, role::p= rogram, scope::utility Task: desktop rupert@hake:~=20 > > 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. > > e.g If I am in dired in ~, and the cursor is on .adobe (a dir) then > hitting e should open .adobe in nautilus in my case > I didn't know the answer for this either, so this is how I found out: I knew that hitting e in dired did what I wanted normally (ie worked out what directory to use), so first I did C-h c e when in dired and found that e was bound to dired-find-file. I then had a look at the source code for dired-find-file in dired.el (if you've got the sources installed, you can find it by doing C-h f dired-find-file and then hitting enter on the filename, otherwise try here [1]). The code is as follows: (defun dired-find-file () "In Dired, visit the file or directory named on this line." (interactive) ;; Bind `find-file-run-dired' so that the command works on directories ;; too, independent of the user's setting. (let ((find-file-run-dired t)) (find-file (dired-get-file-for-visit)))) So I'd go for (dired-get-file-for-visit). Rupert [1] http://cvs.savannah.gnu.org/viewvc/emacs/lisp/dired.el?revision=3D1.410= &root=3Demacs&view=3Dmarkup --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iJwEAQECAAYFAkjXmEcACgkQRtd/pJbYVoaB3gQAjIB7XwmPIzQPhAzI5AR6m4jv z/qqUA9qnzgfr9mNTpwQ0N3UNGW7QphpYohR2YhK5LLLFiWICV0P4lEKUoA989qM sjiZvusmQA41Vn84fPV6VMitce1f3X6owMOyKMcoKdW4w7/kQmMZv3rR1sZwkijX ErBfDr00JpZd6xdJ99c= =nXf3 -----END PGP SIGNATURE----- --=-=-=--