[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Open file at point with external program
From: |
Lennart Borgman |
Subject: |
Re: Open file at point with external program |
Date: |
Wed, 5 May 2010 02:24:44 +0200 |
On Mon, May 3, 2010 at 11:15 PM, Andreas Politz <politza@fh-trier.de> wrote:
> michael <mchls5714@googlemail.com> 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. I
> suppose this can also work with,e.g. ffap :
>
> (defun dired-open-file (arg)
> "Abuse org-open-file to open a file at point externally."
> (interactive "P")
> (require 'org)
> (require 'ffap)
> (org-open-file (or (ffap-guesser)
> (error "No filename at point"))
> arg))
There is also sex-mode.el in nXhtml for this.