Skip to content

Instantly share code, notes, and snippets.

@hanabokuro
Created September 13, 2013 06:55
Show Gist options
  • Save hanabokuro/6547442 to your computer and use it in GitHub Desktop.
Save hanabokuro/6547442 to your computer and use it in GitHub Desktop.
elisp : fetch and save
(defun fetch-and-save (url filename)
(let (buffer)
(setq buffer (url-retrieve-synchronously url))
(switch-to-buffer buffer)
(goto-char (point-min))(search-forward "\n\n")(kill-region (point-min) (point)) ;; delete http headers
(write-file filename)
(kill-buffer buffer)
))
(fetch-and-save "https://github.com/emacs-jp/init-loader/raw/master/init-loader.el" "~/.emacs.d/site-lisp/init-loader.el")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment