From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#4617: Description of `buffer-swap-text' is vague and inadequate. Date: Fri, 2 Oct 2009 14:15:20 +0000 Message-ID: <20091002141520.GA7535@muc.de> References: <20091001094854.GB4599@muc.de> Reply-To: Alan Mackenzie , 4617@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254493652 5461 80.91.229.12 (2 Oct 2009 14:27:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2009 14:27:32 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 02 16:27:25 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mtj6Q-0002mg-Vt for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2009 16:27:23 +0200 Original-Received: from localhost ([127.0.0.1]:38890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtj6Q-00008i-Eb for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2009 10:27:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtj6K-000067-J3 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:27:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtj6F-0008Pt-Rw for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:27:16 -0400 Original-Received: from [199.232.76.173] (port=59946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtj6F-0008PH-5d for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:27:11 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34240) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mtj6E-0006Ti-Cm for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:27:10 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n92ER7mi000888; Fri, 2 Oct 2009 07:27:08 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n92EK4D6032021; Fri, 2 Oct 2009 07:20:04 -0700 Resent-Date: Fri, 2 Oct 2009 07:20:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Alan Mackenzie Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 02 Oct 2009 14:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4617 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125449269531130 (code B ref -1); Fri, 02 Oct 2009 14:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 2 Oct 2009 14:11:35 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n92EBXlg031127 for ; Fri, 2 Oct 2009 07:11:35 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtir6-0008D1-TK for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:11:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtir2-00081u-10 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:11:32 -0400 Original-Received: from [199.232.76.173] (port=47621 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtir1-00081a-OC for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:11:27 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:4136 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mtir1-00048c-86 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2009 10:11:27 -0400 Original-Received: (qmail 3645 invoked by uid 3782); 2 Oct 2009 14:11:23 -0000 Original-Received: from acm.muc.de (pD9E5205F.dip.t-dialin.net [217.229.32.95]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 02 Oct 2009 16:11:22 +0200 Original-Received: (qmail 7621 invoked by uid 1000); 2 Oct 2009 14:15:20 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 02 Oct 2009 10:27:15 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31637 Archived-At: Hi, Stefan, On Thu, Oct 01, 2009 at 09:56:00AM -0400, Stefan Monnier wrote: > > The Elisp manual page "Swapping Text", says that `buffer-swap-text' > > "swaps text between the current buffer and its argument BUFFER." > > This tells me nothing. I'd have to read the source (or maybe try it > > out) to find out what this function does. > > What does "swap" mean here? How much text is "swapped". What does > > "between" mean? > > A naive guess would suggest this command takes a bit of text out of > > buffer A and dumps it into buffer B, simultaneously moving a bit of B > > into A. > No, it swaps the whole freakin' text, including text-properties, > markers, and overlays. So at the end, buffer A has buffer B's text and > vice versa. Ah. OK, got you! I'll patch in a "the" sometime, to make it "swaps THE text between .....". But overlays? Overlays aren't part of the text (thought text-properties are). But this has probably been talked through anyway, some long time ago. Sounds like a brilliant idea, though - you could use this for several major modes in the same "buffer", somehow. > > There is also no entry in .../src/ChangeLog (or ChangeLog.10, ...) > > marking the introduction of this command. > grep disagrees: Apologies. I was grepping for "buffer-swap-text". > -- Stefan -- Alan Mackenzie (Nuremberg, Germany).