GNU bug report logs - #16882
24.3.50; with-temp-buffer-window broken

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Tue, 25 Feb 2014 18:41:02 UTC

Severity: minor

Merged with 16816

Found in version 24.3.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 16882 <at> debbugs.gnu.org
Subject: bug#16882: 24.3.50; with-temp-buffer-window broken
Date: Fri, 28 Feb 2014 11:59:24 +0100
> Just a note on this: (Sorry to insist)
>
> You expect here the code of 'body' returns a stream like prin* function
> family does, but IMHO 'body' should be any code that is self
> contained in the "temp-buffer-window" and not elsewhere.
> IOW the actual version is not safe in this sens because it may affect
> the current-buffer.
> I suspect already existing code is affected by this new behavior.
>
> Try:
>
> (with-temp-buffer-window "foo" nil nil (princ "hello"))
>
> and now
>
> (with-temp-buffer-window "foo" nil nil (insert "hello"))
>
> I expect here "hello" to be inserted in "foo" buffer, but actually it
> corrupt current-buffer.

As the bug found by Juanma shows I was fooled by this myself.  It should
now behave again in your sense.  I still have to explain the behavior in
the manual.

Thanks, martin




This bug report was last modified 11 years and 67 days ago.

Previous Next


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