Article View: news.software.readers
Article #69487Re: [slrn] thread_size() & single article
From: J.B. Nicholson-Owens
Date: Thu, 21 Dec 2000 04:07
Date: Thu, 21 Dec 2000 04:07
44 lines
2847 bytes
2847 bytes
cedric wrote:
> Message-ID: <0ruq19.1q3.ln@127.0.0.1>
Your posting agent appears to be misconfigured. You should have a host name
or at least a unique IP to the right of the at sign. 127.0.0.1 is so common
the chances of your posting agent to be able to generate a unique message-ID
are greatly reduced.
> I would like to be able to know if the current selected message in slrn
> is a single article (eg with no response).
I don't think I understand what you're asking for--you want to know if an
article has no child articles? Do you want to know if an article has no
children article(s) and no parent article?
Are you considering only visual threads (that is, considering only what that
user has in the article mode header list) or logical threads (considering
all articles that are known to exist in that thread whether read or unread,
expired on the server or not)?
> Unfortunately, the slang thread_size() function applies both to a thread
> and a subthread. Then testing if thread_size() == 1 cannot help, for it
> may indicate a single article or the last article of a (sub)thread.
thread_size() refers to visual threading (not logical threading) and returns
1 under the following conditions:
* sorting_method is even (0, 2, 4, ...). This means threads of articles
are displayed uncollapsed. Visual threading is not there, so every
article is a visual thread unto itself.
* sorting_method is odd and the cursor is at an uncollapsed article that
has no children.
In any other situation, thread_size() in article mode returns something
greater than 1.
If I understand you correctly, the second criteria would seem to answer your
question so long as you are using a threaded sorting method. In an
unthreaded sorting method you're left parsing headers to discover what
article a thread is in.
But maybe you're asking for something completely different.
Technical Details
Message-ID:
<slrn9430e5.8v.jbn@next.forestfield.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.infoave.net!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!news.shout.net!jbnReferences:
<0ruq19.1q3.ln@127.0.0.1>Show Full Headers
Complete Article Headers
Message-ID: <slrn9430e5.8v.jbn@next.forestfield.org> Subject: Re: [slrn] thread_size() & single article Date: Thu, 21 Dec 2000 04:07:48 +0000 From: jbn@forestfield.org (J.B. Nicholson-Owens) References: <0ruq19.1q3.ln@127.0.0.1> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.infoave.net!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!news.shout.net!jbn Newsgroups: news.software.readers Organization: Forest Field OmniMedia Lines: 43 NNTP-Posting-Host: forestfield.org X-Trace: roundup.shout.net 977371668 31636 208.216.67.173 (21 Dec 2000 04:07:48 GMT) X-Complaints-To: abuse@shout.net NNTP-Posting-Date: 21 Dec 2000 04:07:48 GMT User-Agent: slrn/0.9.6.4 (Unix)