From unknown Sun Aug 10 07:40:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18490 <18490@debbugs.gnu.org> To: bug#18490 <18490@debbugs.gnu.org> Subject: Status: 24.3.93; Narrowing in other window no longer redisplays until a call to other-window. Reply-To: bug#18490 <18490@debbugs.gnu.org> Date: Sun, 10 Aug 2025 14:40:40 +0000 retitle 18490 24.3.93; Narrowing in other window no longer redisplays until= a call to other-window. reassign 18490 emacs submitter 18490 Matthew Smiglarski severity 18490 important thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 17 15:41:19 2014 Received: (at submit) by debbugs.gnu.org; 17 Sep 2014 19:41:19 +0000 Received: from localhost ([127.0.0.1]:43602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUL6M-00069D-3o for submit@debbugs.gnu.org; Wed, 17 Sep 2014 15:41:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44721) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUKJk-0004t5-BL for submit@debbugs.gnu.org; Wed, 17 Sep 2014 14:51:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUKJi-0004vF-GI for submit@debbugs.gnu.org; Wed, 17 Sep 2014 14:51:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUKJi-0004tl-D5 for submit@debbugs.gnu.org; Wed, 17 Sep 2014 14:51:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUKJb-0001Vy-Ft for bug-gnu-emacs@gnu.org; Wed, 17 Sep 2014 14:50:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUKJZ-0004t2-Va for bug-gnu-emacs@gnu.org; Wed, 17 Sep 2014 14:50:55 -0400 Received: from mail-ie0-x244.google.com ([2607:f8b0:4001:c03::244]:42839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUKJZ-0004s8-Pn for bug-gnu-emacs@gnu.org; Wed, 17 Sep 2014 14:50:53 -0400 Received: by mail-ie0-f196.google.com with SMTP id y20so482490ier.7 for ; Wed, 17 Sep 2014 11:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=MQa1CheNKmERohjycAJXbdcwnu58XmOXhgN6wjtbPv4=; b=R3hlMacEstxGty1ZypAEMujomMLx4ThEb6aoYMbe4PVL7R3DkuLJlxObzoiFmkiNfw /vEVWc/qs5v0DPVCxQVoVPZXxsbKwuwYxnl4MWwHNSsu5kJm3Yk7LVNU9XYWzvLCa0eq r2EwJtjw9tx6YghZ10s3qUtuTzd26douqg//kMZyI+AILKYk/beDR5IouFMsQXA5tZLy 7aK8WWdnrmWnjzs/E3LOB+LLrWxK/PFQF9/hlSAmD3e5OoBINaemfB61QVg0CpVSqp0I TXRSvNRPRvgAA47Ttyqt2fJu2bUsDKAIgdHEqfG6ogEbvQzSM47gMTdumxxG8DA8LCpv ouBQ== MIME-Version: 1.0 X-Received: by 10.42.137.194 with SMTP id z2mr3760908ict.85.1410979846672; Wed, 17 Sep 2014 11:50:46 -0700 (PDT) Received: by 10.64.223.12 with HTTP; Wed, 17 Sep 2014 11:50:46 -0700 (PDT) Date: Wed, 17 Sep 2014 19:50:46 +0100 Message-ID: Subject: 24.3.93; Narrowing in other window no longer redisplays until a call to other-window. From: Matthew Smiglarski To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 17 Sep 2014 15:41:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) Hello, When a buffer has narrowing applied the window does not update until other-window is called. This is not the case on 24.3. To reproduce: 1. Start emacs $ emacs -Q 2. Enter the following into some buffer (defun bug-redisplay-narrowing-on-other-window () (interactive) (widen) (search-forward-regexp "[a-z]+") (narrow-to-region (match-beginning 0) (match-end 0))) (global-set-key (kbd "M-n") 'bug-redisplay-narrowing-on-other-window) ;; Create 3 windows (split-window-below) (split-window-below) 3. M-x eval-buffer 4. Execute the bug function defined above a few times, mixing it up with the odd call to #'other-window. M-x beginning-of-buffer M-n M-n C-x 4 o M-n M-n C-x 4 o M-n M-n What happens is the narrowing is only apparent to the poor user when another window is selected, and this was not the case previously. Apologies if this is an intended change but to me it seems that the redisplay should occur immediately? Also, if anyone is able to git-bisect this I would be interested to know how to determine when the window is redisplayed. Thanks, Mat In GNU Emacs 24.3.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.9) of 2014-08-15 on gj97d5j Windowing system distributor `Fedora Project', version 11.0.11404000 Configured using: `configure 'CFLAGS=-g3 -O0'' Important settings: value of $LC_CTYPE: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f t m p / b u g M-x e v a l - b u f M-n M-n M-n C-x o M-n M-n M-n M-n C-x o M-n M-n M-n C-x o M-x r e - e - b Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set byte-code: Window # too small for splitting 2 Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu edmacro kmacro cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 76340 5345) (symbols 48 18077 0) (miscs 40 46 150) (strings 32 10594 4007) (string-bytes 1 310823) (vectors 16 10083) (vector-slots 8 391572 12958) (floats 8 73 246) (intervals 56 414 19) (buffers 960 13) (heap 1024 37165 1064)) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 18 11:20:38 2014 Received: (at 18490-done) by debbugs.gnu.org; 18 Sep 2014 15:20:38 +0000 Received: from localhost ([127.0.0.1]:44646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUdVd-0005JM-4P for submit@debbugs.gnu.org; Thu, 18 Sep 2014 11:20:37 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:33102) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUdVa-0005JA-3Z for 18490-done@debbugs.gnu.org; Thu, 18 Sep 2014 11:20:35 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NC300M00RO53G00@a-mtaout23.012.net.il> for 18490-done@debbugs.gnu.org; Thu, 18 Sep 2014 18:20:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC300MEQRY83910@a-mtaout23.012.net.il>; Thu, 18 Sep 2014 18:20:32 +0300 (IDT) Date: Thu, 18 Sep 2014 18:20:34 +0300 From: Eli Zaretskii Subject: Re: bug#18490: 24.3.93; Narrowing in other window no longer redisplays until a call to other-window. In-reply-to: X-012-Sender: halo1@inter.net.il To: Matthew Smiglarski Message-id: <83zjdx0xbx.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18490-done Cc: 18490-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: 1.0 (+) > Date: Wed, 17 Sep 2014 19:50:46 +0100 > From: Matthew Smiglarski > > Hello, > When a buffer has narrowing applied the window does not update until > other-window is called. > > This is not the case on 24.3. > > To reproduce: > > 1. Start emacs > $ emacs -Q > > 2. Enter the following into some buffer > > (defun bug-redisplay-narrowing-on-other-window () > (interactive) > (widen) > (search-forward-regexp "[a-z]+") > (narrow-to-region (match-beginning 0) (match-end 0))) > > (global-set-key (kbd "M-n") 'bug-redisplay-narrowing-on-other-window) > > ;; Create 3 windows > (split-window-below) > (split-window-below) > > 3. M-x eval-buffer > > 4. Execute the bug function defined above a few times, mixing it up > with the odd call to > #'other-window. > > M-x beginning-of-buffer > M-n M-n C-x 4 o M-n M-n C-x 4 o M-n M-n > > What happens is the narrowing is only apparent to the poor user when > another window is selected, and this was not the case previously. Thanks, I fixed this in revision 117507 on the emacs-24 branch. > Apologies if this is an intended change but to me it seems that the > redisplay should occur immediately? Not immediately, but the next time Emacs schedules redisplay, yes, all the windows showing the buffer whose narrowing changed should be updated. So this is indeed a bug. Emacs 24.3 and before used to be quite conservative in deciding when a non-selected window should be redisplayed, as in "when in doubt, redisplay". The current code was changed to attempt to refrain even more from unnecessary redisplays, and this bug is fallout from those changes. > I would be interested to know how to determine when the window is > redisplayed. There's no simple answer to this question. Emacs employs several flags to track when a buffer or a window or a frame might need to be redrawn, and also tries to distinguish between redisplay of the window content from redisplay of the mode line. Look at the first 200 lines of redisplay_internal to see the complicated logic by which Emacs decides whether it needs to redisplay more than just the selected window on the selected frame. From unknown Sun Aug 10 07:40:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 17 Oct 2014 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator