all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: xraysmalevich@gmail.com
To: help-gnu-emacs@gnu.org
Subject: Re: clone buffer that is visiting a file
Date: Fri, 5 Sep 2008 06:44:49 -0700 (PDT)	[thread overview]
Message-ID: <5998615a-59da-4818-9b32-705b9f787067@25g2000prz.googlegroups.com> (raw)
In-Reply-To: mailman.18481.1220579126.18990.help-gnu-emacs@gnu.org

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


      parent reply	other threads:[~2008-09-05 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 12:55 clone buffer that is visiting a file xraysmalevich
2008-09-05  1:45 ` Kevin Rodgers
     [not found] ` <mailman.18481.1220579126.18990.help-gnu-emacs@gnu.org>
2008-09-05 13:44   ` xraysmalevich [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5998615a-59da-4818-9b32-705b9f787067@25g2000prz.googlegroups.com \
    --to=xraysmalevich@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.