all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#61102: 28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once
@ 2023-01-27 18:29 Al Haji-Ali
  2023-02-02 10:22 ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Al Haji-Ali @ 2023-01-27 18:29 UTC (permalink / raw)
  To: 61102


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





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

end of thread, other threads:[~2023-02-03 11:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-27 18:29 bug#61102: 28.1; with-selected-window/save-window-excursion calls buffer-list-update-hook only once Al Haji-Ali
2023-02-02 10:22 ` Eli Zaretskii
2023-02-02 15:04   ` martin rudalics
2023-02-02 17:06     ` Eli Zaretskii
2023-02-02 18:16       ` martin rudalics
2023-02-02 19:56         ` Eli Zaretskii
2023-02-02 17:08     ` Al Haji-Ali
2023-02-02 18:17       ` martin rudalics
2023-02-02 21:21         ` Al Haji-Ali
2023-02-03  8:33           ` martin rudalics
2023-02-03 11:49             ` Al Haji-Ali

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.