[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4617: Description of `buffer-swap-text' is vague and inadequate.
From: |
Alan Mackenzie |
Subject: |
bug#4617: Description of `buffer-swap-text' is vague and inadequate. |
Date: |
Fri, 2 Oct 2009 14:15:20 +0000 |
User-agent: |
Mutt/1.5.9i |
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).