GNU bug report logs - #54438
27.2; inconsistent-behavior-global-vs-local-hook

Previous Next

Package: emacs;

Reported by: dalanicolai <dalanicolai <at> gmail.com>

Date: Thu, 17 Mar 2022 18:00:02 UTC

Severity: normal

Found in version 27.2

Full log


Message #8 received at 54438 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: dalanicolai <dalanicolai <at> gmail.com>
Cc: 54438 <at> debbugs.gnu.org
Subject: Re: bug#54438: 27.2; inconsistent-behavior-global-vs-local-hook
Date: Fri, 18 Mar 2022 01:42:21 +0100
dalanicolai <dalanicolai <at> gmail.com> writes:

> (defun pop-up ()
>   (pop-to-buffer "pop-up"))
>
> (defun test ()
>   (interactive)
>   (with-current-buffer (get-buffer-create "test")
>     (add-hook 'window-configuration-change-hook #'pop-up)))
>     ;; (add-hook 'window-configuration-change-hook #'pop-up nil t)
>
>     ;; the following line triggers the `pop-up` hook function
>     (pop-to-buffer "test")))

I think it's a bad idea to do something that changes the window
configuration in `window-configuration-change-hook'.  It's not
unexpected to get an infinite recursion or any other unpredictable
behavior.

Michael.




This bug report was last modified 3 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.