4

Is there some way to download and show a file from a URI/URL?

I now I can use wget and then open the downloaded file and I guess I could even try to write myself a small function to do this.

But most likely someone did before me so is there a function/package that will let me get a file from the internets (would be great if it did not save the file somewhere first) and open it in a new buffer?

11
M-x url-handler-mode
C-x C-f http://emacs.stackexchange.com/questions/21180/is-there-a-way-to-show-open-a-file-from-a-uri-url

This opens the HTML file of this stackexchange question in your Emacs.

  • 1
    yes nice - is there a way to combine this into a single command so I don't have to change the mode of some random buffer first? – Carsten Mar 23 '16 at 11:51
  • 3
    url-handler-mode is a global minor mode, not a major mode. Just put (url-handler-mode 1) into your init file. – phils Mar 23 '16 at 12:06
1

If you want the file "rendered", you can use the web browser eww - just do M-x eww RET url RET

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.