From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2020 22:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 44070@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160305902225040 (code B ref -1); Sun, 18 Oct 2020 22:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2020 22:10:22 +0000 Received: from localhost ([127.0.0.1]:39260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUGsc-0006Vk-S5 for submit@debbugs.gnu.org; Sun, 18 Oct 2020 18:10:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:38820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUGsX-0006VT-VF for submit@debbugs.gnu.org; Sun, 18 Oct 2020 18:10:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUGsX-0003D8-Qf for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 18:10:13 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUGsS-0003gK-4f for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 18:10:12 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 247B180855 for ; Sun, 18 Oct 2020 18:10:07 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 716208058D for ; Sun, 18 Oct 2020 18:10:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603059005; bh=tV4mWo83zRkyuV3xth6bDg2BLUu7CnRs0rS/DcMaHSo=; h=From:To:Subject:Date:From; b=A1JDMkNGhIH1hdmCbzAUkdnAzOeS13+VnL3vCVAL+jq2eiGBryAPai2WhFbZl7ckS 8EVMtPpPjUSK2z70Cj4lB43+0+C2byC8NCu0EWLrSUeEIpYWzg+yb6DNxJzMUQkpNm MrefCrthIy4QBbKiVvzmohGPDFMD7FLfymzWg1BmbJNkqhdlFiOsYbm1afI7lQkhU0 wqeSJwrl2tvORk/i+djurgvruj4BxYmmC0Bzq6+E3nUl1ksQioKy5pJmxpJTyl14KO KOK5kl7L01f7LYnJ1FxGncNG1xxnHL5tzDHHGcnUZdcFddZesdAP89HpRzwES8fnV1 E1BeX/8duQFfQ== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5564812005C for ; Sun, 18 Oct 2020 18:10:05 -0400 (EDT) From: Stefan Monnier Date: Sun, 18 Oct 2020 18:09:55 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.050 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/18 16:15:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Package: Emacs Version: 28.0.50 Step 1: % emacs -Q M-: a C-u 20 C-q C-j abc You should now have "abc" on the last line of the miniwindow with the prompt scrolled out of view. So far so good. Step 2: M-< M-> We scroll to the beginning and back to the end. Now "abc" is not quite on the last line of the miniwindow, more specifically there should be 2 empty lines left after "abc". The behavior is slightly different if instead of `end-of-buffer` we use (goto-char (point-max)), but the problem at step 3 remains: Step 3: DEL This is the surprising part: this simple edit causes the minibuffer to be "rescrolled" so that the resulting "ab" is now again placed on the very last line of the miniwindow. The same thing happens with any other simple edit because any buffer modification triggers a call to `resize_mini_window`, which will always try to arrange to see a maximum of text. Not sure if it's better to fix this by changing step 2 or by changing step 3, but the patch below fixes it by changing step 2. WDYT? Stefan diff --git a/lisp/simple.el b/lisp/simple.el index d6fce922c4..41aba2ddc3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1129,7 +1129,7 @@ end-of-buffer ;; If the end of the buffer is not already on the screen, ;; then scroll specially to put it near, but not at, the bottom. (overlay-recenter (point)) - (recenter -3)))) + (recenter (if (window-minibuffer-p) -1 -3))))) (defcustom delete-active-region t "Whether single-char deletion commands delete an active region. diff --git a/src/xdisp.c b/src/xdisp.c index 5a62cd6eb5..c1105df3fc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18820,6 +18820,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) /* Try to scroll by specified few lines. */ if ((0 < scroll_conservatively + || MINI_WINDOW_P (w) || 0 < emacs_scroll_step || temp_scroll_step || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) @@ -18830,7 +18831,9 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) /* The function returns -1 if new fonts were loaded, 1 if successful, 0 if not successful. */ int ss = try_scrolling (window, just_this_one_p, - scroll_conservatively, + (MINI_WINDOW_P (w) + ? SCROLL_LIMIT + 1 + : scroll_conservatively), emacs_scroll_step, temp_scroll_step, last_line_misfit); switch (ss) diff --git a/test/src/xdisp-tests.el b/test/src/xdisp-tests.el index 95c39dacc3..d513f5beba 100644 --- a/test/src/xdisp-tests.el +++ b/test/src/xdisp-tests.el @@ -21,34 +21,55 @@ (require 'ert) +(defmacro xdisp-tests--in-minibuffer (&rest body) + (declare (debug t) (indent 0)) + `(catch 'result + (minibuffer-with-setup-hook + (lambda () + (let ((redisplay-skip-initial-frame nil) + (executing-kbd-macro nil)) ;Don't skip redisplay + (throw 'result (progn . ,body)))) + (let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'. + (read-string "toto: "))))) + (ert-deftest xdisp-tests--minibuffer-resizing () ;; bug#43519 - ;; FIXME: This test returns success when run in batch but - ;; it's only a lucky accident: it also returned success - ;; when bug#43519 was not fixed. (should (equal t - (catch 'result - (minibuffer-with-setup-hook - (lambda () - (insert "hello") - (let ((ol (make-overlay (point) (point))) - (redisplay-skip-initial-frame nil) - (max-mini-window-height 1) - (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh")) - ;; (save-excursion (insert text)) - ;; (sit-for 2) - ;; (delete-region (point) (point-max)) - (put-text-property 0 1 'cursor t text) - (overlay-put ol 'after-string text) - (let ((executing-kbd-macro nil)) ;Don't skip redisplay - (redisplay 'force)) - (throw 'result - ;; Make sure we do the see "hello" text. - (prog1 (equal (window-start) (point-min)) - ;; (list (window-start) (window-end) (window-width)) - (delete-overlay ol))))) - (let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'. - (read-string "toto: "))))))) + (xdisp-tests--in-minibuffer + (insert "hello") + (let ((ol (make-overlay (point) (point))) + (max-mini-window-height 1) + (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh")) + ;; (save-excursion (insert text)) + ;; (sit-for 2) + ;; (delete-region (point) (point-max)) + (put-text-property 0 1 'cursor t text) + (overlay-put ol 'after-string text) + (redisplay 'force) + ;; Make sure we do the see "hello" text. + (prog1 (equal (window-start) (point-min)) + ;; (list (window-start) (window-end) (window-width)) + (delete-overlay ol))))))) + +(ert-deftest xdisp-tests--minibuffer-scroll () ;; bug#43519 + (let ((posns + (xdisp-tests--in-minibuffer + (let ((max-mini-window-height 4)) + (dotimes (_ 80) (insert "\nhello")) + (beginning-of-buffer) + (redisplay 'force) + (end-of-buffer) + ;; A simple edit like removing the last `o' shouldn't cause + ;; the rest of the minibuffer's text to move. + (list + (progn (redisplay 'force) (window-start)) + (progn (delete-char -1) + (redisplay 'force) (window-start)) + (progn (goto-char (point-min)) (redisplay 'force) + (goto-char (point-max)) (redisplay 'force) + (window-start))))))) + (should (equal (nth 0 posns) (nth 1 posns))) + (should (equal (nth 1 posns) (nth 2 posns))))) ;;; xdisp-tests.el ends here From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Oct 2020 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160312524525062 (code B ref 44070); Mon, 19 Oct 2020 16:35:02 +0000 Received: (at 44070) by debbugs.gnu.org; 19 Oct 2020 16:34:05 +0000 Received: from localhost ([127.0.0.1]:42159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUY6n-0006WA-0A for submit@debbugs.gnu.org; Mon, 19 Oct 2020 12:34:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUY6k-0006Vf-Vt for 44070@debbugs.gnu.org; Mon, 19 Oct 2020 12:34:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37471) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUY6f-0005kH-9H; Mon, 19 Oct 2020 12:33:57 -0400 Received: from [176.228.60.248] (port=4060 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kUY6e-0007kV-E3; Mon, 19 Oct 2020 12:33:56 -0400 Date: Mon, 19 Oct 2020 19:34:01 +0300 Message-Id: <83a6wip43q.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sun, 18 Oct 2020 18:09:55 -0400) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Date: Sun, 18 Oct 2020 18:09:55 -0400 > > diff --git a/lisp/simple.el b/lisp/simple.el > index d6fce922c4..41aba2ddc3 100644 > --- a/lisp/simple.el > +++ b/lisp/simple.el > @@ -1129,7 +1129,7 @@ end-of-buffer > ;; If the end of the buffer is not already on the screen, > ;; then scroll specially to put it near, but not at, the bottom. > (overlay-recenter (point)) > - (recenter -3)))) > + (recenter (if (window-minibuffer-p) -1 -3))))) This should have a comment that explains the reason for the difference. (Btw, does this DTRT when the text in the minibuffer has a newline at the end?) > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -18820,6 +18820,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) > > /* Try to scroll by specified few lines. */ > if ((0 < scroll_conservatively > + || MINI_WINDOW_P (w) > || 0 < emacs_scroll_step > || temp_scroll_step > || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) > @@ -18830,7 +18831,9 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) > /* The function returns -1 if new fonts were loaded, 1 if > successful, 0 if not successful. */ > int ss = try_scrolling (window, just_this_one_p, > - scroll_conservatively, > + (MINI_WINDOW_P (w) > + ? SCROLL_LIMIT + 1 > + : scroll_conservatively), > emacs_scroll_step, > temp_scroll_step, last_line_misfit); > switch (ss) If we want the minibuffer behave as if scroll-conservatively was set, why not simply set scroll-conservatively in each minibuffer? We could then have a user option, by default on, to do that, and let users who like the current (mis)behavior continue having that. As a nice bonus, we will then be sure the change doesn't affect echo-area messages, only editing in the minibuffer. WDYT? From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2020 17:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160399405211346 (code B ref 44070); Thu, 29 Oct 2020 17:55:01 +0000 Received: (at 44070) by debbugs.gnu.org; 29 Oct 2020 17:54:12 +0000 Received: from localhost ([127.0.0.1]:54896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYC7n-0002wu-EA for submit@debbugs.gnu.org; Thu, 29 Oct 2020 13:54:11 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYC7l-0002wc-T7 for 44070@debbugs.gnu.org; Thu, 29 Oct 2020 13:54:10 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 87D004412A7; Thu, 29 Oct 2020 13:54:04 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 68D3D4411F0; Thu, 29 Oct 2020 13:54:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1603994042; bh=dHYyU/6qaIWj/XNy4k3vpK6PI+0mDYMUEGsPdHldxLw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hWq+iOHFreuOdCOEm+64sOCb/Ovbt9+8xzr6OyP4Zx5n/UEqWl8KQhV2nhci9Ryil XK905myrfBwNKJaS0ogarTs1PBtLkFUXZmklN3rP5yXJmT93Q6/rcjQ9gCsqJPWL4r v27p9D4mJSPchxhCavl48wopBSt+AQrSkz558mXqtpJ/T3iZKrvOGT1myKChi+jL/h PJeDynkNbaxd2y6/iu4Vmm79zqo67X5ejSJtq0h10LXoSKjSe4AawGLEm1NR2kwjla ywvSlvC4d1XxrWvCTK+p3UM2v+oO7QkS+hu2ElIywd3ZfPVFQp26HK1cKnBi+xR3n+ 4nmfVDCEr+D+w== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 395311201DA; Thu, 29 Oct 2020 13:54:02 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> Date: Thu, 29 Oct 2020 13:54:01 -0400 In-Reply-To: <83a6wip43q.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 19 Oct 2020 19:34:01 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.071 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> + (recenter (if (window-minibuffer-p) -1 -3))))) > This should have a comment that explains the reason for the > difference. Good point. And applies to the other changes as well. I believe the addition of a config vars takes care of it in the patch below. > (Btw, does this DTRT when the text in the minibuffer has > a newline at the end?) It does, yes. >> /* Try to scroll by specified few lines. */ >> if ((0 < scroll_conservatively >> + || MINI_WINDOW_P (w) >> || 0 < emacs_scroll_step [...] >> int ss = try_scrolling (window, just_this_one_p, >> - scroll_conservatively, >> + (MINI_WINDOW_P (w) >> + ? SCROLL_LIMIT + 1 >> + : scroll_conservatively), >> emacs_scroll_step, > > If we want the minibuffer behave as if scroll-conservatively was set, > why not simply set scroll-conservatively in each minibuffer? That was my initial thought as well, but when I tried to implement it, it quickly turned into a scavenge hunt trying to find all the places where it needs to be set (and re-set after a kill-all-local-variables). So in the end, the "simply" qualifier didn't apply at all. Another option I considered was to do it directly inside `reset_buffer_local_variables`, but then we need to pass the info about "this is a buffer meant for the mini-windows" through several layers (or worse: do it based on the buffer's name), which is again unworthy of the "simply" qualifier. At this point I stopped and realized that my motivation was to change the behavior in some particular *windows* rather than in some particular *buffers*, so I think setting it buffer-locally in those buffers used as minibuffers, while being a valid option, is not better than the simpler patch I sent. > We could then have a user option, by default on, to do that, and let > users who like the current (mis)behavior continue having that. We could add such an option, indeed. > As a nice bonus, we will then be sure the change doesn't affect > echo-area messages, only editing in the minibuffer. Indeed, it makes it easier to test whether a change is due to this modification. How 'bout the patch below, then? Stefan diff --git a/lisp/simple.el b/lisp/simple.el index 2e40e3261c..8c1761797b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1134,7 +1134,11 @@ end-of-buffer ;; If the end of the buffer is not already on the screen, ;; then scroll specially to put it near, but not at, the bottom. (overlay-recenter (point)) - (recenter -3)))) + ;; FIXME: Arguably if `scroll-conservatively' is set, then + ;; we should always pass -1 to `recenter'. + (recenter (if (and minibuffer-scroll-conservatively + (window-minibuffer-p)) + -1 -3))))) (defcustom delete-active-region t "Whether single-char deletion commands delete an active region. diff --git a/src/xdisp.c b/src/xdisp.c index 5c80e37581..fb8719628b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18820,6 +18820,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) /* Try to scroll by specified few lines. */ if ((0 < scroll_conservatively + || (minibuffer_scroll_conservatively && MINI_WINDOW_P (w)) || 0 < emacs_scroll_step || temp_scroll_step || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)) @@ -18830,7 +18831,10 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) /* The function returns -1 if new fonts were loaded, 1 if successful, 0 if not successful. */ int ss = try_scrolling (window, just_this_one_p, - scroll_conservatively, + ((minibuffer_scroll_conservatively + && MINI_WINDOW_P (w)) + ? SCROLL_LIMIT + 1 + : scroll_conservatively), emacs_scroll_step, temp_scroll_step, last_line_misfit); switch (ss) @@ -34538,7 +34542,14 @@ syms_of_xdisp (void) DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)"); - DEFVAR_BOOL("inhibit-message", inhibit_message, + DEFVAR_BOOL ("minibuffer-scroll-conservatively", + minibuffer_scroll_conservatively, + doc: /* Non-nil means scroll conservatively in minibuffer windows. +When the value is nil, scrolling in minibuffer windows obeys the +settings of `scroll-conservatively'. */); + minibuffer_scroll_conservatively = true; /* bug#44070 */ + + DEFVAR_BOOL ("inhibit-message", inhibit_message, doc: /* Non-nil means calls to `message' are not displayed. They are still logged to the *Messages* buffer. @@ -34546,7 +34557,7 @@ syms_of_xdisp (void) disable messages everywhere, including in I-search and other places where they are necessary. This variable is intended to be let-bound around code that needs to disable messages temporarily. */); - inhibit_message = 0; + inhibit_message = false; message_dolog_marker1 = Fmake_marker (); staticpro (&message_dolog_marker1); diff --git a/test/src/xdisp-tests.el b/test/src/xdisp-tests.el index 95c39dacc3..fad90fad53 100644 --- a/test/src/xdisp-tests.el +++ b/test/src/xdisp-tests.el @@ -21,34 +21,55 @@ (require 'ert) +(defmacro xdisp-tests--in-minibuffer (&rest body) + (declare (debug t) (indent 0)) + `(catch 'result + (minibuffer-with-setup-hook + (lambda () + (let ((redisplay-skip-initial-frame nil) + (executing-kbd-macro nil)) ;Don't skip redisplay + (throw 'result (progn . ,body)))) + (let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'. + (read-string "toto: "))))) + (ert-deftest xdisp-tests--minibuffer-resizing () ;; bug#43519 - ;; FIXME: This test returns success when run in batch but - ;; it's only a lucky accident: it also returned success - ;; when bug#43519 was not fixed. (should (equal t - (catch 'result - (minibuffer-with-setup-hook - (lambda () - (insert "hello") - (let ((ol (make-overlay (point) (point))) - (redisplay-skip-initial-frame nil) - (max-mini-window-height 1) - (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh")) - ;; (save-excursion (insert text)) - ;; (sit-for 2) - ;; (delete-region (point) (point-max)) - (put-text-property 0 1 'cursor t text) - (overlay-put ol 'after-string text) - (let ((executing-kbd-macro nil)) ;Don't skip redisplay - (redisplay 'force)) - (throw 'result - ;; Make sure we do the see "hello" text. - (prog1 (equal (window-start) (point-min)) - ;; (list (window-start) (window-end) (window-width)) - (delete-overlay ol))))) - (let ((executing-kbd-macro t)) ;Force real minibuffer in `read-string'. - (read-string "toto: "))))))) + (xdisp-tests--in-minibuffer + (insert "hello") + (let ((ol (make-overlay (point) (point))) + (max-mini-window-height 1) + (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh")) + ;; (save-excursion (insert text)) + ;; (sit-for 2) + ;; (delete-region (point) (point-max)) + (put-text-property 0 1 'cursor t text) + (overlay-put ol 'after-string text) + (redisplay 'force) + ;; Make sure we do the see "hello" text. + (prog1 (equal (window-start) (point-min)) + ;; (list (window-start) (window-end) (window-width)) + (delete-overlay ol))))))) + +(ert-deftest xdisp-tests--minibuffer-scroll () ;; bug#44070 + (let ((posns + (xdisp-tests--in-minibuffer + (let ((max-mini-window-height 4)) + (dotimes (_ 80) (insert "\nhello")) + (beginning-of-buffer) + (redisplay 'force) + (end-of-buffer) + ;; A simple edit like removing the last `o' shouldn't cause + ;; the rest of the minibuffer's text to move. + (list + (progn (redisplay 'force) (window-start)) + (progn (delete-char -1) + (redisplay 'force) (window-start)) + (progn (goto-char (point-min)) (redisplay 'force) + (goto-char (point-max)) (redisplay 'force) + (window-start))))))) + (should (equal (nth 0 posns) (nth 1 posns))) + (should (equal (nth 1 posns) (nth 2 posns))))) ;;; xdisp-tests.el ends here From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 08:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160413334215182 (code B ref 44070); Sat, 31 Oct 2020 08:36:02 +0000 Received: (at 44070) by debbugs.gnu.org; 31 Oct 2020 08:35:42 +0000 Received: from localhost ([127.0.0.1]:60510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYmMP-0003wo-Pg for submit@debbugs.gnu.org; Sat, 31 Oct 2020 04:35:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYmMO-0003wb-NW for 44070@debbugs.gnu.org; Sat, 31 Oct 2020 04:35:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35571) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYmMI-0008GZ-Ux; Sat, 31 Oct 2020 04:35:34 -0400 Received: from [176.228.60.248] (port=2413 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kYmMG-0007jN-GJ; Sat, 31 Oct 2020 04:35:33 -0400 Date: Sat, 31 Oct 2020 10:35:17 +0200 Message-Id: <83sg9uhjy2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Thu, 29 Oct 2020 13:54:01 -0400) References: <83a6wip43q.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 44070@debbugs.gnu.org > Date: Thu, 29 Oct 2020 13:54:01 -0400 > > > If we want the minibuffer behave as if scroll-conservatively was set, > > why not simply set scroll-conservatively in each minibuffer? > > That was my initial thought as well, but when I tried to implement it, > it quickly turned into a scavenge hunt trying to find all the places > where it needs to be set (and re-set after a kill-all-local-variables). That's strange: don't we have a single place where we create the minibuffer? > How 'bout the patch below, then? LGTM, modulo the NEWS and ELisp manual updates. > + DEFVAR_BOOL ("minibuffer-scroll-conservatively", > + minibuffer_scroll_conservatively, > + doc: /* Non-nil means scroll conservatively in minibuffer windows. > +When the value is nil, scrolling in minibuffer windows obeys the > +settings of `scroll-conservatively'. */); I'd say "behaves as if scroll-conservatively were set" instead of "obeys the setting of scroll-conservatively", because the latter can be interpreted as meaning one actually needs to set scroll-conservatively. > + minibuffer_scroll_conservatively = true; /* bug#44070 */ It is IMO generally not useful to have such comments, since the Git history will tell us that much (and then some), provided you don't forget to mention the bug number in the log message. Thanks. From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 13:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160414994618108 (code B ref 44070); Sat, 31 Oct 2020 13:13:01 +0000 Received: (at 44070) by debbugs.gnu.org; 31 Oct 2020 13:12:26 +0000 Received: from localhost ([127.0.0.1]:60669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYqgE-0004hz-I1 for submit@debbugs.gnu.org; Sat, 31 Oct 2020 09:12:26 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYqgC-0004hi-GB for 44070@debbugs.gnu.org; Sat, 31 Oct 2020 09:12:25 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 46E7744079E; Sat, 31 Oct 2020 09:12:19 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EFFFC440768; Sat, 31 Oct 2020 09:12:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604149937; bh=EaoLAr9tXfHu/JXrn3RBovMc0n9rCb5rcmusJYjdx+E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lngZy0kdvVHWF7dx0LL/TfAXm/OrR9w5mzYkGPCAe5doEFqcr2g9FAmEWTNdMYSm/ uH+Av2EzmJ1HF6wZD69Wxfi36x7LPHG3QwOCg9H59mgb9qC569caIJvKKgPSQbWl6V 9kz7FapsmBg6MyQ/QgtaLssWohWfOViUleGUSspxOAafUCUS8Ix3MAI2M5ca3MrDnt 1GLbh0yHSmpSkbI23Ko2q2WLxWJ2fskRJ29+8dcfsfx8vP7rjFPzPmChMGDMa/7A9q 80sdvwq7czNBpmpJdtMfc49qMkkrMwVCfmEydoz/K/Rv1/pOzLqltnvp/KizqEJoas gM3CZgrTRusbA== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BF089120257; Sat, 31 Oct 2020 09:12:17 -0400 (EDT) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> Date: Sat, 31 Oct 2020 09:12:16 -0400 In-Reply-To: <83sg9uhjy2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 31 Oct 2020 10:35:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.073 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> That was my initial thought as well, but when I tried to implement it, >> it quickly turned into a scavenge hunt trying to find all the places >> where it needs to be set (and re-set after a kill-all-local-variables). > That's strange: don't we have a single place where we create the > minibuffer? Yes, but the problem is that we reuse the minibuffers and that we need to re-set the var after killing local vars, so the only sane place to change this would be in `reset_buffer_local_variables`. >> How 'bout the patch below, then? > LGTM, modulo the NEWS and ELisp manual updates. OK, thanks. Done and pushed. >> + DEFVAR_BOOL ("minibuffer-scroll-conservatively", >> + minibuffer_scroll_conservatively, >> + doc: /* Non-nil means scroll conservatively in minibuffer windows. >> +When the value is nil, scrolling in minibuffer windows obeys the >> +settings of `scroll-conservatively'. */); > > I'd say "behaves as if scroll-conservatively were set" instead of > "obeys the setting of scroll-conservatively", because the latter can > be interpreted as meaning one actually needs to set > scroll-conservatively. That's indeed what it means since it describes the behavior when the var is nil (which is the old behavior). Stefan From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 18:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.16041696753462 (code B ref 44070); Sat, 31 Oct 2020 18:42:01 +0000 Received: (at 44070) by debbugs.gnu.org; 31 Oct 2020 18:41:15 +0000 Received: from localhost ([127.0.0.1]:34530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYvoQ-0000tm-Q9 for submit@debbugs.gnu.org; Sat, 31 Oct 2020 14:41:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYvoM-0000tS-PU for 44070@debbugs.gnu.org; Sat, 31 Oct 2020 14:41:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42106) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYvoH-0004KK-Em; Sat, 31 Oct 2020 14:41:05 -0400 Received: from [176.228.60.248] (port=2251 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kYvoG-0006Un-Nd; Sat, 31 Oct 2020 14:41:05 -0400 Date: Sat, 31 Oct 2020 20:40:50 +0200 Message-Id: <835z6qgrwt.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sat, 31 Oct 2020 09:12:16 -0400) References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 44070@debbugs.gnu.org > Date: Sat, 31 Oct 2020 09:12:16 -0400 > > >> How 'bout the patch below, then? > > LGTM, modulo the NEWS and ELisp manual updates. > > OK, thanks. Done and pushed. Actually, I see now that your changes only test that a window is a mini-window, but not that it displays a minibuffer. Did I miss something? If not, I'd prefer to add the conditions for displaying a minibuffer, okay? From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.16042373601399 (code B ref 44070); Sun, 01 Nov 2020 13:30:02 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 13:29:20 +0000 Received: from localhost ([127.0.0.1]:35990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZDQ7-0000MU-N0 for submit@debbugs.gnu.org; Sun, 01 Nov 2020 08:29:19 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZDQ5-0000MH-Aj for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 08:29:17 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D15B7100267; Sun, 1 Nov 2020 08:29:11 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 88F2F100222; Sun, 1 Nov 2020 08:29:10 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604237350; bh=UJjHiymuW7sCWiSeo6+ZzWSkAQK1FqCASw9QYQhFeBA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=f6b1uIYZK4fyBnk/uwEjq1B+ZMKBAMbEnWgHlRDod3/E5xc2lCXRasuHiOTTLo6N9 tRmlBpl1o+eQAANMQADc16pw3d4poT2NHvslZM/L+DNul2DPuG40OhBBv783p0bbiB YDWjfEGHXKsdWjhjBI6yM+fKZaeUklYIwfYcQM5OP6QJ0ggJPXLBDLPQLa+XqrOrF7 ehOBSOByZ0subVwsaAsowSBlHa8Qg+yk2nP6CqPkhczbEm98m+AOWk2HkpPxDG8Z0v JcGZpi8ZZRR1uVLWgEns3jdJp8YMN4igcvo89h10rjSKd5lSymU8UK0zwRpbOqaYHb deiZorX/t95Zw== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 27EE7120232; Sun, 1 Nov 2020 08:29:10 -0500 (EST) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> Date: Sun, 01 Nov 2020 08:29:09 -0500 In-Reply-To: <835z6qgrwt.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 31 Oct 2020 20:40:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.067 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> >> How 'bout the patch below, then? >> > LGTM, modulo the NEWS and ELisp manual updates. >> OK, thanks. Done and pushed. > Actually, I see now that your changes only test that a window is a > mini-window, but not that it displays a minibuffer. Did I miss > something? If not, I'd prefer to add the conditions for displaying a > minibuffer, okay? How would I do that? Stefan From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 14:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160423994113496 (code B ref 44070); Sun, 01 Nov 2020 14:13:02 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 14:12:21 +0000 Received: from localhost ([127.0.0.1]:36045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZE5l-0003Vc-83 for submit@debbugs.gnu.org; Sun, 01 Nov 2020 09:12:21 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZE5j-0003VI-6D for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 09:12:19 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F1AB244089D; Sun, 1 Nov 2020 09:12:13 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A81F7440096; Sun, 1 Nov 2020 09:12:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604239932; bh=mnZiGc6/uvniIM0ZFB1tXrGlrwGcjvIkiPuosAuyMp0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Wm92GrFwkIQYr7PFkc5n7LxnOS/zL3YX0VMbkCfudk/et/w+yBNG99K8cDtL0+bMw 3p6HV8jtGpptJBCnbCkdgty6tiJPYzVFCm/Lyu0ksEauptOWRWiUWSHFAg6/C3JyY6 N9jE71s7K5oZNFWPgrGfuNGMP2IBnerE1ZFUi8klMCX6wj46epsX4t5/1kZeC1lAF4 955YKootJoM7bQ681o0giWOCVjGVFFrUL/CnRGaghF34jokWUTuqoP8SxvJN7KhEMN OuVK0i3lbnpXof9+Sc0xtjyQ8j1YzFoN8sreCQ9R3Mcw0Z2jzx56XAjis1r1dzFG/5 5CbWTjDd8/K6w== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6C93C1202DA; Sun, 1 Nov 2020 09:12:12 -0500 (EST) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> Date: Sun, 01 Nov 2020 09:12:11 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 01 Nov 2020 08:29:09 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.073 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> >> How 'bout the patch below, then? >>> > LGTM, modulo the NEWS and ELisp manual updates. >>> OK, thanks. Done and pushed. >> Actually, I see now that your changes only test that a window is a >> mini-window, but not that it displays a minibuffer. Did I miss >> something? If not, I'd prefer to add the conditions for displaying a >> minibuffer, okay? > How would I do that? Also, I'm not sure that's what we want to do: as I argued in my previous message, this change is mostly meant to better fit the behavior of resize_mini_window, and that behavior applies to all mini-windows, regardless if they're used for a minibuffer or something else. I suggest we keep the code as is for now, and we'll consider what to do *if* someone encounters a regression (which, for all we know, could also affect the minibuffer case). Stefan From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160424478631902 (code B ref 44070); Sun, 01 Nov 2020 15:34:01 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 15:33:06 +0000 Received: from localhost ([127.0.0.1]:38248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFLt-0008IS-NZ for submit@debbugs.gnu.org; Sun, 01 Nov 2020 10:33:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFLr-0008HA-Tv for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 10:33:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56268) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZFLm-0008Dz-D3; Sun, 01 Nov 2020 10:32:58 -0500 Received: from [176.228.60.248] (port=3449 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZFLk-0006ih-R2; Sun, 01 Nov 2020 10:32:57 -0500 Date: Sun, 01 Nov 2020 17:32:45 +0200 Message-Id: <83pn4xf5ya.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sun, 01 Nov 2020 08:29:09 -0500) References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 44070@debbugs.gnu.org > Date: Sun, 01 Nov 2020 08:29:09 -0500 > > >> >> How 'bout the patch below, then? > >> > LGTM, modulo the NEWS and ELisp manual updates. > >> OK, thanks. Done and pushed. > > Actually, I see now that your changes only test that a window is a > > mini-window, but not that it displays a minibuffer. Did I miss > > something? If not, I'd prefer to add the conditions for displaying a > > minibuffer, okay? > > How would I do that? I thought about testing equality between the window being redisplayed and minibuf_window. We could also look at the buffer displayed by the window, and see if it appears in Vminibuffer_list. Does that make sense? From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160424509232677 (code B ref 44070); Sun, 01 Nov 2020 15:39:02 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 15:38:12 +0000 Received: from localhost ([127.0.0.1]:38259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFQq-0008Uz-In for submit@debbugs.gnu.org; Sun, 01 Nov 2020 10:38:12 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFQp-0008Um-68 for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 10:38:11 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DC802100267; Sun, 1 Nov 2020 10:38:05 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 900651001CB; Sun, 1 Nov 2020 10:38:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604245084; bh=QHnIDmUR7RR2OO7RF0QHyLbxJY1aOAdjrapXUeHbfQI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=F4Akms4MI6bpeD9x70HxNfKhAUgd6TNxkPVZ99E6YbZq+tcKrIRb3J675qaLlmBtP fWbYU4K2UpHo9vl8TH72AwcZBznlU0sF6R52Xy6gUMDJLDZsCo5LS35rkIPKQvs2DU 7GqflVHxq7mSBZOeREFcoP68TwJWpaQH3HOTIc+9z6Jh0qQfhJ6+NSUS1pPNHpecHA O9m+bHyaF3/4fM56hx7L2bLGZdGz31Petr8F45aPJbbz4Mcq9WlNAqtj5q5uR2tRt8 6ratQmSvndDH1mUQ17ygpTXZZRMB+tQwsZr/h9eNpOrvkoWaiXJYRXzE+ZQZGrtXQ2 XviOqouC5egWw== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6B6451202F4; Sun, 1 Nov 2020 10:38:04 -0500 (EST) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> <83pn4xf5ya.fsf@gnu.org> Date: Sun, 01 Nov 2020 10:38:03 -0500 In-Reply-To: <83pn4xf5ya.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 Nov 2020 17:32:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.066 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I thought about testing equality between the window being redisplayed > and minibuf_window. We could also look at the buffer displayed by the > window, and see if it appears in Vminibuffer_list. Does that make > sense? Sounds pretty ugly. What do you think about the other argument, that it should apply wherever resize_mini_window applies? Stefan From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 15:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.1604245146303 (code B ref 44070); Sun, 01 Nov 2020 15:40:01 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 15:39:06 +0000 Received: from localhost ([127.0.0.1]:38263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFRh-0008WV-Tn for submit@debbugs.gnu.org; Sun, 01 Nov 2020 10:39:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFRg-0008Vu-8t for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 10:39:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56360) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZFRb-0000TB-0H; Sun, 01 Nov 2020 10:38:59 -0500 Received: from [176.228.60.248] (port=3823 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZFRa-00014c-Fx; Sun, 01 Nov 2020 10:38:58 -0500 Date: Sun, 01 Nov 2020 17:38:47 +0200 Message-Id: <83mu01f5o8.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sun, 01 Nov 2020 09:12:11 -0500) References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 44070@debbugs.gnu.org > Date: Sun, 01 Nov 2020 09:12:11 -0500 > > Also, I'm not sure that's what we want to do: as I argued in my previous > message, this change is mostly meant to better fit the behavior of > resize_mini_window, and that behavior applies to all mini-windows, > regardless if they're used for a minibuffer or something else. My line of thinking was that, while in minibuffers we usually want to see the end of the text, that is not necessarily true in echo-area messages. > I suggest we keep the code as is for now, and we'll consider what to do > *if* someone encounters a regression (which, for all we know, could > also affect the minibuffer case). Then let's leave a FIXME comment about this in those two places where you use MINI_WINDOW_P, okay? From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.1604245549955 (code B ref 44070); Sun, 01 Nov 2020 15:46:02 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 15:45:49 +0000 Received: from localhost ([127.0.0.1]:38271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFYC-0000FL-Rj for submit@debbugs.gnu.org; Sun, 01 Nov 2020 10:45:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZFYA-0000F7-Vg for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 10:45:47 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56513) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZFY5-0001By-MN; Sun, 01 Nov 2020 10:45:41 -0500 Received: from [176.228.60.248] (port=4231 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZFY5-0001Zw-3A; Sun, 01 Nov 2020 10:45:41 -0500 Date: Sun, 01 Nov 2020 17:45:28 +0200 Message-Id: <83lfflf5d3.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sun, 01 Nov 2020 10:38:03 -0500) References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> <83pn4xf5ya.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 44070@debbugs.gnu.org > Date: Sun, 01 Nov 2020 10:38:03 -0500 > > > I thought about testing equality between the window being redisplayed > > and minibuf_window. We could also look at the buffer displayed by the > > window, and see if it appears in Vminibuffer_list. Does that make > > sense? > > Sounds pretty ugly. ??? Why? In any case, we do this stuff all over the place. A random example: else if ((w != XWINDOW (minibuf_window) || minibuf_level == 0) /* When buffer is nonempty, redisplay window normally. */ && BUF_Z (XBUFFER (w->contents)) == BUF_BEG (XBUFFER (w->contents)) /* Quail displays non-mini buffers in minibuffer window. In that case, redisplay the window normally. */ && !NILP (Fmemq (w->contents, Vminibuffer_list))) From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 19:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.16042571843376 (code B ref 44070); Sun, 01 Nov 2020 19:00:01 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 18:59:44 +0000 Received: from localhost ([127.0.0.1]:38527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZIZs-0000sM-Bx for submit@debbugs.gnu.org; Sun, 01 Nov 2020 13:59:44 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZIZq-0000s8-Mj for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 13:59:43 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 56A7C44138D; Sun, 1 Nov 2020 13:59:37 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1C2514406DA; Sun, 1 Nov 2020 13:59:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604257176; bh=x0oO5RvnpULkXBvRM1UVQF3xhrbPIxC5v+MQVVkv2yA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BwKURyoX1Pnki85h/FIMzx72ARBmZcIAp0YhfhpYqnslkxgSULipGTCuNvpBWGOHe SLWURqWy4B5+nWcNuH/eVlPfqkXVabE4JCd47uJJV76N752Xk9OEMecF4ywit52D4F h+J5TGdw+TyIxxMBVqwM38X10QYDDJ/8MnPZe+rjO08jQrFiA9JVPwUgInneJeqObT 4yyzgh3kHZ98yW3PwbidxPUAyWqv3oNzng0DkDVFR2KiLqNAUXMM1v9uZZovHpGBKU JZPFEzslrj2hbB8UcDOFhXgfJyBdsiyQNJOaOi1+PSth7ICMwID0bARjFEqxxx3YbN cR5Ry57y4VBEQ== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E7EF3120340; Sun, 1 Nov 2020 13:59:35 -0500 (EST) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> <83mu01f5o8.fsf@gnu.org> Date: Sun, 01 Nov 2020 13:59:35 -0500 In-Reply-To: <83mu01f5o8.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 Nov 2020 17:38:47 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.071 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Also, I'm not sure that's what we want to do: as I argued in my previous >> message, this change is mostly meant to better fit the behavior of >> resize_mini_window, and that behavior applies to all mini-windows, >> regardless if they're used for a minibuffer or something else. > My line of thinking was that, while in minibuffers we usually want to > see the end of the text, that is not necessarily true in echo-area > messages. Yet, that's what `resize_mini_window` does for all mini-windows regardless of it's an echo-area or not. Also, my patch shouldn't affect whether we "see the end of the text", so maybe I just don't understand what you're referring to. >> I suggest we keep the code as is for now, and we'll consider what to do >> *if* someone encounters a regression (which, for all we know, could >> also affect the minibuffer case). > Then let's leave a FIXME comment about this in those two places where > you use MINI_WINDOW_P, okay? I thought the test of `scroll_minibuffer_conservative` played this role. Stefan From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.16042594247054 (code B ref 44070); Sun, 01 Nov 2020 19:38:02 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 19:37:04 +0000 Received: from localhost ([127.0.0.1]:38581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZJA0-0001ph-2H for submit@debbugs.gnu.org; Sun, 01 Nov 2020 14:37:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZJ9y-0001pD-A1 for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 14:37:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59744) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZJ9s-0003Pi-Kd; Sun, 01 Nov 2020 14:36:56 -0500 Received: from [176.228.60.248] (port=3027 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZJ9s-0001uw-2D; Sun, 01 Nov 2020 14:36:56 -0500 Date: Sun, 01 Nov 2020 21:36:44 +0200 Message-Id: <83sg9seunn.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Stefan Monnier on Sun, 01 Nov 2020 13:59:35 -0500) References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> <83mu01f5o8.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 44070@debbugs.gnu.org > Date: Sun, 01 Nov 2020 13:59:35 -0500 > > >> Also, I'm not sure that's what we want to do: as I argued in my previous > >> message, this change is mostly meant to better fit the behavior of > >> resize_mini_window, and that behavior applies to all mini-windows, > >> regardless if they're used for a minibuffer or something else. > > My line of thinking was that, while in minibuffers we usually want to > > see the end of the text, that is not necessarily true in echo-area > > messages. > > Yet, that's what `resize_mini_window` does for all mini-windows > regardless of it's an echo-area or not. Resizing is one thing; which part of partially displayed text to show is another. They aren't the same decisions. > Also, my patch shouldn't affect whether we "see the end of the text", so > maybe I just don't understand what you're referring to. Where do you think point is in an echo-area buffer? > >> I suggest we keep the code as is for now, and we'll consider what to do > >> *if* someone encounters a regression (which, for all we know, could > >> also affect the minibuffer case). > > Then let's leave a FIXME comment about this in those two places where > > you use MINI_WINDOW_P, okay? > > I thought the test of `scroll_minibuffer_conservative` played this role. That's exactly why we need a FIXME: the variable says "minibuffer", but the code checks for mini-window. Anyway, I can add the comment myself; no need to argue. From unknown Tue Aug 19 14:22:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 19:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 44070@debbugs.gnu.org Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.16042604618941 (code B ref 44070); Sun, 01 Nov 2020 19:55:01 +0000 Received: (at 44070) by debbugs.gnu.org; 1 Nov 2020 19:54:21 +0000 Received: from localhost ([127.0.0.1]:38643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZJQi-0002K9-U1 for submit@debbugs.gnu.org; Sun, 01 Nov 2020 14:54:21 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZJQh-0002Ju-M9 for 44070@debbugs.gnu.org; Sun, 01 Nov 2020 14:54:20 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3E442100267; Sun, 1 Nov 2020 14:54:14 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id CEED61001CB; Sun, 1 Nov 2020 14:54:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604260452; bh=7lp9sqoApgHYOu69g7FT1bvrMODHB4oKBrZp0trHQqM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IjTBaJs0gvZW2OXnUIK0DvsqZl1D3GnMfVyUDDCyT5wsK96rE2t/9n/xImfKih8wp X9BY1g5agoHGrJI+kwCdE3mprC1lazfyjKETSKcV7NPajbT1svzH3sfVKXhDVcxDK1 rxENAMFIeTXDMV0Apxk8iq6fCiSNiWcQVu9IBqUCRt/Hh6Xj4jEcSVjY19+aw4oKS6 aaFgsQE641zBwXs6uynhvN3+aaVAx4ZwFL44A/9FKcJWjfXMzvOz60jPTVC37j6oCc WQIXgssAjVSbVgl686pfoc3v0KGyKUpO0xuN+cay8BpMLaVqAm1UjCKte8wjrR/e7J FP5rxX9XiWCSQ== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 970601202EE; Sun, 1 Nov 2020 14:54:12 -0500 (EST) From: Stefan Monnier Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> <835z6qgrwt.fsf@gnu.org> <83mu01f5o8.fsf@gnu.org> <83sg9seunn.fsf@gnu.org> Date: Sun, 01 Nov 2020 14:54:11 -0500 In-Reply-To: <83sg9seunn.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 Nov 2020 21:36:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.059 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> >> Also, I'm not sure that's what we want to do: as I argued in my previous >> >> message, this change is mostly meant to better fit the behavior of >> >> resize_mini_window, and that behavior applies to all mini-windows, >> >> regardless if they're used for a minibuffer or something else. >> > My line of thinking was that, while in minibuffers we usually want to >> > see the end of the text, that is not necessarily true in echo-area >> > messages. >> Yet, that's what `resize_mini_window` does for all mini-windows >> regardless of it's an echo-area or not. > Resizing is one thing; which part of partially displayed text to show > is another. They aren't the same decisions. Right, but `resize_mini_window` does do both: it resizes the window and and sets the window-start according to its rules of which part should be displayed. My patch tries to make the non-resizing scrolls follow the same logic as that of `resize_mini_window` to avoid inconsistencies. >> Also, my patch shouldn't affect whether we "see the end of the text", so >> maybe I just don't understand what you're referring to. > Where do you think point is in an echo-area buffer? I must say that I don't know, but I expect it should be either at BOB or at EOB: if it's a BOB then my patch won't make any difference because `window-start` will be set to BOB regardless of the scroll being conservative or not; if it's at EOB my patch will maximize the amount of text actually displayed, which is also what `resize_mini_window` does, but I suspect that for each-areas this won't make any difference because I've never seen an echo-area messages "scrolled" such that there's white space left below its end (probably because `resize_mini_window` already did the job, so there's no scrolling involved). >> I thought the test of `scroll_minibuffer_conservative` played this role. > That's exactly why we need a FIXME: the variable says "minibuffer", > but the code checks for mini-window. I chose the word "minibuffer" because it seems those "mini windows" are usually referred to as "minibuffer windows" in places like `window-minibuffer-p`. The docstring similarly uses "minibuffer windows" to refer to those *windows* rather than to their specific use for minibuffers as opposed to echo area messages, although I strongly suspect that the variable has indeed no concrete effect in echo-areas. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 10 15:33:43 2020 Received: (at control) by debbugs.gnu.org; 10 Nov 2020 20:33:43 +0000 Received: from localhost ([127.0.0.1]:39062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcaKk-00039w-Ts for submit@debbugs.gnu.org; Tue, 10 Nov 2020 15:33:43 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcaKj-00039i-2W for control@debbugs.gnu.org; Tue, 10 Nov 2020 15:33:41 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8E59444136B for ; Tue, 10 Nov 2020 15:33:35 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6B19E440F92 for ; Tue, 10 Nov 2020 15:33:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1605040414; bh=hWh8TJLr90ulPM/y9TlL/OX0TAzyr/9LukXh9r8Ai+A=; h=From:To:Subject:References:Date:In-Reply-To:From; b=POQphVn0VHzWVi2phzndYOV6/Tm9yyTx0FKs3lCIYfjLgROYuYr0F/g+yzx2PjOLi KoKPND3954olddHQuPvgA8Rr+9SRqeKlIpaE5F/PjTYbgSa4lVsDh1WmIXX363DEFo l47Rc2ucxVmi/pFp6OjxXCK8w2K43ALpGtCEPHWLui8lV1b73ybvkssPZ0ZrNJ2f4r Vqg/IxZh11gHnMQeknaFbq6y4YvSTK8EeDVuxHdtGjFhCSn2EE9KcqEDlBddqrtRMk p/ua+XfW7TW/t5GJiJLrRtfKpVr6cevKIxfQtCQMQdVlQffTLaz6JyZRna6GRcG28k X64i++g6cgNGg== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4F455120242 for ; Tue, 10 Nov 2020 15:33:34 -0500 (EST) From: Stefan Monnier To: control@debbugs.gnu.org Subject: Re: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Message-ID: References: <83a6wip43q.fsf@gnu.org> <83sg9uhjy2.fsf@gnu.org> Date: Tue, 10 Nov 2020 15:33:33 -0500 In-Reply-To: (Stefan Monnier's message of "Sat, 31 Oct 2020 09:12:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.073 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 44070 Stefan