GNU bug report logs - #4655
23.1.50; buffer-swap-text oddity

Previous Next

Package: emacs;

Reported by: Markus Rost <rost <at> math.uni-bielefeld.de>

Date: Tue, 6 Oct 2009 18:55:07 UTC

Severity: minor

Tags: patch

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Markus Rost <rost <at> math.uni-bielefeld.de>
Cc: 4655 <at> debbugs.gnu.org
Subject: Re: bug#4655: 23.1.50; buffer-swap-text oddity
Date: Wed, 7 Oct 2009 06:01:22 +0200
> (let ((bufA (get-buffer-create "A"))
>      (bufB (get-buffer-create "B")))
>  (set-buffer bufA)
>  (message "buffer-msg-1 %s" (current-buffer))
>  (save-excursion
>    (buffer-swap-text bufB))
>  (message "buffer-msg-2 %s" (current-buffer)))
>
> the *Messages* buffer contains
>
> buffer-msg-1 A
> buffer-msg-2 B
>
> With the save-excursion I would have expected the messages
>
> buffer-msg-1 A
> buffer-msg-2 A

Why "with the save-excursion"? I would expect A/A both with and
without it (and I'm quite surprised to find that it is not so).

Why do you expect buffer-swap-text to switch the current buffer? And,
why it is doing it?

    Juanma



This bug report was last modified 9 years and 28 days ago.

Previous Next


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