unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12766: read-from-minibuffer does not preserve current-buffer
@ 2012-10-29 20:29 Stefan Monnier
  2012-10-30 10:27 ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2012-10-29 20:29 UTC (permalink / raw)
  To: 12766

Package: Emacs
Version: 24.2.50


% src/emacs -Q --eval "(setq initial-frame-alist '((minibuffer . nil)))"
M-: (with-temp-buffer (list (read-string "toto: ") (current-buffer))) RET

In Emacs 24.2 this always shows the current-buffer to be the temp buffer
(which is a killed buffer by the time M-: prints its result).
But in Emacs trunk, the result depends on whether you issue the M-:
from the normal frame (where it works right) or from the special
minibuffer-only frame, where current-buffer after read-string is
*minibuf-0*!

This is a serious problem, which introduces subtle bugs that can be
pretty difficult to track down.


        Stefan





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-11-10 11:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-29 20:29 bug#12766: read-from-minibuffer does not preserve current-buffer Stefan Monnier
2012-10-30 10:27 ` martin rudalics
2012-10-30 13:51   ` Stefan Monnier
2012-10-30 18:49     ` martin rudalics
2012-10-30 19:21       ` Stefan Monnier
2012-10-31 10:27         ` martin rudalics
2012-10-31 14:07           ` Stefan Monnier
2012-11-09  9:50         ` martin rudalics
2012-11-09 14:20           ` Stefan Monnier
2012-11-10 11:07             ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).