Gnus development mailing list
 help / color / mirror / Atom feed
* Threading wrong if showing undownloaded articles
@ 2003-02-27 14:51 Kai Großjohann
  2003-02-28  5:46 ` Kevin Greiner
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2003-02-27 14:51 UTC (permalink / raw)


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

See this summary buffer:


[-- Attachment #2: x.png --]
[-- Type: image/png, Size: 8706 bytes --]

[-- Attachment #3: Type: text/plain, Size: 345 bytes --]


As you can see, the \--\ markers have moved right for the messages
that were selected for display.  Also, the threads aren't shown
correctly -- after doing J u on that group and reentering I see
proper thread trees.

(The \--\ characters come from %B in gnus-summary-line-format.)

-- 
A preposition is not a good thing to end a sentence with.

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

* Re: Threading wrong if showing undownloaded articles
  2003-02-27 14:51 Threading wrong if showing undownloaded articles Kai Großjohann
@ 2003-02-28  5:46 ` Kevin Greiner
  2003-02-28 13:07   ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Greiner @ 2003-02-28  5:46 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> See this summary buffer:
>
>
>
> As you can see, the \--\ markers have moved right for the messages
> that were selected for display.  Also, the threads aren't shown
> correctly -- after doing J u on that group and reentering I see
> proper thread trees.
>
> (The \--\ characters come from %B in gnus-summary-line-format.)

There is so little agent code exposed via the summary that I can't see
how the agent is the direct cause of this problem.  Are you using
gnus-agent-fetch-selected-article to download these articles?  If so,
the summary code redrew the lines to change the - to + in column 1 and
change the line's color.  It's possible that the summary didn't
position the fields correctly in the updated line.

You might this test function.
(defun test1 (article)
  (gnus-summary-goto-subject article nil t)
  (gnus-summary-update-article-line
        article
	 (gnus-summary-article-header article)))

The next time you notice that downloaded articles are misaligned, use
this function to force specified articles to update without calling
the agent.  In particular, try it on the article following the
incorrectly displayed articles.

Kevin



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

* Re: Threading wrong if showing undownloaded articles
  2003-02-28  5:46 ` Kevin Greiner
@ 2003-02-28 13:07   ` Kai Großjohann
  2003-02-28 13:52     ` Kevin Greiner
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2003-02-28 13:07 UTC (permalink / raw)


Kevin Greiner <kgreiner@xpediantsolutions.com> writes:

> kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
>
>> As you can see, the \--\ markers have moved right for the messages
>> that were selected for display.  Also, the threads aren't shown
>> correctly -- after doing J u on that group and reentering I see
>> proper thread trees.
>>
>> (The \--\ characters come from %B in gnus-summary-line-format.)
>
> There is so little agent code exposed via the summary that I can't see
> how the agent is the direct cause of this problem.

I believe that :-)

> Are you using gnus-agent-fetch-selected-article to download these
> articles?  If so, the summary code redrew the lines to change the -
> to + in column 1 and change the line's color.  It's possible that
> the summary didn't position the fields correctly in the updated
> line.

What I did was to exit the group with q, then did J u on that group
in the Group buffer, then I entered the group again.

> You might this test function.
> (defun test1 (article)
>   (gnus-summary-goto-subject article nil t)
>   (gnus-summary-update-article-line
>         article
> 	 (gnus-summary-article-header article)))
>
> The next time you notice that downloaded articles are misaligned, use
> this function to force specified articles to update without calling
> the agent.  In particular, try it on the article following the
> incorrectly displayed articles.

Okay.

(Not sure that there is an article followed the incorrectly displayed
ones: the `wrong' ones are the undownloaded ones, and usually the
undownloaded ones will be last.  Normally I do `g J s' to get new
news.  Only sometimes I too impatient and enter groups after `g'.)

-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Threading wrong if showing undownloaded articles
  2003-02-28 13:07   ` Kai Großjohann
@ 2003-02-28 13:52     ` Kevin Greiner
  2003-03-08 17:12       ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Greiner @ 2003-02-28 13:52 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> Kevin Greiner <kgreiner@xpediantsolutions.com> writes:
>
>> kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:
>>
>>> As you can see, the \--\ markers have moved right for the messages
>>> that were selected for display.  Also, the threads aren't shown
>>> correctly -- after doing J u on that group and reentering I see
>>> proper thread trees.
>>>
>>> (The \--\ characters come from %B in gnus-summary-line-format.)
>>
>> There is so little agent code exposed via the summary that I can't see
>> how the agent is the direct cause of this problem.
>
> I believe that :-)
>
>> Are you using gnus-agent-fetch-selected-article to download these
>> articles?  If so, the summary code redrew the lines to change the -
>> to + in column 1 and change the line's color.  It's possible that
>> the summary didn't position the fields correctly in the updated
>> line.
>
> What I did was to exit the group with q, then did J u on that group
> in the Group buffer, then I entered the group again.
>
>> You might this test function.
>> (defun test1 (article)
>>   (gnus-summary-goto-subject article nil t)
>>   (gnus-summary-update-article-line
>>         article
>> 	 (gnus-summary-article-header article)))
>>
>> The next time you notice that downloaded articles are misaligned, use
>> this function to force specified articles to update without calling
>> the agent.  In particular, try it on the article following the
>> incorrectly displayed articles.
>
> Okay.
>
> (Not sure that there is an article followed the incorrectly displayed
> ones: the `wrong' ones are the undownloaded ones, and usually the
> undownloaded ones will be last.  Normally I do `g J s' to get new
> news.  Only sometimes I too impatient and enter groups after `g'.)
>

Right, the function that I provided should be able to refresh the
undownloaded articles.  I suspect that the data structures used by the
summary are being corrupted.  I'd like you to find out if that is
true.

Kevin




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

* Re: Threading wrong if showing undownloaded articles
  2003-02-28 13:52     ` Kevin Greiner
@ 2003-03-08 17:12       ` Kai Großjohann
  2003-03-08 17:31         ` Kai Großjohann
  2003-03-09  6:20         ` Kevin Greiner
  0 siblings, 2 replies; 10+ messages in thread
From: Kai Großjohann @ 2003-03-08 17:12 UTC (permalink / raw)


Kevin Greiner <kgreiner@xpediantsolutions.com> writes:

> Right, the function that I provided should be able to refresh the
> undownloaded articles.  I suspect that the data structures used by the
> summary are being corrupted.  I'd like you to find out if that is
> true.

I have now tested your function test1 on an article and it doesn't
appear to do anything (except to advance point to the next line).

I'm not 100% sure if the originally reported behavior was the same as
what I'm seeing now.  What I'm seeing now is that all articles are
shown correctly initially (the threading is correct).  But when I
select a non-downloaded article, the summary line changes.  In
particular, the %B part changes.  It appears that the new %B macro
always expands to gnus-sum-thread-tree-single-leaf, preceded by one
or two levels of indentation.  (It's always the same number of
levels, but I don't know the number offhand.)

Hm.  The thing that's inserted there is
gnus-tmp-thread-tree-header-string, according to
gnus-summary-line-format-alist.  So a hypothesis is that this
variable is b0rked.

Which function is called to show the summary line when I select an
article?

Ah.  gnus-tmp-thread-tree-header-string is only set in one spot, in
gnus-summary-prepare-threads.  Hmm...  Oh!  Selecting an article
appears to call gnus-summary-update-article-line which calls
gnus-summary-insert-line which does not know about the correct value.

Is this analysis correct?
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Threading wrong if showing undownloaded articles
  2003-03-08 17:12       ` Kai Großjohann
@ 2003-03-08 17:31         ` Kai Großjohann
  2003-03-09  6:20         ` Kevin Greiner
  1 sibling, 0 replies; 10+ messages in thread
From: Kai Großjohann @ 2003-03-08 17:31 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> Is this analysis correct?

M-% analysis RET wild guess RET

-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Threading wrong if showing undownloaded articles
  2003-03-08 17:12       ` Kai Großjohann
  2003-03-08 17:31         ` Kai Großjohann
@ 2003-03-09  6:20         ` Kevin Greiner
  2003-03-09 11:19           ` Kai Großjohann
  1 sibling, 1 reply; 10+ messages in thread
From: Kevin Greiner @ 2003-03-09  6:20 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> Kevin Greiner <kgreiner@xpediantsolutions.com> writes:
>
>> Right, the function that I provided should be able to refresh the
>> undownloaded articles.  I suspect that the data structures used by the
>> summary are being corrupted.  I'd like you to find out if that is
>> true.
>
> I have now tested your function test1 on an article and it doesn't
> appear to do anything (except to advance point to the next line).
>
> I'm not 100% sure if the originally reported behavior was the same as
> what I'm seeing now.  What I'm seeing now is that all articles are
> shown correctly initially (the threading is correct).  But when I
> select a non-downloaded article, the summary line changes.  In
> particular, the %B part changes.  It appears that the new %B macro
> always expands to gnus-sum-thread-tree-single-leaf, preceded by one
> or two levels of indentation.  (It's always the same number of
> levels, but I don't know the number offhand.)
>
> Hm.  The thing that's inserted there is
> gnus-tmp-thread-tree-header-string, according to
> gnus-summary-line-format-alist.  So a hypothesis is that this
> variable is b0rked.
>
> Which function is called to show the summary line when I select an
> article?
>
> Ah.  gnus-tmp-thread-tree-header-string is only set in one spot, in
> gnus-summary-prepare-threads.  Hmm...  Oh!  Selecting an article
> appears to call gnus-summary-update-article-line which calls
> gnus-summary-insert-line which does not know about the correct value.
>
> Is this analysis correct?

It sure looks it.  Let's try making a small change to
gnus-agent-fetch-selected-article :).

Replace the entire call to gnus-summary-update-article-line with
  (gnus-summary-update-line gnus-current-article)

Kevin



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

* Re: Threading wrong if showing undownloaded articles
  2003-03-09  6:20         ` Kevin Greiner
@ 2003-03-09 11:19           ` Kai Großjohann
  2003-03-09 14:33             ` Kevin Greiner
  0 siblings, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2003-03-09 11:19 UTC (permalink / raw)


Kevin Greiner <kgreiner@xpediantsolutions.com> writes:

> It sure looks it.  Let's try making a small change to
> gnus-agent-fetch-selected-article :).
>
> Replace the entire call to gnus-summary-update-article-line with
>   (gnus-summary-update-line gnus-current-article)

Oh, boy, I made a Freudian error and made a change in gnus-sum.el
instead.  Then I looked again and saw that you said to make the
change in gnus-agent-fetch-selected-article...

Both changes work.

Are you going to check in the fix to
gnus-agent-fetch-selected-article?

Here is a diff showing what I tried.  The gnus-sum change has been
commented out; the gnus-agent change is active.

cvs server: Diffing lisp
Index: lisp/gnus-agent.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-agent.el,v
retrieving revision 6.156
diff -u -r6.156 gnus-agent.el
--- lisp/gnus-agent.el	7 Mar 2003 04:06:25 -0000	6.156
+++ lisp/gnus-agent.el	9 Mar 2003 11:37:29 -0000
@@ -1013,9 +1013,7 @@
 	     (list gnus-current-article))
 	(setq gnus-newsgroup-undownloaded
 	      (delq gnus-current-article gnus-newsgroup-undownloaded))
-	(gnus-summary-update-article-line
-	 gnus-current-article
-	 (gnus-summary-article-header gnus-current-article))))))
+	(gnus-summary-update-line gnus-current-article)))))
 
 ;;;
 ;;; Internal functions
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.317
diff -u -r6.317 gnus-sum.el
--- lisp/gnus-sum.el	3 Mar 2003 05:39:24 -0000	6.317
+++ lisp/gnus-sum.el	9 Mar 2003 11:37:51 -0000
@@ -8506,6 +8506,7 @@
 	 header)
 	(gnus-summary-update-article-line
 	 (cdr gnus-article-current) header)
+					; (gnus-summary-update-line gnus-current-article)
 	(when (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
 	  (gnus-summary-update-secondary-mark (cdr gnus-article-current))))))
    ((not arg)

-- 
A preposition is not a good thing to end a sentence with.



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

* Re: Threading wrong if showing undownloaded articles
  2003-03-09 11:19           ` Kai Großjohann
@ 2003-03-09 14:33             ` Kevin Greiner
  2003-03-09 16:39               ` Kai Großjohann
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin Greiner @ 2003-03-09 14:33 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> Kevin Greiner <kgreiner@xpediantsolutions.com> writes:
>
>> It sure looks it.  Let's try making a small change to
>> gnus-agent-fetch-selected-article :).
>>
>> Replace the entire call to gnus-summary-update-article-line with
>>   (gnus-summary-update-line gnus-current-article)
>
> Oh, boy, I made a Freudian error and made a change in gnus-sum.el
> instead.  Then I looked again and saw that you said to make the
> change in gnus-agent-fetch-selected-article...
>
> Both changes work.
>
> Are you going to check in the fix to
> gnus-agent-fetch-selected-article?
>

Yes.  I'll check it in today.

Kevin



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

* Re: Threading wrong if showing undownloaded articles
  2003-03-09 14:33             ` Kevin Greiner
@ 2003-03-09 16:39               ` Kai Großjohann
  0 siblings, 0 replies; 10+ messages in thread
From: Kai Großjohann @ 2003-03-09 16:39 UTC (permalink / raw)


Kevin Greiner <kgreiner@xpediantsolutions.com> writes:

> Yes.  I'll check it in today.

Thank you for fixing the bug despite my stubbornness.  I don't know
what happened to me...
-- 
A preposition is not a good thing to end a sentence with.



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

end of thread, other threads:[~2003-03-09 16:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-27 14:51 Threading wrong if showing undownloaded articles Kai Großjohann
2003-02-28  5:46 ` Kevin Greiner
2003-02-28 13:07   ` Kai Großjohann
2003-02-28 13:52     ` Kevin Greiner
2003-03-08 17:12       ` Kai Großjohann
2003-03-08 17:31         ` Kai Großjohann
2003-03-09  6:20         ` Kevin Greiner
2003-03-09 11:19           ` Kai Großjohann
2003-03-09 14:33             ` Kevin Greiner
2003-03-09 16:39               ` Kai Großjohann

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