From: Michael Heerdegen <michael_heerdegen@web.de>
To: dalanicolai <dalanicolai@gmail.com>
Cc: 54438@debbugs.gnu.org
Subject: bug#54438: 27.2; inconsistent-behavior-global-vs-local-hook
Date: Fri, 18 Mar 2022 01:42:21 +0100 [thread overview]
Message-ID: <871qz0m6qa.fsf@web.de> (raw)
In-Reply-To: <CACJP=3kQw8aOVnTEiBLvMF-kEVdP7TYNbMCWYjZSDz22bDv+6A@mail.gmail.com> (dalanicolai@gmail.com's message of "Thu, 17 Mar 2022 18:52:58 +0100")
dalanicolai <dalanicolai@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.
next prev parent reply other threads:[~2022-03-18 0:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 17:52 bug#54438: 27.2; inconsistent-behavior-global-vs-local-hook dalanicolai
2022-03-18 0:42 ` Michael Heerdegen [this message]
2022-03-18 8:37 ` martin rudalics
2022-03-18 9:11 ` dalanicolai
2022-03-18 9:12 ` dalanicolai
2022-03-18 9:58 ` martin rudalics
2022-03-18 12:14 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-18 17:03 ` dalanicolai
2022-03-18 8:36 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qz0m6qa.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=54438@debbugs.gnu.org \
--cc=dalanicolai@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).