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


Message #24 received at 16882 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 16882 <at> debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: Re: bug#16882: 24.3.50; with-temp-buffer-window broken
Date: Fri, 28 Feb 2014 08:20:44 +0100
martin rudalics <rudalics <at> gmx.at> 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 





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.