From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Documentation for "Clone Buffers" (corrected version) Date: Wed, 25 Feb 2004 10:15:48 +0000 (GMT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1077704126 6484 80.91.224.253 (25 Feb 2004 10:15:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2004 10:15:26 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Feb 25 11:15:18 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Avw4T-0003iE-00 for ; Wed, 25 Feb 2004 11:15:17 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Avw4T-0007f9-00 for ; Wed, 25 Feb 2004 11:15:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Avw4R-0005zj-0b for emacs-devel@quimby.gnus.org; Wed, 25 Feb 2004 05:15:15 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Avw3U-0005t9-Iz for emacs-devel@gnu.org; Wed, 25 Feb 2004 05:14:16 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Avw2w-0005Am-G8 for emacs-devel@gnu.org; Wed, 25 Feb 2004 05:14:14 -0500 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Avw2o-0004zZ-Lo for emacs-devel@gnu.org; Wed, 25 Feb 2004 05:13:35 -0500 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id KAA00594 for ; Wed, 25 Feb 2004 10:15:48 GMT X-Sender: root@acm.acm Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20178 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20178 Hi, guys! [Sorry, forgot to include the patch to emacs.texi. It's here now. Please ignore my previous post.] Currently, `clone-buffer' is not documented in the Emacs manual. The following patch fixes this. I've also tidied up and corrected the "Indirect Buffers" section a bit. In particular, creating an indirect buffer is _not_ a suitable way to get two indpendent *info* or *help* buffers. (At least, it isn't for me on Emacs 21.3.) Also "cloned buffer" is a most unfortunate term. It could refer to the buffer to which the process of cloning has just been applied (i.e. the original). It could equally well refer to the buffer just created by the process of cloning (i.e. the copy). I've purged it from buffers.texi. As a matter of interest, is there any reason why `clone-buffer' has no binding in the pertinent help keymaps (e.g. the one you get with C-h f )? It seems a bit inconsistent that you can use M-n on an info page, but not a help text. 2004-02-25 Alan Mackenzie * buffers.texi. New section "Cloning Buffers". Tidied up section "Indirect Buffers" * emacs.texi. Insert menu entry. *** buffers-1.26.texi Tue Feb 24 19:34:49 2004 --- buffers-1.26.acm.texi Wed Feb 25 09:50:41 2004 *************** *** 55,60 **** --- 55,61 ---- * Several Buffers:: How to go through the list of all buffers and operate variously on several of them. * Indirect Buffers:: An indirect buffer shares the text of another buffer. + * Cloning Buffers:: Cloning a buffer makes a copy of its text. * Buffer Convenience:: Convenience and customization features for buffer handling. @end menu *************** *** 438,445 **** @cindex base buffer An @dfn{indirect buffer} shares the text of some other buffer, which ! is called the @dfn{base buffer} of the indirect buffer. In some ways it ! is the analogue, for buffers, of a symbolic link between files. @table @kbd @findex make-indirect-buffer --- 439,448 ---- @cindex base buffer An @dfn{indirect buffer} shares the text of some other buffer, which ! is called the @dfn{base buffer} of the indirect buffer. In some ways ! it is the analogue, for buffers, of a symbolic link between files. (A ! clone buffer, by contrast, is a @emph{copy} of its original. ! @xref{Cloning Buffers}.) @table @kbd @findex make-indirect-buffer *************** *** 456,462 **** select it in another window (@code{clone-indirect-buffer-other-window}). @end table ! The text of the indirect buffer is always identical to the text of its base buffer; changes made by editing either one are visible immediately in the other. But in all other respects, the indirect buffer and its base buffer are completely separate. They have different names, --- 459,465 ---- select it in another window (@code{clone-indirect-buffer-other-window}). @end table ! The text of an indirect buffer is always identical to the text of its base buffer; changes made by editing either one are visible immediately in the other. But in all other respects, the indirect buffer and its base buffer are completely separate. They have different names, *************** *** 471,492 **** One way to use indirect buffers is to display multiple views of an outline. @xref{Outline Views}. - @cindex multiple @samp{*info*} and @samp{*Help*} buffers A quick and handy way to make an indirect buffer is with the command @kbd{M-x clone-indirect-buffer}. It creates and selects an indirect buffer whose base buffer is the current buffer. With a numeric argument, it prompts for the name of the indirect buffer; otherwise it defaults to the name of the current buffer, modifying it by adding a ! @samp{<@var{n}>} prefix if required. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window}) works like @kbd{M-x ! clone-indirect-buffer}, but it selects the cloned buffer in another ! window. These commands come in handy if you want to create new ! @samp{*info*} or @samp{*Help*} buffers, for example. ! ! The more general way is with the command @kbd{M-x ! make-indirect-buffer}. It creates an indirect buffer from buffer ! @var{base-buffer}, under the name @var{indirect-name}. It prompts for ! both @var{base-buffer} and @var{indirect-name} using the minibuffer. @node Buffer Convenience @section Convenience Features and Customization of Buffer Handling --- 474,527 ---- One way to use indirect buffers is to display multiple views of an outline. @xref{Outline Views}. A quick and handy way to make an indirect buffer is with the command @kbd{M-x clone-indirect-buffer}. It creates and selects an indirect buffer whose base buffer is the current buffer. With a numeric argument, it prompts for the name of the indirect buffer; otherwise it defaults to the name of the current buffer, modifying it by adding a ! @samp{<@var{n}>} suffix if required. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window}) works like @kbd{M-x ! clone-indirect-buffer}, but it selects the new buffer in another ! window. These commands are unsuitable for creating new @samp{*info*} ! or @samp{*Help*} buffers; instead, use @code{clone-buffer} to do this. ! @xref{Cloning Buffers}. ! ! The most general way to get an indirect buffer is with the command ! @kbd{M-x make-indirect-buffer}. It creates an indirect buffer from ! buffer @var{base-buffer}, under the name @var{indirect-name}. It ! prompts for both @var{base-buffer} and @var{indirect-name} using the ! minibuffer. ! ! @node Cloning Buffers ! @section Cloning Buffers ! @cindex clone buffer ! ! A @dfn{clone buffer} is one whose text is a copy of some other ! buffer's text. Buffers which are visiting files can't be cloned. ! ! @table @asis ! @item @kbd{M-n} (Info mode) or M-x clone-buffer @key{RET} ! @kindex M-n (Info mode) ! @findex clone-buffer ! Create a new buffer which is a clone of the current buffer, and select ! it in another window. ! @end table ! ! @cindex multiple @samp{*info*} and @samp{*Help*} buffers ! @code{clone-buffer} (@kbd{M-n} in Info Mode) creates a clone buffer, ! a distinct copy of the current buffer, and selects it in another ! window. If given a numeric argument, it prompts for the name of the ! new buffer. Otherwise, its name is formed by appending @samp{<1>} to ! the original buffer's name (or incrementing @var{n} if it already ends ! in @samp{<@var{n}>}). ! ! This command is the way to create a new @samp{*info*} or ! @samp{*Help*} buffer, so that you can look at two (or more) info pages ! or help texts at once. ! ! You cannot clone a buffer which is visiting a file, though you can ! create an indirect buffer which is a copy of it. @xref{Indirect ! Buffers}. @node Buffer Convenience @section Convenience Features and Customization of Buffer Handling *** emacs-1.77.texi Wed Feb 25 09:20:38 2004 --- emacs-1.77.acm.texi Wed Feb 25 09:23:37 2004 *************** *** 389,394 **** --- 389,395 ---- * Several Buffers:: How to go through the list of all buffers and operate variously on several of them. * Indirect Buffers:: An indirect buffer shares the text of another buffer. + * Cloning Buffers:: Cloning a buffer makes a copy of its text. Multiple Windows -- Alan Mackenzie (Munich, Germany)