From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54385 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-page-broken won't be cleared Date: Tue, 21 Oct 2003 12:27:12 +0900 Organization: Emacsen advocacy group Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1066706901 32343 80.91.224.253 (21 Oct 2003 03:28:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2003 03:28:21 +0000 (UTC) Original-X-From: ding-owner+M2926@lists.math.uh.edu Tue Oct 21 05:28:19 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ABnBz-0000Bc-00 for ; Tue, 21 Oct 2003 05:28:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1ABnBt-0006ck-00; Mon, 20 Oct 2003 22:28:13 -0500 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1ABnBp-0006cf-00 for ding@lists.math.uh.edu; Mon, 20 Oct 2003 22:28:09 -0500 Original-Received: from washington.hostforweb.net (washington.hostforweb.net [69.61.11.2]) by justine.libertine.org (Postfix) with ESMTP id 0D4B33A004C for ; Mon, 20 Oct 2003 22:28:09 -0500 (CDT) Original-Received: from yamaoka by washington.hostforweb.net with local (Exim 4.24) id 1ABnBp-00070J-Mo for ding@gnus.org; Mon, 20 Oct 2003 23:28:10 -0400 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Reasonable Discussion, linux) Cancel-Lock: sha1:xIwTEjLoiyER3VMlANV23wfXz1s= X-Payment: hashcash 1.2 0:031021:ding@gnus.org:39c64a8bcc89cf04 X-Hashcash: 0:031021:ding@gnus.org:39c64a8bcc89cf04 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [32041 32041] / [47 12] X-AntiAbuse: Sender Address Domain - washington.hostforweb.net Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54385 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54385 --=-=-= >>>>> In Katsumi Yamaoka wrote: > The present gnus-narrow-to-page is simply broken, isn't it? ;-) Here is a new patch which really fixes the problem. It also fixes the gnus-summary-end-of-article function which didn't work for articles containing ^Ls. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- gnus-art.el~ 2003-10-19 22:09:03 +0000 +++ gnus-art.el 2003-10-21 03:25:59 +0000 @@ -4933,13 +4933,16 @@ (let ((buffer-read-only nil)) (gnus-remove-text-with-property 'gnus-prev) (gnus-remove-text-with-property 'gnus-next))) - (when + (if (cond ((< arg 0) (re-search-backward page-delimiter nil 'move (1+ (abs arg)))) ((> arg 0) (re-search-forward page-delimiter nil 'move arg))) - (setq gnus-page-broken t) - (goto-char (match-end 0))) + (goto-char (match-end 0)) + (save-excursion + (goto-char (point-min)) + (setq gnus-page-broken + (and (re-search-forward page-delimiter nil t) t)))) (when gnus-page-broken (narrow-to-region (point) --- gnus-sum.el~ 2003-10-19 22:09:04 +0000 +++ gnus-sum.el 2003-10-21 03:25:59 +0000 @@ -8506,7 +8506,7 @@ (gnus-eval-in-buffer-window gnus-article-buffer (widen) (goto-char (point-min)) - (when gnus-page-broken + (when gnus-break-pages (gnus-narrow-to-page)))) (defun gnus-summary-end-of-article () @@ -8518,7 +8518,9 @@ (widen) (goto-char (point-max)) (recenter -3) - (when gnus-page-broken + (when gnus-break-pages + (when (re-search-backward page-delimiter nil t) + (narrow-to-region (match-end 0) (point-max))) (gnus-narrow-to-page)))) (defun gnus-summary-print-truncate-and-quote (string &optional len) @@ -8708,10 +8710,12 @@ (widen) (if window (set-window-start window (goto-char (point-min)))) - (setq gnus-page-broken - (when gnus-break-pages - (gnus-narrow-to-page) - t)) + (if gnus-break-pages + (gnus-narrow-to-page) + (when (gnus-visual-p 'page-marker) + (let ((buffer-read-only nil)) + (gnus-remove-text-with-property 'gnus-prev) + (gnus-remove-text-with-property 'gnus-next)))) (gnus-set-mode-line 'article))))) (defun gnus-summary-show-all-headers () --=-=-=--