If I have a URL to a file (for example, this gist), what's the easiest way to fetch that file from Emacs and edit a copy of it? Is there a better option than M-! curl -n [insert URL here] RET
?
I'd consider an answer "better" if it didn't rely on an external facility, for instance. Also if it used the remote name of the file as the local file.
I could certainly script up a solution to this myself but it seems like a pretty normal thing to do—is there existing functionality to do this within Emacs? Is there a pre-existing package?
start-process
, save the file, and open it up in a buffer -- about 5 lines of code and you have yourself a custom function, perhaps a few additional lines to choose a name -- e.g., default is the file name, or edit the name to something different in the minibuffer, choose the location to save the file, etc.