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

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

bug#61102: closed (28.1; with-selected-window/save-window-excursion call


From: GNU bug Tracking System
Subject: bug#61102: closed (28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once)
Date: Thu, 02 Feb 2023 19:58:02 +0000

Your message dated Thu, 02 Feb 2023 21:56:56 +0200
with message-id <83bkmbx2lz.fsf@gnu.org>
and subject line Re: bug#61102: 28.1; 
with-selected-window/save-window-excursion calls buffer-list-update-hook only 
once
has caused the debbugs.gnu.org bug report #61102,
regarding 28.1; with-selected-window/save-window-excursion calls 
buffer-list-update-hook only once
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61102: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61102
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once Date: Fri, 27 Jan 2023 18:29:06 +0000
The following code:

--8<---------------cut here---------------start------------->8---

(let ((fn (lambda () (message "Buffer changed: %S" (current-buffer)))))
  (add-hook 'buffer-list-update-hook fn)
  (with-selected-window (minibuffer-window)  
    (save-window-excursion nil) nil)
  (remove-hook 'buffer-list-update-hook fn)
  nil)
  
--8<---------------cut here---------------end--------------->8---

Prints "Buffer changed: #<buffer  *Minibuf-0*>" once, even though the selection 
should return to the currently selected buffer (which is different from the 
mini-buffer).

I would expect either that the hook 'buffer-list-update-hook is not called at 
all, or that it is called twice (one time for every change of the selected 
buffer).

Best regards,
-- Al



--- End Message ---
--- Begin Message --- Subject: Re: bug#61102: 28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once Date: Thu, 02 Feb 2023 21:56:56 +0200
> Date: Thu, 2 Feb 2023 19:16:34 +0100
> Cc: abdo.haji.ali@gmail.com, 61102@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 
>  > So do you agree with me that there's no bug here?
> 
> Yes.

Thanks, I'm therefore closing this bug.  (The issue can still be
discussed even though the bug is closed.)


--- End Message ---

reply via email to

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