[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: writing a file to disc
From: |
rahed |
Subject: |
Re: writing a file to disc |
Date: |
Thu, 29 Nov 2007 08:59:27 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (windows-nt) |
Scott Frazer <frazer.scott@gmail.com> writes:
> My newsreader was acting funny, so sorry if this is a duplicate.
>
> (defun clone-file (filename)
> "Clone the current buffer and write it into FILENAME."
> (interactive "FClone to file: ")
> (let ((buffer-file-name nil))
> (kill-buffer (with-current-buffer (clone-buffer)
> (write-file filename (interactive-p))
> (current-buffer)))))
Thank you (and others).
--
Radek