🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189259

strange window scrolling

#189259
From: Henry Kautz
Date: Thu, 21 Mar 1991 21:06
51 lines
1963 bytes
I have a problem with strange scrolling of windows.  Here's the
situation.

Buffers A and B are each displayed in separate windows.
I have a function (foo) which performs a lot of operations involving
restricting, widening, inserting, etc.  The very last operation in
(foo) is (goto-char (point-min)).

So when the current window is A, I can execute (foo) and when it
finishes the current restriction is displayed beginning at the top of
A's window.

I have another function (bar), which is simply the following:
	(defun bar ()
		(interactive)
		(set-buffer "A")
		(foo))
Now when the current buffer is B, and I execute (bar), the result is
that the top of the current restriction of A is scrolled up off of the
top of A's window!

The following does NOT fix the problem:

	(defun bar ()
		(interactive)
		(save-window-excursion
			(set-buffer "A")	
			(foo)))

In fact, if I write

	(defun bar ()
		(interactive)
		(set-buffer "A")
		(foo)
		(goto-char (point-min))
		(setq xxx (point))
		)

Then indeed xxx is set to the proper value, the first character of the
current restriction of A, but then AFTER bar completes the window
scrolls and point is moved forward.

Any ideas about what is going on here, and what to do about it?

Please email as well as post possible sol'ns.  Thanks.
--
---- Henry Kautz

:internet: 	kautz@research.att.com
:uucp:		allegra!kautz		
Technical Details
Message-ID: <KAUTZ.91Mar21160658@adhoc.tempo.nj.att.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!decwrl!ucbvax!ulysses!allegra!kautz

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,5fec1a97d72d73fc,start
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-03-22 18:33:07 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!decwrl!ucbvax!ulysses!allegra!kautz
From: kautz@allegra.att.com (Henry Kautz)
Newsgroups: gnu.emacs.help
Subject: strange window scrolling
Message-ID: <KAUTZ.91Mar21160658@adhoc.tempo.nj.att.com>
Date: 21 Mar 91 21:06:58 GMT
Sender: netnews@ulysses.att.com
Distribution: gnu
Organization: AT&T Bell Laboratories
Lines: 51