* Sorting threaded articles on top of summary
@ 2015-01-08 8:11 Ivan Kanis
2015-01-08 16:20 ` Eric S Fraga
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Kanis @ 2015-01-08 8:11 UTC (permalink / raw)
To: Gnus General
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Sorting threaded articles on top of summary
2015-01-08 8:11 Sorting threaded articles on top of summary Ivan Kanis
@ 2015-01-08 16:20 ` Eric S Fraga
0 siblings, 0 replies; 2+ messages in thread
From: Eric S Fraga @ 2015-01-08 16:20 UTC (permalink / raw)
To: ding
On Thursday, 8 Jan 2015 at 09:11, Ivan Kanis wrote:
> 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-08 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08 8:11 Sorting threaded articles on top of summary Ivan Kanis
2015-01-08 16:20 ` Eric S Fraga
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).