help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clone buffer that is visiting a file


From: xraysmalevich
Subject: Re: clone buffer that is visiting a file
Date: Fri, 5 Sep 2008 06:44:49 -0700 (PDT)
User-agent: G2/1.0

On Sep 4, 9:45 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> xraysmalev...@gmail.com wrote:
> > If you try to run clone-buffer on a file-visiting buffer, it won't
> > happen, and you get the error message "Cannot clone a file-visiting
> > buffer."
>
> > I think I understand why -- if you clone a file-visiting buffer, both
> > buffers are visiting the same file -- and this is more a situation for
> > an indirect buffer. Is this correct?
>
> > But what about situations where you want the entire text of the file-
> > visiting buffer, the same major mode, but not have it be visiting a
> > file? Is there any easier way to do this other than copying the entire
> > buffer and starting from scratch?
>
> Why don't you want the new buffer to be visiting a (different/temporary)
> file?  Depending on that, this might suit you:
>
> http://lists.gnu.org/archive/html/help-gnu-emacs/2007-11/msg00678.html
>
> --
> Kevin Rodgers
> Denver, Colorado, USA

I'll look into that. Mainly, though, I'm looking at extracting some
information from the original file, without modifying it. There's no
need to save the resulting data-set. I suppose I should look into a
save-excursion and reducing it to what I want, then reverting.
Nervously, I preferred to copy the whole thing somewhere else, then
get down to business.

--the Other michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]