From: rahed <raherh@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: writing a file to disc
Date: Thu, 29 Nov 2007 08:59:27 +0100 [thread overview]
Message-ID: <u1wa9trc0.fsf@gmail.com> (raw)
In-Reply-To: 21c50cdb-4ee0-4796-9cfb-cca2adc89b9d@e23g2000prf.googlegroups.com
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
next prev parent reply other threads:[~2007-11-29 7:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 13:17 writing a file to disc rahed
2007-11-28 14:30 ` Peter Dyballa
2007-11-28 15:56 ` Kevin Rodgers
2007-11-28 18:32 ` rahed
[not found] ` <mailman.4266.1196275142.18990.help-gnu-emacs@gnu.org>
2007-11-28 21:02 ` Scott Frazer
2007-11-29 7:59 ` rahed [this message]
[not found] ` <mailman.4255.1196265534.18990.help-gnu-emacs@gnu.org>
2007-11-29 1:01 ` Johan Bockgård
[not found] <mailman.4235.1196255887.18990.help-gnu-emacs@gnu.org>
2007-11-30 17:02 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1wa9trc0.fsf@gmail.com \
--to=raherh@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).