From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/6195 Path: main.gmane.org!not-for-mail From: Mark Borges Newsgroups: gmane.emacs.gnus.general Subject: Re: Recentering bug in gnus-xmas - FIX Date: 13 May 1996 11:26:44 -0600 Sender: mdb@cdc.noaa.gov Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035146686 2837 80.91.224.250 (20 Oct 2002 20:44:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:44:46 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id LAA00161 for ; Mon, 13 May 1996 11:27:38 -0700 Original-Received: from cdc.noaa.gov (manager.Colorado.EDU [128.138.218.210]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 13 May 1996 19:28:34 +0200 Original-Received: from roberts by cdc.noaa.gov (SMI-8.6/SMI-SVR4) id LAA06164; Mon, 13 May 1996 11:28:24 -0600 Original-Received: by roberts (SMI-8.6) id LAA04377; Mon, 13 May 1996 11:26:46 -0600 Original-To: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) In-Reply-To: sperber@informatik.uni-tuebingen.de's message of 11 May 1996 19:08:51 +0200 Original-Lines: 52 X-Mailer: September Gnus v0.84/XEmacs 19.14 Xref: main.gmane.org gmane.emacs.gnus.general:6195 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:6195 >> On 11 May 1996 19:08:51 +0200, >> Michael Sperber [Mr Preprocessor](ms) wrote: ms> Steve L Baur noticed this awhile ago. He wrote: >> 1. Setting gnus-auto-center-summary to t (the default) produces bogus >> behavior on XEmacs 19.14 -- it warps the cursor off of the last >> article in the *Summary* buffer all too often. ms> This is due to the fact that window-height doesn't really report what ms> you want. ms> The patch is relative to 0.80. Our ftp gateway is shut down, so I'm ms> not sure the bug's still there in the current sgnus I think this patch was applied to sgnus-0.84 (the new defun is appended) but it doesn't work. I still see the lossage. Was the patch applied correctly? (defun gnus-xmas-summary-recenter () "\"Center\" point in the summary window. If `gnus-auto-center-summary' is nil, or the article buffer isn't displayed, no centering will be performed." ;; Suggested by earle@mahendo.JPL.NASA.GOV (Greg Earle). ;; Recenter only when requested. Suggested by popovich@park.cs.columbia.edu. (when gnus-auto-center-summary (let* ((height (if (fboundp 'window-displayed-height) (window-displayed-height) (- (window-height) 2))) (top (cond ((< height 4) 0) ((< height 7) 1) (t 2))) (bottom (save-excursion (goto-char (point-max)) (forward-line (- height)) (point))) (window (get-buffer-window (current-buffer)))) (when (get-buffer-window gnus-article-buffer) ;; Only do recentering when the article buffer is displayed, ;; Set the window start to either `bottom', which is the biggest ;; possible valid number, or the second line from the top, ;; whichever is the least. (set-window-start window (min bottom (save-excursion (forward-line (- top)) (point))))) ;; Do horizontal recentering while we're at it. (when (and (get-buffer-window (current-buffer) t) (not (eq gnus-auto-center-summary 'vertical))) (let ((selected (selected-window))) (select-window (get-buffer-window (current-buffer) t)) (gnus-summary-position-point) (gnus-horizontal-recenter) (select-window selected)))))) -- -mb-