Subject: Re: bug#16882: 24.3.50; with-temp-buffer-window broken

From: Thierry Volpiatto <[email-masked]>
Date: Fri, 28 Feb 2014 08:20:44 +0100

martin rudalics <[email-masked]> writes:

> The idea is that from Emacs' POV the temporary buffer
> doesn't exist unless you consider standard output part of that view.

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.

-- 
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997