GNU bug report logs - #4617
Description of `buffer-swap-text' is vague and inadequate.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 2 Oct 2009 14:20:03 UTC

Severity: normal

Merged with 4605, 4608

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4617 in the body.
You can then email your comments to 4617 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4617; Package emacs. (Fri, 02 Oct 2009 14:20:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Mackenzie <acm <at> muc.de>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 02 Oct 2009 14:20:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: Description of `buffer-swap-text' is vague and inadequate.
Date: Fri, 2 Oct 2009 14:15:20 +0000
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).




Merged 4605 4608 4617. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 03 Oct 2009 00:25:15 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to Alan Mackenzie <acm <at> muc.de> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 27 Jan 2010 22:29:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <bug-gnu-emacs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 25 Feb 2010 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.