emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#36497: closed (pop-to-buffer + quit-window negates


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#36497: closed (pop-to-buffer + quit-window negates with-current-buffer)
Date: Thu, 04 Jul 2019 19:35:02 +0000

Your message dated Thu, 4 Jul 2019 21:33:54 +0200
with message-id <CADwFkmkV+UvMWNsEyNqFJRUyC3YK=address@hidden>
and subject line Re: bug#36497: pop-to-buffer + quit-window negates 
with-current-buffer
has caused the debbugs.gnu.org bug report #36497,
regarding pop-to-buffer + quit-window negates with-current-buffer
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
36497: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36497
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: pop-to-buffer + quit-window negates with-current-buffer Date: Thu, 4 Jul 2019 14:22:28 +0200
Steps to reproduce:

0. Run emacs -Q
1. Evaluate the following in *scratch* buffer:

(with-current-buffer (get-buffer-create "foo")
  (pop-to-buffer (get-buffer-create "bar"))
  (quit-window)
  (current-buffer))

Result:
#<buffer *scratch*>

Expected result:
#<buffer foo>

Please find attached also a suggested test case for this bug.

In GNU Emacs 27.0.50 (build 3, x86_64-apple-darwin15.6.0, NS
appkit-1404.47 Version 10.11.6 (Build 15G22010))
 of 2019-07-04 built on Stefans-MBP
Repository revision: 5b48dab412c61980bca63a67a5d548d07e56b404
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1404
System Description:  Mac OS X 10.11.6

Attachment: with-current-buffer-test.diff
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#36497: pop-to-buffer + quit-window negates with-current-buffer Date: Thu, 4 Jul 2019 21:33:54 +0200
martin rudalics <address@hidden> writes:
> Both 'pop-to-buffer' and 'quit-window' may call 'select-window' which
> implicitly makes that window's buffer current.  In the case at hand,
> 'quit-window' deletes the window of *bar* since it didn't exist
> before, selects the window selected before 'pop-to-buffer' was called
> and makes that window's buffer current.  So the current behavior is
> the expected one.

Thanks for the detailed explanation -- that makes sense.

I'm closing the bug report.  Sorry about the noise.

Thanks,
Stefan Kangas


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]