Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: gnus-page-broken won't be cleared
Date: Tue, 21 Oct 2003 12:27:12 +0900	[thread overview]
Message-ID: <b9yhe239sof.fsf@jpl.org> (raw)
In-Reply-To: <b9yd6csmjvy.fsf@jpl.org>

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

>>>>> In <b9yd6csmjvy.fsf@jpl.org> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1905 bytes --]

--- 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 ()

  reply	other threads:[~2003-10-21  3:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-20  5:40 Katsumi Yamaoka
2003-10-20  7:46 ` Katsumi Yamaoka
2003-10-21  3:27   ` Katsumi Yamaoka [this message]
2003-10-21 13:02     ` Reiner Steib
2003-10-21 14:28       ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9yhe239sof.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).