From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: Open file at point with external program Date: Wed, 5 May 2010 02:24:44 +0200 Message-ID: References: <8cf09a85-9442-42b2-9f79-aac7789c6304@i10g2000yqh.googlegroups.com> <877hnksn3n.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1273073599 2051 80.91.229.12 (5 May 2010 15:33:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 15:33:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andreas Politz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 05 17:33:15 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O9gav-0005rX-Eb for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 17:33:09 +0200 Original-Received: from localhost ([127.0.0.1]:53358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9gar-0001t9-8D for geh-help-gnu-emacs@m.gmane.org; Wed, 05 May 2010 11:33:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9SQI-00074X-99 for help-gnu-emacs@gnu.org; Tue, 04 May 2010 20:25:10 -0400 Original-Received: from [140.186.70.92] (port=38964 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9SQG-00070Z-9T for help-gnu-emacs@gnu.org; Tue, 04 May 2010 20:25:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9SQD-00042y-5c for help-gnu-emacs@gnu.org; Tue, 04 May 2010 20:25:06 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:34808) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9SQC-00042m-WC for help-gnu-emacs@gnu.org; Tue, 04 May 2010 20:25:05 -0400 Original-Received: by fxm1 with SMTP id 1so3782661fxm.0 for ; Tue, 04 May 2010 17:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=hyzfFDjojATBmYfl0jIU0Bp82SQLcqMumXxfilfoDCg=; b=TLla4ymsCtLCtU6di/rBKcVqpXajf4M+3yhpPicNyN976RbZitzf7v/Wxmj76AEoRN h3WXDkOZEU9p2883s/NyluSGmakei/3TWAfRHwP5KJW48I0TKS9JsQoD9lVeyiyYGOGk tYZbBLbMv3xAX7DVzobj9MaFWCeS2Bsc/fwzo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=F7vVOWRYfCL8eOf4/WEgD6hznLXrRytvdEpudlToZh7rkXi7fD33NE4Jq7YZDbzfP3 graQszoYg6iaLRp9A7v+WDo37rD6yDmp95rsr5T8DtQvjyXGoPG8p2XuDbE5ALhBI/k3 EvauR9c29j7EkJ4nlCxlK0GOo0LWp3qjSSIJw= Original-Received: by 10.239.161.84 with SMTP id g20mr1663080hbd.200.1273019104100; Tue, 04 May 2010 17:25:04 -0700 (PDT) Original-Received: by 10.239.164.81 with HTTP; Tue, 4 May 2010 17:24:44 -0700 (PDT) In-Reply-To: <877hnksn3n.fsf@fh-trier.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:73460 Archived-At: On Mon, May 3, 2010 at 11:15 PM, Andreas Politz wrote= : > michael writes: > >> Hi, >> >> suppose I use emacs to edit a file which contains a path to a file, >> e.g. /path/to/file/file.pdf, suppose point is at the string /path/to/ >> file/file.pdf, is it possible to open file.pdf with a single command >> using an *external* program (e.g. gnome-open)? >> >> thanks, >> michael > > I abuse org-mode for doing this kind of thing in a dired-buffer. =C2=A0I > suppose this can also work with,e.g. ffap : > > (defun dired-open-file (arg) > =C2=A0"Abuse org-open-file to open a file at point externally." > =C2=A0(interactive "P") > =C2=A0(require 'org) > =C2=A0(require 'ffap) > =C2=A0(org-open-file (or (ffap-guesser) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (er= ror "No filename at point")) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 arg)) There is also sex-mode.el in nXhtml for this.