Subject: Re: bug#1073: 23.0.60; Bad interaction between compilation-scroll-output and dedicated windows

From: martin rudalics <[email-masked]>
Date: Sun, 05 Oct 2008 20:58:09 +0200

> I think the select-window thingy is/was needed in order to make sure we
 > move point in the relevant window, rather than just moving point in the
 > relevant buffer.
 > So maye something like:
 >
 >     (with-selected-window outwin
 >       (with-current-buffer (window-buffer outwin)
 >         ...))
 >
 > would be better.

The original code had

     (goto-char (point-max))

which moves point in all windows showing the relevant buffer.  In that
sense I didn't change the semantics of the original code.

IIUC you want something similar to the

	;; Position point as the user will see it.
	(let ((desired-visible-point
	       ;; Put it at the end if `compilation-scroll-output' is set.
	       (if compilation-scroll-output
		   (point-max)
		 ;; Normally put it at the top.
		 (point-min))))
	  (if (eq outwin (selected-window))
	      (goto-char desired-visible-point)
	    (set-window-point outwin desired-visible-point)))

stuff a few lines above?  Or am I missing something?

martin