From: Juri Linkov <juri@jurta.org>
Cc: lekktu@gmail.com, emacs-devel@gnu.org
Subject: with-current-buffer (was: fit-window-to-buffer)
Date: Mon, 27 Jun 2005 02:33:05 +0300 [thread overview]
Message-ID: <87aclcu3vy.fsf@jurta.org> (raw)
In-Reply-To: <E1Dlgre-0001WA-8W@fencepost.gnu.org> (Richard M. Stallman's message of "Fri, 24 Jun 2005 01:36:30 -0400")
There is a similar problem related to switching buffers using
`with-current-buffer' and co. I can't say if it's a bug or not.
For example, `next-error' after finishing has the current
buffer reported by (current-buffer) not the same as the buffer
where the point eventually lands. This problem in `next-error'
can be narrowed to the following code:
(progn (get-buffer-create "a")
(get-buffer-create "b")
(get-buffer-create "c"))
(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"?
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2005-06-26 23:33 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 ` Juri Linkov [this message]
2005-06-27 6:28 ` with-current-buffer (was: fit-window-to-buffer) 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 ` with-current-buffer (was: fit-window-to-buffer) Richard M. Stallman
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=87aclcu3vy.fsf@jurta.org \
--to=juri@jurta.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.