On 2011-11-12 00:25, Oleksandr Gavenko wrote:
I write:
(let (
(coding-system-for-read 'utf-8)
(coding-system-for-write 'utf-8)
)
(save-excursion
(find-file stmcrblog-file)
(beginning-of-buffer)
(insert
(format-time-string "%Y-%m-%d %H:%M" (current-time))
" " msg "\n")
(save-buffer)
(kill-buffer)
))
but afraid that this is not correct way to write to file without
splashing it
into to user...
How can i write to file in background in elisp?
You could try using:
(with-temp-buffer
(insert "foo")
(write-file "bar"))
I hope that helps!