all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6454: 24.0.50; kill-buffer switches current-buffer
@ 2010-06-18 11:10 Helmut Eller
  2010-06-18 12:19 ` martin rudalics
  2010-06-19 13:38 ` martin rudalics
  0 siblings, 2 replies; 20+ messages in thread
From: Helmut Eller @ 2010-06-18 11:10 UTC (permalink / raw)
  To: 6454

The third assertion in this code fails:

(eval-when-compile
  (require 'cl))  ; for assert

(let ((buffer (generate-new-buffer "test"))
      (saved-buffer (current-buffer)))
  (unwind-protect
      (with-current-buffer buffer
	(goto-line 1 buffer))
    (assert (and buffer (not (eq buffer (current-buffer)))))
    (assert (eq (current-buffer) saved-buffer) () "before kill-buffer")
    (kill-buffer buffer)
    (assert (eq (current-buffer) saved-buffer) () "after kill-buffer")))

Since the argument to kill-buffer is not the current-buffer, there's no
reason to switch that.  Seems like a bug to me.

Also note that if the buffer argument to goto-line is nil then
kill-buffer works as expected.

In GNU Emacs 24.0.50.5 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2010-06-12 on ix





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

end of thread, other threads:[~2011-09-23 10:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-18 11:10 bug#6454: 24.0.50; kill-buffer switches current-buffer Helmut Eller
2010-06-18 12:19 ` martin rudalics
2010-06-18 13:54   ` Stefan Monnier
2010-06-18 14:33     ` martin rudalics
2010-06-18 15:33       ` Stefan Monnier
2010-06-18 19:12         ` martin rudalics
2010-06-18 22:30           ` martin rudalics
2010-06-19 13:38 ` martin rudalics
2010-06-20  7:48   ` Helmut Eller
2010-06-20 10:42     ` martin rudalics
2010-06-20 18:00       ` Helmut Eller
2010-06-21 10:46         ` martin rudalics
2010-06-21 14:25           ` Helmut Eller
2010-06-21 15:49             ` martin rudalics
2010-06-21 16:19               ` Helmut Eller
2010-06-21 17:38                 ` martin rudalics
2011-09-21 20:44                   ` Lars Magne Ingebrigtsen
2011-09-22  7:07                     ` Helmut Eller
2011-09-23 10:56                       ` Lars Magne Ingebrigtsen
2010-06-24 23:07     ` Stefan Monnier

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.