Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: [PATCH 0/2] two minor fixes for new/empty nnimap group handling
Date: Sun, 12 Jul 2015 12:27:55 +0800	[thread overview]
Message-ID: <87y4im57as.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87380u6mmt.fsf@ericabrahamsen.net>

[-- Attachment #1: Type: text/plain, Size: 2635 bytes --]

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Dan Christensen <jdc@uwo.ca> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> I pushed a small change to `nnimap-request-group' yesterday that would
>>> have prevented the first patch from applying cleanly -- sorry, I should
>>> have mentioned you'd need to pull again first.
>>
>> No problem!
>>
>>> I thought my changes to the group creation process would have ensured
>>> that all new groups had an "active" entry, but I guess not.
>>>
>>> I'd like to take one more whack at this, and then I'm going to give up
>>> and just put Bjørn's guard in. Would you mind removing Bjørn's patches,
>>> pulling once more, and trying these two?
>>
>> I just tried your latest patches against the latest git version.  As
>> before, the problem with info being nil is handled, but active is still
>> nil and I get the backtrace below.  If I add Bjørn's line
>>
>> +	(or active (setq active (cons 0 0)))
>>
>> then the error goes away, but Gnus thinks that the group is empty
>> (not surprisingly), so this isn't really a solution.
>>
>> I only update Gnus periodically.  I had no trouble with nnmairix 
>> with the 2014/10/10 version, but when I next updated on 2015/5/4
>> the problem started.  Would it be helpful to bisect?  Based on
>> "git log nnimap.el", there aren't many relevant changes, and the
>> ones most likely responsible are (from newer to older):
>>
>> commit 10c00cefb79ea94c49a659b1f063218152e9b379
>> commit 04550947fe524054fdc5626ff7b342baca0c18d9
>> commit 1b4d1bd1ca7a32d8f9cb7c1ffe02af08f2c4b2c6
>> commit 062698a34df9fd679229f7dea14cfaaf408f87de
>> commit c2b17919646859aef0e1d329e052dadbbf042eca
>> commit 447c56af7cb2afac14a0f3ed23f85d907c443a5d
>>
>> 447c5 looks especially relevant, but seems to have been buggy since
>> later ones made fixes.
>>
>> Could nnmairix be adjusted to make an extra call at some point to
>> activate the appropriate group?  Maybe it needs to call
>> nnimap-request-group-scan instead of nnimap-request-group, now that
>> 447c5 changed the behaviour of the latter?
>
> I think this is probably the right solution. I'm still convinced that
> nnimap should do something in the group creation process to register the
> group with Gnus, but you're right that your problem is likely a direct
> result of "request-group" getting split into "request-group" and
> "request-group-scan", and nnmairix not being edited to follow.
>
> I'm a little bit out of my depth here, but give this patch a whirl and
> see how it goes.

Dammit, I think that was wrong. Would you try it anyway, then unapply it
and try this one instead?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmairix-scan-imap-groups.patch --]
[-- Type: text/x-diff, Size: 540 bytes --]

diff --git a/lisp/nnmairix.el b/lisp/nnmairix.el
index 96b40e5..c9446b0 100644
--- a/lisp/nnmairix.el
+++ b/lisp/nnmairix.el
@@ -495,6 +495,9 @@ Other back ends might or might not work.")
 	  (nnml-generate-nov-databases-directory mfolder nil t))
 	(nnmairix-call-backend
 	 "request-scan" folder nnmairix-backend-server)
+	(when (eq nnmairix-backend 'nnimap)
+	  (nnmairix-call-backend
+	   "request-group-scan" folder nnmairix-backend-server))
 	(if (and fast allowfast)
 	    t
 	  (nnmairix-request-group-with-article-number-correction

  reply	other threads:[~2015-07-12  4:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 11:37 Bjørn Mork
2015-07-01 11:37 ` [PATCH 1/2] nnimap.el (nnimap-request-group): don't make nil into a list Bjørn Mork
2015-07-01 11:37 ` [PATCH 2/2] nnimap.el (nnimap-request-group): group could be empty Bjørn Mork
2015-07-01 11:50 ` [PATCH 0/2] two minor fixes for new/empty nnimap group handling Alan Schmitt
2015-07-01 12:23   ` Bjørn Mork
2015-07-01 13:49     ` Alan Schmitt
2015-07-02  2:18 ` Nikolaus Rath
2015-07-06  2:45 ` Eric Abrahamsen
2015-07-06  8:40   ` Bjørn Mork
2015-07-06 15:11     ` Eric Abrahamsen
2015-07-06 15:32 ` Dan Christensen
2015-07-07  2:48   ` Eric Abrahamsen
2015-07-07 23:12     ` Dan Christensen
2015-07-08  4:20       ` Eric Abrahamsen
2015-07-08 21:45         ` Dan Christensen
2015-07-09  1:53           ` Eric Abrahamsen
2015-07-09  2:52             ` Dan Christensen
2015-07-09 13:47               ` Dan Christensen
2015-07-10  2:41                 ` Eric Abrahamsen
2015-07-10 12:42                   ` Dan Christensen
2015-07-12  4:11               ` Eric Abrahamsen
2015-07-12  4:27                 ` Eric Abrahamsen [this message]
2015-07-12 17:01                   ` Dan Christensen
2015-07-13  5:36                     ` Eric Abrahamsen
2015-07-08 12:41       ` Eric Abrahamsen

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=87y4im57as.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --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).