Discussion:
Sorting threaded articles on top of summary
Ivan Kanis
2015-01-08 08:11:36 UTC
Permalink
Hello,

I look at newsgroup once in a long while. I find that threaded articles
are more interesting than lone post.

This is why I am trying to put threaded articles on top of my summary.

I set gnus-thread-sort-functions to '(gnus-thread-sort-by-score).

Now I am trying to tweak gnus-article-sort-by-score to compare threaded
article.

(defun gnus-article-sort-by-score (h1 h2)
(let ((score1 (or (cdr (assq (mail-header-number h1)
gnus-newsgroup-scored))
gnus-summary-default-score 0))
(score2 (or (cdr (assq (mail-header-number h2)
gnus-newsgroup-scored))
gnus-summary-default-score 0)))
(if (= score1 score2) (is-thread h2)
(> score1 score2))))

The problem I am facing is how do I tell that h2 is threaded?

I looked at the function that does a total score of a thread and found
it hard to understand.

Is the internal of gnus (such as header format) documented anywhere?

Am I even going the right way about this? Should I score threaded
article higher rather than messing with the sort function?

Any help much welcome,

Ivan
--
Webmasters kidnapped by evil cult.
-- BOFH excuse #43
Eric S Fraga
2015-01-08 16:20:41 UTC
Permalink
Post by Ivan Kanis
Hello,
I look at newsgroup once in a long while. I find that threaded articles
are more interesting than lone post.
In my case, I have

(setq gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-total-score)

which leads to threads being sorted by the sum of the scores of all the
articles in the thread. Note: the individual articles need to have a
non-zero score for this to make any sense...
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.50.1 + Ma Gnus v0.12 + evil-git-2748228
: BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)
Loading...