GNU bug report logs - #18490
24.3.93; Narrowing in other window no longer redisplays until a call to other-window.

Previous Next

Package: emacs;

Reported by: Matthew Smiglarski <matthew.smiglarski <at> gmail.com>

Date: Wed, 17 Sep 2014 19:42:01 UTC

Severity: important

Found in version 24.3.93

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18490 in the body.
You can then email your comments to 18490 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18490; Package emacs. (Wed, 17 Sep 2014 19:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew Smiglarski <matthew.smiglarski <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 17 Sep 2014 19:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matthew Smiglarski <matthew.smiglarski <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.93; Narrowing in other window no longer redisplays until a call
 to other-window.
Date: Wed, 17 Sep 2014 19:50:46 +0100
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 <tab> <return> M-x e v a l -
b u f <tab> <return> 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 <tab> - e - b <tab>
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
byte-code: Window #<window 3 on
bug-redisplay-narrowing-in-other-window.el> 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))




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 18 Sep 2014 15:21:02 GMT) Full text and rfc822 format available.

Notification sent to Matthew Smiglarski <matthew.smiglarski <at> gmail.com>:
bug acknowledged by developer. (Thu, 18 Sep 2014 15:21:02 GMT) Full text and rfc822 format available.

Message #10 received at 18490-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matthew Smiglarski <matthew.smiglarski <at> gmail.com>
Cc: 18490-done <at> debbugs.gnu.org
Subject: Re: bug#18490: 24.3.93;
 Narrowing in other window no longer redisplays until a call
 to	other-window.
Date: Thu, 18 Sep 2014 18:20:34 +0300
> Date: Wed, 17 Sep 2014 19:50:46 +0100
> From: Matthew Smiglarski <matthew.smiglarski <at> gmail.com>
> 
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Oct 2014 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.