all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: 12766@debbugs.gnu.org
Subject: bug#12766: read-from-minibuffer does not preserve current-buffer
Date: Mon, 29 Oct 2012 16:29:29 -0400	[thread overview]
Message-ID: <jwvhapdnhsm.fsf@faina.iro.umontreal.ca> (raw)

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





             reply	other threads:[~2012-10-29 20:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 20:29 Stefan Monnier [this message]
2012-10-30 10:27 ` bug#12766: read-from-minibuffer does not preserve current-buffer 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvhapdnhsm.fsf@faina.iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    --cc=12766@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.