all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rupert Swarbrick <rswarbrick@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Browsing dirs from Dired with graphical explorer
Date: Mon, 22 Sep 2008 14:06:15 +0100	[thread overview]
Message-ID: <gb858b$6su$2@news.albasani.net> (raw)
In-Reply-To: gb81ks$ssr$1@registered.motzarella.org

[-- Attachment #1: Type: text/plain, Size: 3359 bytes --]

Richard Riley <rileyrgdev@gmail.com> 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 
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 <pelle@debian.org>
Architecture: all
Version: 1.0.2-6
Recommends: iceweasel | www-browser, x11-utils, x11-xserver-utils, file, mime-support, shared-mime-info
Suggests: desktop-file-utils, libgnome2-0, exo-utils, libgnomevfs2-bin, kdelibs4c2a, 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::program, scope::utility
Task: desktop

rupert@hake:~ 

>
> 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=1.410&root=emacs&view=markup

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

  reply	other threads:[~2008-09-22 13:06 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 [this message]
2008-09-22 13:37     ` Tassilo Horn
     [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gb858b$6su$2@news.albasani.net' \
    --to=rswarbrick@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.