unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: clone buffer that is visiting a file
Date: Thu, 04 Sep 2008 19:45:09 -0600	[thread overview]
Message-ID: <g9q2v1$7ef$1@ger.gmane.org> (raw)
In-Reply-To: <a619caba-bd1a-493a-a357-e90128d4cb7e@z11g2000prl.googlegroups.com>

xraysmalevich@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





  reply	other threads:[~2008-09-05  1:45 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 [this message]
     [not found] ` <mailman.18481.1220579126.18990.help-gnu-emacs@gnu.org>
2008-09-05 13:44   ` xraysmalevich

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='g9q2v1$7ef$1@ger.gmane.org' \
    --to=kevin.d.rodgers@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).