From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Run `window-configuration-change-hook` in Lisp code? Date: Fri, 08 Nov 2024 12:55:01 -0500 Message-ID: References: <86ttckxian.fsf@fastmail.fm> <5193f2dd-05ca-4a92-a3f9-2a069b8ad72e@jamescherti.com> <86h68hzsfj.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37729"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier via Users list for the GNU Emacs text editor To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 08 18:55:40 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t9TCt-0009gi-Sh for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Nov 2024 18:55:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9TCP-0008UO-8i; Fri, 08 Nov 2024 12:55:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9TCO-0008UG-8N for help-gnu-emacs@gnu.org; Fri, 08 Nov 2024 12:55:08 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9TCM-0001Gy-5u for help-gnu-emacs@gnu.org; Fri, 08 Nov 2024 12:55:07 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2D750100755; Fri, 8 Nov 2024 12:55:03 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731088502; bh=xFOaJ3k52iTa7cfGt8XD+HmPuGbhdWQa+PlOtaJMu5w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=opuOuX7dpXb9FAhqVe3QhhYMYKYfBjQEZLWsskwZqJG8ZhtqxFaglAiErDgtbq1iU CZdeNpf8Y061Wl+FnX3nhULPNnQII5/7U5dE0Bt/4IGOR2lacWu/ghZ5eZOamtk1mU B+wL1vbI9vUsW6mANw/r+tgYaAUPT6MGwODOOfd8Opnz1ZsFR8EghaBzFmVs+ujw/N mo2kPUKs6LpzTllhY86CrFOHoYXzFsaws10Zo4J4hmGKP+DRnBrEYl5Dg2JbQoO7WM ZJ2xaBWhCqmUiZl0gBY7Gsake/mPOX3aWVqOOj/rhpiubFZoyaUXTuEPNJcAXhGFPK p3z/+zNHPytlQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 69A8E1001D9; Fri, 8 Nov 2024 12:55:02 -0500 (EST) Original-Received: from asado (bras-base-mtrlpq0776w-grc-08-184-145-223-228.dsl.bell.ca [184.145.223.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5DAE11202BB; Fri, 8 Nov 2024 12:55:02 -0500 (EST) In-Reply-To: <86h68hzsfj.fsf@fastmail.fm> (Joost Kremers's message of "Fri, 08 Nov 2024 15:55:12 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148289 Archived-At: >> Then again, looking at that patch I can't understand why it would work. >> Does it work? If so how? That code is run only when `visual-fill-mode` >> is enabled, AFAICT, > Yes, but that's the point. When `visual-fill-column-mode` is active, a > change in text size should trigger a recalculation of the window margins by > `visual-fill-column-mode`. But the code is not run when the mode is active but when the mode is being activated. So I don't see how the patch helps: the previous code already called the relevant function in that case, AFAICT the new code just runs it N times redundantly (by running the N hooks on which we register that same function). Stefan