Gnus development mailing list
 help / color / mirror / Atom feed
From: Ivan Kanis <ivan@kanis.fr>
To: Gnus General <ding@gnus.org>
Subject: Sorting threaded articles on top of summary
Date: Thu, 08 Jan 2015 09:11:36 +0100	[thread overview]
Message-ID: <87a91tpu87.fsf@kanis.fr> (raw)

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



             reply	other threads:[~2015-01-08  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  8:11 Ivan Kanis [this message]
2015-01-08 16:20 ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a91tpu87.fsf@kanis.fr \
    --to=ivan@kanis.fr \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).