From: "Richard M. Stallman" <rms@gnu.org>
Cc: lekktu@gmail.com, emacs-devel@gnu.org
Subject: Re: with-current-buffer (was: fit-window-to-buffer)
Date: Mon, 27 Jun 2005 12:46:18 -0400 [thread overview]
Message-ID: <E1DmwkU-0005IZ-4R@fencepost.gnu.org> (raw)
In-Reply-To: <87aclcu3vy.fsf@jurta.org> (message from Juri Linkov on Mon, 27 Jun 2005 02:33:05 +0300)
(defun test ()
(interactive)
(set-buffer "a")
(with-current-buffer "c"
(pop-to-buffer "b"))
(message "%s" (buffer-name (current-buffer))))
(test)
At the end, it print "a" as the current buffer name, but actually
this command makes the buffer "b" current. Shouldn't it print "b"?
with-current-buffer is supposed to restore the previous current buffer.
That is buffer a.
This command does not make buffer b current. However, the main loop
does that, because b is the selected window's buffer.
The results are correct; I see no bug here.
prev parent reply other threads:[~2005-06-27 16:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-24 5:36 fit-window-to-buffer Richard M. Stallman
2005-06-24 8:21 ` fit-window-to-buffer Juanma Barranquero
2005-06-26 23:33 ` with-current-buffer (was: fit-window-to-buffer) Juri Linkov
2005-06-27 6:28 ` Miles Bader
2005-06-28 0:04 ` with-current-buffer Juri Linkov
2005-06-28 17:28 ` with-current-buffer Kevin Rodgers
2005-06-29 3:45 ` with-current-buffer Stefan Monnier
2005-06-29 17:45 ` with-current-buffer Kevin Rodgers
2005-06-28 18:47 ` with-current-buffer Richard M. Stallman
2005-06-28 23:52 ` next-error-hook (was: with-current-buffer) Juri Linkov
2005-06-27 16:46 ` Richard M. Stallman [this message]
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=E1DmwkU-0005IZ-4R@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/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.