From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: Browsing dirs from Dired with graphical explorer Date: Wed, 24 Sep 2008 19:28:26 +0200 Organization: A noiseless patient Spider Message-ID: References: <87tzc8k2eq.fsf@mundaneum.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222278058 21656 80.91.229.12 (24 Sep 2008 17:40:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 17:40:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 24 19:41:51 2008 connect(): Connection refused 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 1KiYMz-0007Ta-As for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 19:41:45 +0200 Original-Received: from localhost ([127.0.0.1]:52656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiYLx-0002tH-5t for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 13:40:41 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 76 Original-X-Trace: feeder.motzarella.org U2FsdGVkX18H0IcSvvCHpC5JeDlhqlL2PPXiNwyI7cuYZ1NHNWW0hqWPLGKetVoHeVofRrvlpDD8NGgO25Vn+rge4Q6ullMEwIniSS05Yv82mTlehyoF9PLu6n4i2YjDrXeOSja+BO5n/SlESMskQA== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Wed, 24 Sep 2008 17:27:43 +0000 (UTC) X-Auth-Sender: U2FsdGVkX18j8uSB5Uj9W/ugJw3G/nMuJ/iwqMSY/BzSZzWmQnSxIQ== Cancel-Lock: sha1:V5qvpuVWUXByD9o0L1fVAKp/iyc= User-Agent: Emacs 22.2.1/No Gnus v0.11 Original-Xref: news.stanford.edu gnu.emacs.help:162677 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:58019 Archived-At: Richard Riley writes: > Richard Riley writes: > >> Tassilo Horn writes: >> >>> Richard Riley writes: >>> >>> Hi Richard, >>> >>>> Hmm. No joy here on Debian. >>>> >>>> shell-command worked though but only for directories. For files the >>>> cursor sat spinning - possibly because the process was waiting for >>>> emacsclient to respond? >>> >>> I don't know. What happens if you eval? >>> >>> (start-process "dired-external" "*dired-external*" >>> "xdg-open" "http://www.freedesktop.org/") >>> >>> There should be some output in the *dired-external* buffer now. >> >> Yes : "Process dired-external finished". But nothing comes up. >> >>> >>> Hm, strange. This doesn't work here, too, and in *dired-external* >>> there's only "Process dired-external finished". If I replace "xdg-open" >>> with "conkeror" it'll start conkeror on freedesktop.org. >>> >>> xdg-open http://www.freedesktop.org/ >>> >>> in a terminal starts conkeror on freedesktop.org, too. I'm totally >>> stunned why this doesn't work from inside emacs. But >> >> its a relief you are seeing the same as me now :-; >> >> >>> >>> (start-process "dired-external" "*dired-external*" >>> "xdg-open" (getenv "HOME")) >> >> great! thanks! >> >>> >>> does work and open thunar in my HOME. > > > I spoke too soon. It does not work here... I just get > > Process dired-external finished > > again the buffer. One of the problems I had was opening files associated with emacs - it just hung as I was using emacs client. The solution was to have a "myedit" script: emacsclient -n "$@" And the code is now: (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 "/usr/bin/xdg-open" "http://www.freedesktop.org/") (shell-command (concat "xdg-open" " " fileobject)) ; (start-process-shell-command "xdg" nil "/usr/bin/xdg-open" "www.ibm.com") ) ) (define-key dired-mode-map (kbd "e") 'dired-open-externally) I still don't know why start-process should not work.