From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50105 Path: main.gmane.org!not-for-mail From: Frank Weinberg Newsgroups: gmane.emacs.gnus.general Subject: [Patch] Auto-centering of group-buffer Date: Thu, 13 Feb 2003 20:01:14 +0100 Organization: Offizielle Usenet-Rundfahrt 2001 Sender: owner-ding@hpc.uh.edu Message-ID: <4452@msgid.usenet-rundfahrt.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1045162851 12425 80.91.224.249 (13 Feb 2003 19:00:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2003 19:00:51 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jOb9-0003Dq-00 for ; Thu, 13 Feb 2003 20:00:39 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18jOcZ-00030b-00; Thu, 13 Feb 2003 13:02:07 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 13 Feb 2003 13:03:06 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id NAA08380 for ; Thu, 13 Feb 2003 13:02:54 -0600 (CST) Original-Received: (qmail 97962 invoked by alias); 13 Feb 2003 19:01:51 -0000 Original-Received: (qmail 97957 invoked from network); 13 Feb 2003 19:01:50 -0000 Original-Received: from mail.uni-kl.de (HELO uni-kl.de) (131.246.137.52) by 66.230.238.6 with SMTP; 13 Feb 2003 19:01:50 -0000 Original-Received: from mailgate1.uni-kl.de (mailgate1.uni-kl.de [131.246.120.5]) by uni-kl.de (8.12.4/8.12.4) with ESMTP id h1DJ1lvj015790 for ; Thu, 13 Feb 2003 20:01:47 +0100 (MET) Original-Received: from aixs1.rhrk.uni-kl.de (aixs1.rhrk.uni-kl.de [131.246.137.3]) by mailgate1.uni-kl.de (8.12.6/8.12.6) with ESMTP id h1DJ1ltU026418 for ; Thu, 13 Feb 2003 20:01:47 +0100 Original-Received: from alcatraz100.wohnheim.uni-kl.de ([131.246.107.109] helo=flip.usenet-rundfahrt.de) by aixs1.rhrk.uni-kl.de with esmtp (Exim 4.04) id 18jOcE-000oQQ-00 for ding@gnus.org; Thu, 13 Feb 2003 20:01:46 +0100 Original-To: ding Mail-Followup-To: ding@gnus.org X-Newsreader: Beim Wassersaufen von Krokodilen zerfleddert X-Face: (~x:SLqE0prGsm=Gs`O}o=9ohKu8cwT-gktS^K}%!~;n9%D"gu0U64To`NN$.d'b(qa?v^vr&l6"a/VoX#X-D;9,GXik*%pkk7*>CayKIBH)?PE&5x&JwDyh5+Z,hs;p!aFXP\8P User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50105 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50105 --=-=-= Hi, I'm using a window-setup with the group-buffer always visible and found it annoying that Gnus scrolled down the buffer as soon as point reached the lower half of the window, even if the whole buffer fits into the window. So I introduced a new variable gnus-auto-center-group which allows to turn off this feature. The default of t leaves the old behaviour unchanged. I also encountered that the parameter TARGET-GROUP was called NEXT-GROUP in the docstring of gnus-summary-next-group - fixed it. Suggested ChangeLog entry: 2003-02-13 Frank Weinberg * gnus-sum.el (gnus-auto-center-group): new variable (gnus-summary-read-group-1): use it (gnus-summary-next-group): docstring fixed Frank --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-sum.el.patch --- gnus-sum.el.orig Thu Feb 13 18:12:38 2003 +++ gnus-sum.el Thu Feb 13 19:25:01 2003 @@ -360,6 +360,9 @@ (integer :tag "height") (sexp :menu-tag "both" t))) +(defvar gnus-auto-center-group t + "*If non-nil, always center the group buffer.") + (defcustom gnus-show-all-headers nil "*If non-nil, don't hide any headers." :group 'gnus-article-hiding @@ -3533,7 +3536,8 @@ (gnus-summary-position-point) (gnus-configure-windows 'summary 'force) (gnus-set-mode-line 'summary)) - (when (get-buffer-window gnus-group-buffer t) + (when (and gnus-auto-center-group + (get-buffer-window gnus-group-buffer t)) ;; Gotta use windows, because recenter does weird stuff if ;; the current buffer ain't the displayed window. (let ((owin (selected-window))) @@ -6656,7 +6660,7 @@ (defun gnus-summary-next-group (&optional no-article target-group backward) "Exit current newsgroup and then select next unread newsgroup. If prefix argument NO-ARTICLE is non-nil, no article is selected -initially. If NEXT-GROUP, go to this group. If BACKWARD, go to +initially. If TARGET-GROUP, go to this group. If BACKWARD, go to previous group instead." (interactive "P") ;; Stop pre-fetching. --=-=-=--