Created
March 9, 2013 20:59
-
-
Save Wilfred/5125727 to your computer and use it in GitHub Desktop.
file path to string in elisp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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