help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Browsing dirs from Dired with graphical explorer


From: Sébastien Vauban
Subject: Browsing dirs from Dired with graphical explorer
Date: Mon, 22 Sep 2008 10:31:09 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

Hello,

I would like some help with a snippet of code I've merged from
different sources:

--8<---------------cut here---------------start------------->8---
(defun my-browse-dir (dir-as-string)
  "Open the current directory in your OS's file manager."
  (interactive)
  (let ((file-manager
         (cond (running-ms-windows "explorer")
               (t "/usr/lib/kde4/bin/dolphin"))))
                  ;; `nautilus --no-desktop' or `gnome-open'
    (start-process-shell-command "browse"
                                 "*scratch*"
                                 (concat file-manager " " dir-as-string))))
--8<---------------cut here---------------end--------------->8---

I'd like to use that when in Dired mode: to be able to launch
the graphical file browser from the underlying OS.

My problem is: how to pass the current directory argument?

Next question: is there somehow a way not to be forced to
explicitly give the path to all possible executables under
Linux?  Some way to launch the file browser like with a `start'
or `open' command?

Best regards,
  Seb

-- 
Sébastien Vauban


reply via email to

[Prev in Thread] Current Thread [Next in Thread]