From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21333: 25.0.50; window-size-change-functions not called after mini-window resize Date: Mon, 24 Aug 2015 17:35:46 +0300 Message-ID: <83k2skhhz1.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1440432976 10397 80.91.229.3 (24 Aug 2015 16:16:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Aug 2015 16:16:16 +0000 (UTC) Cc: 21333@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 24 18:16:05 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZTuPk-0006vO-OQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 18:16:05 +0200 Original-Received: from localhost ([::1]:54915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTuPk-0007fx-8P for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Aug 2015 12:16:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTssx-00035k-H2 for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 10:38:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTsss-0006OP-HP for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 10:38:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTsss-0006OG-Eq for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 10:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZTsss-0008DU-1A for bug-gnu-emacs@gnu.org; Mon, 24 Aug 2015 10:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Aug 2015 14:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21333 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21333-submit@debbugs.gnu.org id=B21333.144042702231506 (code B ref 21333); Mon, 24 Aug 2015 14:38:01 +0000 Original-Received: (at 21333) by debbugs.gnu.org; 24 Aug 2015 14:37:02 +0000 Original-Received: from localhost ([127.0.0.1]:37054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTsrs-0008Bt-TU for submit@debbugs.gnu.org; Mon, 24 Aug 2015 10:37:01 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:33498) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZTsrp-0008Bj-V4 for 21333@debbugs.gnu.org; Mon, 24 Aug 2015 10:36:59 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NTL00L00BYXWC00@mtaout24.012.net.il> for 21333@debbugs.gnu.org; Mon, 24 Aug 2015 17:28:00 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTL00GTYC6OP660@mtaout24.012.net.il>; Mon, 24 Aug 2015 17:28:00 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105773 Archived-At: > Date: Sun, 23 Aug 2015 22:06:45 +0000 > From: Pip Cet > > This is possibly only a documentation issue. Possibly. > Recipe: eval > (progn (push (lambda (&rest args) (message "window size changed")) > window-size-change-functions) > (message (make-string 3000 ?*))) > > Expected result: a "window size changed" message. > > Actual result: no such message. > > The symptom is that the window size change function is not run after a > mini-window size change. Note that resizing the mini-window involves resizing of at least one other window on the same frame. So this is not exactly about the mini-window. > So far, I can produce this behavior only when the minibuffer or echo > area grows to several lines; when it shrinks afterwards, my window size > change function is called. I don't see the message even when the mini-window shrinks back. Are you sure the message you see is not triggered by some other event? It's way too easy to trigger it, see below. > I cannot reproduce the behavior with other windows. See above: at least one other window is resized in this recipe, so the exemption is not about the mini-window itself, it's about any window involved in resizing in this particular scenario. > Is this a bug? The documentation says: > > [...] to be called if the size of any window changes for any reason. > > Please correct me if I'm wrong, but when the minibuffer/echo area gets > resized (and the windows on top of it, too), that counts as a change of > size, I would say. I believe the original reason for this is largely historical: window-size-change-functions exists since Emacs 19.29, whereas automatic resizing of mini-window was introduced in Emacs 21. Since Emacs before 21 didn't have the mini-window resizing functionality, Emacs 21 was careful not to gratuitously trigger these functions by something that is purely a new redisplay feature. That said, I wonder whether changing the code now to call these functions due to automatic resizing would make sense. What would be the real-life use cases for using that? I believe window-size-change-functions is meant for taking notice of resizes done by the user or some Lisp code, not for automated resizes whose sole purpose is to allow some message be read in its entirety. If you agree, then the current behavior will make sense to you. If anything, IMO we should _reduce_ the number of unrelated events that trigger a call to these functions. For example, currently any command that reads from the minibuffer will trigger it, because when read-from-minibuffer exits, it restores the window configuration by calling set-window-configuration, which is documented to trigger these functions. That just doesn't make any sense to me, since most reads from the minibuffer don't resize any windows! > If this is merely a documentation issue, the exception should be noted > in the manual. That's easy. Deciding what's TRT in this case is harder. > If this behavior is deliberate, I believe it is inconsistent to set > FRAME_WINDOW_SIZES_CHANGED (f) in `resize-mini-window-internal'. It's consistent if we adopt the POV that this feature only catches resizes from Lisp code.