Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-page-broken won't be cleared
@ 2003-10-20  5:40 Katsumi Yamaoka
  2003-10-20  7:46 ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2003-10-20  5:40 UTC (permalink / raw)


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

Hi,

I noticed that the gnus-page-broken flag won't be cleared once
it has been set to t.  Because of this, the SPC key in the
summary buffer sometimes doesn't show the next article but

Previous page...

if the article buffer was just filled by the whole article,
even if it doesn't contain `^L's.  How about the following
patch?


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

--- gnus-art.el~	2003-10-19 22:09:03 +0000
+++ gnus-art.el	2003-10-20 05:35:00 +0000
@@ -4933,13 +4933,15 @@
       (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)))
+	(progn
+	  (setq gnus-page-broken t)
+	  (goto-char (match-end 0)))
+      (setq gnus-page-broken nil))
     (when gnus-page-broken
       (narrow-to-region
        (point)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gnus-page-broken won't be cleared
  2003-10-20  5:40 gnus-page-broken won't be cleared Katsumi Yamaoka
@ 2003-10-20  7:46 ` Katsumi Yamaoka
  2003-10-21  3:27   ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2003-10-20  7:46 UTC (permalink / raw)


>>>>> In <b9yptgs8o1n.fsf@jpl.org> Katsumi Yamaoka wrote:

> Hi,

> I noticed that the gnus-page-broken flag won't be cleared once
> it has been set to t.  Because of this, the SPC key in the
> summary buffer sometimes doesn't show the next article but

> Previous page...

> if the article buffer was just filled by the whole article,
> even if it doesn't contain `^L's.  How about the following
> patch?

> --- gnus-art.el~	2003-10-19 22:09:03 +0000
> +++ gnus-art.el	2003-10-20 05:35:00 +0000

Oops.  It doesn't fix nothing.
\f
The present gnus-narrow-to-page is simply broken, isn't it? ;-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gnus-page-broken won't be cleared
  2003-10-20  7:46 ` Katsumi Yamaoka
@ 2003-10-21  3:27   ` Katsumi Yamaoka
  2003-10-21 13:02     ` Reiner Steib
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2003-10-21  3:27 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gnus-page-broken won't be cleared
  2003-10-21  3:27   ` Katsumi Yamaoka
@ 2003-10-21 13:02     ` Reiner Steib
  2003-10-21 14:28       ` Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2003-10-21 13:02 UTC (permalink / raw)


On Tue, Oct 21 2003, Katsumi Yamaoka wrote:

>>>>>> In <b9yd6csmjvy.fsf@jpl.org> Katsumi Yamaoka wrote:
>
>> The present gnus-narrow-to-page is simply broken, isn't it? ;-)

Yes, it was.

> 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.

The patch fixes both problems for me.  Please commit your patch.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: gnus-page-broken won't be cleared
  2003-10-21 13:02     ` Reiner Steib
@ 2003-10-21 14:28       ` Katsumi Yamaoka
  0 siblings, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2003-10-21 14:28 UTC (permalink / raw)


>>>>> In <v9n0buyc8y.fsf@marauder.physik.uni-ulm.de> 
>>>>>	Reiner Steib <4.uce.03.r.s@nurfuerspam.de> wrote:

>>> The present gnus-narrow-to-page is simply broken, isn't it? ;-)

> Yes, it was.

[...]

> The patch fixes both problems for me.  Please commit your patch.

Committed.  I couldn't wait for Lars to followup. ;-)
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-21 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20  5:40 gnus-page-broken won't be cleared Katsumi Yamaoka
2003-10-20  7:46 ` Katsumi Yamaoka
2003-10-21  3:27   ` Katsumi Yamaoka
2003-10-21 13:02     ` Reiner Steib
2003-10-21 14:28       ` Katsumi Yamaoka

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