Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: ding@gnus.org
Subject: Re: Wrong number of articles from completely read group
Date: Mon, 20 Dec 2010 19:54:05 +0100	[thread overview]
Message-ID: <874oa8xoky.fsf@member.fsf.org> (raw)
In-Reply-To: <m3lj3ke5ny.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Mon, 20 Dec 2010 18:05:21 +0100")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

Hi Lars,

>> If I have a group where all the articles are read and I open it, I get
>> asked how many articles I want to show. The number I'm actually shown is
>> always less than the number I ask for (unless I ask for 1). For example,
>> asking for 2 gives me 1. Asking for 4 gives me three. But it's not
>> always n-1. For example, asking for 20 gives me 16.
>
> Gnus doesn't know what articles exist, so it asks for articles in the
> range of n-x to n.  For IMAP, there's often fewer than x+1 articles in
> that range.

I think that applies to any backend that allows for modifications,
right?  In org-gnus.el, I have this really beatiful snippet to reliably
open a summary buffer at least showing ARTICLE (article number or
message id).

                   ;; articles is 1 and group-opened nil initially
                   (while (and (not group-opened)
                               ;; stop on integer overflows
                               (> articles 0))
                     (setq group-opened (gnus-group-read-group
                                         articles nil group)
                           articles (if (< articles 16)
                                        (1+ articles)
                                      (* articles 2))))
                   (if group-opened
                       (gnus-summary-goto-article article nil t)
                     (message "Couldn't follow gnus link.  %s"
                              "The summary couldn't be opened."))

It works, but is there something better that doesn't rely on some
optional feature (like the registry) and works independently from the
used backend?

Bye,
Tassilo



  parent reply	other threads:[~2010-12-20 18:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 16:56 Tommy Kelly
2010-12-20 17:05 ` Lars Magne Ingebrigtsen
2010-12-20 18:45   ` Tommy Kelly
2010-12-20 22:21     ` Steinar Bang
2010-12-20 22:43       ` Tommy Kelly
2010-12-20 23:19         ` Steinar Bang
2010-12-21  0:00           ` Tommy Kelly
2010-12-21  0:38     ` Tibor Simko
2010-12-21  1:22       ` Tommy Kelly
2010-12-21 16:04         ` Tommy Kelly
2010-12-20 18:54   ` Tassilo Horn [this message]
2011-01-02  7:10     ` Lars Magne Ingebrigtsen
2010-12-20 17:05 ` Tommy Kelly

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=874oa8xoky.fsf@member.fsf.org \
    --to=tassilo@member.fsf.org \
    --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).