How can I open a remote file over HTTP with Emacs?

2020-06-08 01:35发布

问题:

Most of the open source software around expose its code over some HTTP service. I would like to open and browse such code from Emacs, but AFAICS tramp only allows for ssh and ftp.

My first question is thus how to open an HTTP URL for reading from within Emacs. Then, the possibly more advanced question is how to do that from the shell and emacsclient.

How would you do it?

回答1:

M-x browse-url-emacs RET http... RET

You might need to use M-x normal-mode RET afterwards to set the appropriate mode for the buffer.



回答2:

There are two or three html viewers for emacs; I'd use emacs-w3m. If you want to edit something remote via HTTP(S), perhaps Tramp's dav external method will work for you.



标签: http emacs