From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jpkotta Newsgroups: gmane.emacs.help Subject: Re: Opening a file from dired as OS would in Linux Date: Sat, 30 May 2009 11:25:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243708846 11499 80.91.229.12 (30 May 2009 18:40:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 May 2009 18:40:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 30 20:40:44 2009 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 1MATU3-0005kK-OR for geh-help-gnu-emacs@m.gmane.org; Sat, 30 May 2009 20:40:44 +0200 Original-Received: from localhost ([127.0.0.1]:49241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MATU3-0004yB-6g for geh-help-gnu-emacs@m.gmane.org; Sat, 30 May 2009 14:40:43 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!postnews.google.com!h23g2000vbc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: 96.18.60.209 Original-X-Trace: posting.google.com 1243707954 19252 127.0.0.1 (30 May 2009 18:25:54 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 30 May 2009 18:25:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h23g2000vbc.googlegroups.com; posting-host=96.18.60.209; posting-account=EwI0QQoAAADdqmqX_mVfawBNtwyks2YE User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (X11; Linux x86_64; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169603 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:64833 Archived-At: On May 29, 12:09=A0pm, David Vanderschel wrote: > I have this handy function in my .emacs for Emacs on Windows: > > ;; dired stuff to open files a la Windows from Howard Melman > (defun dired-execute-file (&optional arg) > =A0 (interactive "P") > =A0 (mapcar #'(lambda (file) > =A0 =A0 =A0 (w32-shell-execute "open" (convert-standard-filename file))) > =A0 =A0 =A0 =A0 =A0 (dired-get-marked-files nil arg))) > > I am now switching over to Ubuntu, and I do not know how to say the equiv= alent > of "(w32-shell-execute "open" ...". =A0But I would certainly like to be a= ble to > launch files from dired. =A0E.g., open this .PDF file in the viewer. =A0M= aybe it is > already there, but I have difficulty framing the question in an effective= way > for search. =A0Thanks for any pointers. This pretty much depends on which desktop environment/file manager you use. Some shell commands to look at are xdg-open, kfmclient exec, and gnome-open.