From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60573 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.gnus.general Subject: Re: Article viewing and scroll-margin Date: Fri, 15 Jul 2005 09:02:10 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1121448348 4036 80.91.229.2 (15 Jul 2005 17:25:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2005 17:25:48 +0000 (UTC) Original-X-From: ding-owner+M9101@lists.math.uh.edu Fri Jul 15 19:25:45 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DtTvF-00089F-Dp for ding-account@gmane.org; Fri, 15 Jul 2005 19:24:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DtTtC-0005p4-00; Fri, 15 Jul 2005 12:22:18 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DtKDN-0003Fc-00 for ding@lists.math.uh.edu; Fri, 15 Jul 2005 02:02:29 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DtKDI-0000Pb-Es for ding@lists.math.uh.edu; Fri, 15 Jul 2005 02:02:24 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DtKDH-0002x9-00 for ; Fri, 15 Jul 2005 09:02:23 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DtKDD-0007xM-GF for ding@gnus.org; Fri, 15 Jul 2005 09:02:19 +0200 Original-Received: from iwi190.iwi.uni-sb.de ([134.96.72.190]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jul 2005 09:02:19 +0200 Original-Received: from angeli by iwi190.iwi.uni-sb.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jul 2005 09:02:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 100 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: iwi190.iwi.uni-sb.de Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEUAAAD7+vVSPEL+/v79 /v1rDy/y7uQtAhK3tbD99doDAALV08n////+//78/fw7ARdgBieLg4LQmlLpAAACPklEQVR4nK2V 27KrMAiGTUCC0OLi/V92kRitp73HziwuOq3m4+cQ6PD60oY/AVCZEzwHkBXZ6Tmgikmc7yVuAGQD UOLHCqgEL7DnCpCYEFUfK1TCs9tz4AXokvEL4AUq5RuFF5DIF30IwES+SLoSRZ73Ifyri+To3xMA AMxlkDCPjsMZugLEWYZmkp3p/wAaeRl2JsXJENDwCgBgXKAiMhyIkMk5+zYeGwBG7J4P/ltYzYPk lfgAfD7bFSQEQpfxBCSpb6+Aa6SQONMZsOxK6VOifn6ZiigG2xEA1Vp0SOR7Ii/NI+d1PlbAFg+Y i+5z8SWQuO3GR6A7AM/Jd0A/FQrYR3YD+m02xF1MkQL0Htk/gKbfzvbrtD6lUw601hksWlVy9LBW XxT603OVMHZjfQfI4XeKLZCdtEgmeLfz5z7U3WJtFMKvTrnGw1OMReHaHd4i3t0lj2LzEk98cVeN 4ntDM8IFiLzbK9cprH0spl52ue+BGLTC05252/sGwJTp9vw0MV2Aeo/IWwjcTav58t1OOcTgx6YY R47jyqafFFRtV6INqLM8VvMIim2fCZsnvABA42pRTdoB5DEJ7yMQs/8535iltDUbrx4OC60BqcYT TSg/4425nUIC4Hhc2kzLDeJ4DimNTaBviZD5mRs3N8VMh3+KCqwC22IRiQfzOEvfsEcgbt1HYNuQ s5RwUtdYOQFv06reHB/2V/1dgXWGVmAVCFdyPF+ntMQK8RNAY6/pvKUd80AxERXKsZsOwC94/1VQ /4fx6QAAAABJRU5ErkJggg== User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:H9NqTSWd+lHewvR/IxNLHSpNnnc= X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60573 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60573 --=-=-= * Katsumi Yamaoka (2005-07-15) writes: >>>>>> In Norbert Koch wrote: > >> Since the last update to No Gnus v0.4 I get the following error if I >> want to see past the first page of an article: > >> Debugger entered--Lisp error: (void-variable scroll-margin) >> gnus-article-next-page(nil) >> gnus-summary-next-page(nil) >> call-interactively(gnus-summary-next-page) > >> This is on SXEmacs: >> steve@sxemacs.org--2005/sxemacs--main--22.1.3--patch-9, built Mon Jul >> 11 08:49:32 2005 on arafel.viteno.net > > And Emacs 21.4 complains that: > > Debugger entered--Lisp error: (void-function window-body-height) The following patch should fix it. Unless somebody encounters an error with it, could someone please check it in? Regarding the implementation: I could write a compatibility function for `window-body-height' in order to make calculation of the correct position for moving point work in Emacs 21 as well. But as there haven't been any problems with this version of Emacs when putting point into the scroll margin, it is probably not worth it. 2005-07-15 Ralf Angeli * gnus-art.el (gnus-article-next-page, gnus-article-next-page-1) (gnus-article-prev-page): Make positioning of point compatible with Emacs 21 and XEmacs. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment --- gnus-art.el 15 Jul 2005 08:36:19 +0200 7.103 +++ gnus-art.el 15 Jul 2005 08:50:38 +0200 @@ -5164,7 +5164,11 @@ If end of article, return non-nil. Otherwise return nil. Argument LINES specifies lines to be scrolled up." (interactive "p") - (move-to-window-line (max (- -1 scroll-margin) (- -1 (window-body-height)))) + (move-to-window-line (if (and (boundp 'scroll-margin) + (fboundp 'window-body-height)) + (max (- -1 scroll-margin) + (- -1 (window-body-height))) + -1)) (if (save-excursion (end-of-line) (and (pos-visible-in-window-p) ;Not continuation line. @@ -5193,13 +5197,19 @@ (end-of-buffer ;; Long lines may cause an end-of-buffer error. (goto-char (point-max))))) - (move-to-window-line (min scroll-margin (window-body-height)))) + (move-to-window-line (if (and (boundp 'scroll-margin) + (fboundp 'window-body-height)) + (min scroll-margin (window-body-height)) + 0))) (defun gnus-article-prev-page (&optional lines) "Show previous page of current article. Argument LINES specifies lines to be scrolled down." (interactive "p") - (move-to-window-line (min scroll-margin (window-body-height))) + (move-to-window-line (if (and (boundp 'scroll-margin) + (fboundp 'window-body-height)) + (min scroll-margin (window-body-height)) + 0)) (if (and gnus-page-broken (bobp) (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? @@ -5213,7 +5223,10 @@ (scroll-down lines) (beginning-of-buffer (goto-char (point-min)))) - (move-to-window-line (min scroll-margin (window-body-height))))))) + (move-to-window-line (if (and (boundp 'scroll-margin) + (fboundp 'window-body-height)) + (min scroll-margin (window-body-height)) + 0)))))) (defun gnus-article-only-boring-p () "Decide whether there is only boring text remaining in the article. --=-=-= -- Ralf --=-=-=--