Skip to content

Instantly share code, notes, and snippets.

@Wilfred
Created March 9, 2013 20:59
Show Gist options
  • Select an option

  • Save Wilfred/5125727 to your computer and use it in GitHub Desktop.

Select an option

Save Wilfred/5125727 to your computer and use it in GitHub Desktop.
file path to string in elisp
(defun open-file (path)
"Open the file PATH and return a string of its contents."
(with-temp-buffer
(insert-file-contents-literally path)
(buffer-substring (point-min) (point-max))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment