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

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

Re: URL Browsing Behaviour with find-file-at-point()


From: Stefan Reichör
Subject: Re: URL Browsing Behaviour with find-file-at-point()
Date: Tue, 10 Jul 2007 22:15:11 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Nordlöw <per.nordlow@gmail.com> writes:

> Hello again, Hackers
>
> Browsing an URL such as http://www.xsteve.at/prg/emacs/psvn.el
> with the command find-file-at-point() opens the file in my web
> browser.
> It would like this command to open all URLs matching auto-mode-alist
> directly in an Emacs instead. How can I achieve this?

Hm. Since you did some advertisement for my homepage, I will try to help you ;-)

You could use the emacs-wget interface:
http://pop-club.hp.infoseek.co.jp/emacs/emacs-wget/
http://pop-club.hp.infoseek.co.jp/emacs/emacs-wget/USAGE

The just type M-x wget RET

The file is downloaded to the folder ~/download

I have added the the following customization to open the downloaded file:

(defun wget-open-downloaded-file ()
  (let* ((dir  (cdr (assoc proc wget-process-dir-alist)))
         (file (or (cdr (assoc proc wget-process-saved-alist))
                   (wget-process-file-name proc)))
         (full-file-name (expand-file-name file dir)))
    (message "downloaded %s" full-file-name)
    (find-file full-file-name)))
       
(add-hook 'wget-after-hook 'wget-open-downloaded-file)


Stefan.


reply via email to

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