ljz@fx.com (Lloyd Zusman) (02/15/89)
There is one place inside of GNU Emacs where the variable 'scroll-step' is ignored: when an insert is done that causes the point to move off the screen, the screen always gets recentered irrespective of the setting of 'scroll-step'. This occurs in several different places: in the 'insert' function; when process output goes into a buffer; and probably elsewhere. I find this to be rather annoying. So, I dug through the source code for version 18.52 and found where the "problem" occurs (if it indeed is a problem). It's in the file xdisp.c in the function redisplay_window(). Here is the short set of context diffs for a proposed "fix" of this "problem": ---------------- diffs start here ---------------- *** xdisp.c.old Tue Feb 14 14:17:43 1989 --- xdisp.c Tue Feb 14 17:50:30 1989 *************** *** 748,754 **** /* Finally, just choose place to start which centers point */ recenter: ! pos = *vmotion (point, - height / 2, width, hscroll, window); try_window (window, pos.bufpos); startp = marker_position (w->start); --- 748,756 ---- /* Finally, just choose place to start which centers point */ recenter: ! pos = *vmotion (point, ! scroll_step > 0 ? scroll_step - height : - height / 2, ! width, hscroll, window); try_window (window, pos.bufpos); startp = marker_position (w->start); ----------------- diffs end here ----------------- This change causes the window to scroll to the center if scroll-step is <= 0; otherwise, it scrolls by the number of lines in scroll-step. This "fix" is just a suggestion ... it may be that such a thing is undesirable or else that I didn't properly "fix" the problem at all. Please take these diffs only as a suggestion for a future change rather than the final word on the subject. What do some of you think about this? -- Lloyd Zusman, Master Byte Software, Los Gatos, California "We take things well in hand." Net access courtesy of FX Development Group, Inc., Mountain View, California Internet: ljz@fxgrp.fx.com uucp: ...!ames!fxgrp!ljz
tale@pawl.rpi.edu (David C Lawrence) (02/20/89)
I think you are a little wrong; (insert str) has obeyed the settings of scroll-step for me. This is in GNU Emacs 18.50.2 of Sun Oct 30 1988 on imagine.pawl.rpi.edu (berkeley-unix) and it exhibits that behaviour quite explicitly for me with an interactive process I wrote. It is the closest I have yet been able to come with "normal" scrolling. That is one thing I wish you could make buffer local, though ... normal scrolling without recenter. I want this one particular mode to be that way and also my shell buffers. Someday, perhaps. Dave -- tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu