Article View: gnu.emacs.bug
Article #98444Bug in GNU Emacs V18.57
From: Darryl Okahata
Date: Tue, 11 Jun 1991 06:02
Date: Tue, 11 Jun 1991 06:02
70 lines
3017 bytes
3017 bytes
* Bug in GNU Emacs V18.57 (running under X11):
The `set-window-start' function does nothing to cause the window to
be redisplayed/updated. As a result, if the window being modified is
*NOT* the currently selected window, the modified window will not be
updated unless the cursor is either moved into the modified window, or
an explicit screen refresh is done. This bug seems to have gone
unnoticed for so long because `set-window-start' is usually used in
conjunction with *OTHER* functions that cause the window to be
refreshed.
To reproduce:
1. Evaluate the following in the *scratch* buffer (this should be the
ONLY displayed buffer):
(defun foo ()
(interactive)
(let ( (buf "XXX") )
(set-window-start (display-buffer buf) 10)
)
)
(global-set-key "\^\\" 'foo) ;; bind function to C-\
2. Split the *scratch* buffer into two windows, and make one of the two
windows display a buffer called "XXX".
3. Put some random, but short, lines of text in the "XXX" buffer.
4. Go to the *scratch* buffer window, and press C-\. Nothing will
happen.
5. Move to the "XXX" buffer using C-x o. When the cursor moves into the
window, the buffer will be updated (this should have occurred
immediately after pressing C-\).
6. Note that this bug does not occur if you use C-j in the *scratch*
buffer to execute `foo'. This is because pressing C-j causes `widen'
(or `narrow-to-region') to eventually be executed, which explicitly
sets a redraw flag ("clip_changed").
To fix, apply the included patch.
-- Darryl Okahata
Internet: darrylo@sr.hp.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.
===============================================================================
*** /disk/07/darrylo/emacs-18.57/src/window.c Tue Jan 8 10:21:13 1991
--- window.c Mon Jun 10 22:17:09 1991
***************
*** 329,334
w->force_start = Qt;
w->update_mode_line = Qt;
XFASTINT (w->last_modified) = 0;
return pos;
}
--- 329,335 -----
w->force_start = Qt;
w->update_mode_line = Qt;
XFASTINT (w->last_modified) = 0;
+ windows_or_buffers_changed++; /* hack, kludge, oop, ack, barf */
return pos;
}
Technical Details
Message-ID:
<9106110602.AA07159@hpnmxx.sr.hp.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbageShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,7c6a83e0875ec627,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-06-10 23:02:14 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage From: darrylo@HPNMXX.SR.HP.COM (Darryl Okahata) Newsgroups: gnu.emacs.bug Subject: Bug in GNU Emacs V18.57 Message-ID: <9106110602.AA07159@hpnmxx.sr.hp.com> Date: 11 Jun 91 06:02:14 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 70 Approved: bug-gnu-emacs@prep.ai.mit.edu