(defun write-string-to-file (str file) "Write STR to FILE. FILE is created if it doesn't exist, otherwise it is overwritten." (interactive "sstring: \nFfile: ") (with-temp-file file (insert str "\n") )) (provide 'file-write-to)