Gnus development mailing list
 help / color / mirror / Atom feed
* Re: [gnus git]  branch master updated: =1= gnus-group: fix jump to unknown groups
       [not found] <E1Pikya-0007us-00@quimby.gnus.org>
@ 2011-01-30 10:20 ` Adam Sjøgren
  2011-01-30 11:30   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Sjøgren @ 2011-01-30 10:20 UTC (permalink / raw)
  To: ding

On Fri, 28 Jan 2011 10:50:44 +0100, Julien wrote:

> commit 53a5da8e6cba160eabeff5ff948ebeb78248a6bc
> Author: Julien Danjou <julien@danjou.info>
> Date:   Fri Jan 28 10:50:40 2011 +0100

>     gnus-group: fix jump to unknown groups

This breaks "create the first nnml-group when starting to use Gnus"
use-case.

If you create a test-user on your system and put some email for him in
/var/mail/$USER and configure Gnus to use nnml, then Gnus won't fetch
any email until you create the first nnml-group (this started around
3595cdc6 and cc7d0e00).

Until your 53a5da8e creating that - now-crucial - first group could be
done by jumping to a nnml-group, after which, Gnus fetches the email
(from ((file))) happily.

With your change, it is impossible for a new user to get email from
/var/mail/$USER as far as I can see?

I guess jump either should revert to the previous behaviour, or it
should allow you to jump to a group if that select method has no groups
at all (so you can create e.g. the first nnml group).


  Best regards,

    Adam

-- 
 "Här kommer rädslan, gamle vän                               Adam Sjøgren
  När alla fjärilar i magen vaknar upp                   asjo@koldfront.dk
  Viskar välkommen hem"




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gnus git]  branch master updated: =1= gnus-group: fix jump to unknown groups
  2011-01-30 10:20 ` [gnus git] branch master updated: =1= gnus-group: fix jump to unknown groups Adam Sjøgren
@ 2011-01-30 11:30   ` Lars Ingebrigtsen
  2011-01-30 11:38     ` Adam Sjøgren
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-30 11:30 UTC (permalink / raw)
  To: ding

> If you create a test-user on your system and put some email for him in
> /var/mail/$USER and configure Gnus to use nnml, then Gnus won't fetch
> any email until you create the first nnml-group (this started around
> 3595cdc6 and cc7d0e00).

Well, I think that's a bug...  Gnus should fetch mail from the method
even if there are no groups for the method yet.  (Probably.)

> I guess jump either should revert to the previous behaviour, or it
> should allow you to jump to a group if that select method has no groups
> at all (so you can create e.g. the first nnml group).

I think there's supposed to be a variable somewhere saying whether it's
possible to jump to a group that doesn't exist (yet).  I certainly think
it should be possible to jump to groups that Gnus don't know about.

So I think the patch should possibly be reverted.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gnus git]  branch master updated: =1= gnus-group: fix jump to unknown groups
  2011-01-30 11:30   ` Lars Ingebrigtsen
@ 2011-01-30 11:38     ` Adam Sjøgren
  2011-01-31  2:13       ` Scanning methods that don't have any groups (yet) (was: [gnus git] branch master updated: =1= gnus-group: fix jump to unknown groups) Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Sjøgren @ 2011-01-30 11:38 UTC (permalink / raw)
  To: ding

On Sun, 30 Jan 2011 03:30:46 -0800, Lars wrote:

>> If you create a test-user on your system and put some email for him in
>> /var/mail/$USER and configure Gnus to use nnml, then Gnus won't fetch
>> any email until you create the first nnml-group (this started around
>> 3595cdc6 and cc7d0e00).

> Well, I think that's a bug...  Gnus should fetch mail from the method
> even if there are no groups for the method yet.  (Probably.)

I tried some monkeying around with the changes in/around those two
commits, but I didn't quite get anywhere before I got distract... Oooh,
look, shiny!

> I think there's supposed to be a variable somewhere saying whether it's
> possible to jump to a group that doesn't exist (yet).  I certainly think
> it should be possible to jump to groups that Gnus don't know about.

> So I think the patch should possibly be reverted.

Super.


  Best regards,

    Adam

-- 
 "My ethicator machine must've had a built-in moral           Adam Sjøgren
  compromise spectral release phantasmatron!"            asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Scanning methods that don't have any groups (yet) (was: [gnus git]  branch master updated: =1= gnus-group: fix jump to unknown groups)
  2011-01-30 11:38     ` Adam Sjøgren
@ 2011-01-31  2:13       ` Lars Ingebrigtsen
  2011-01-31 20:06         ` Scanning methods that don't have any groups (yet) Adam Sjøgren
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-31  2:13 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> I tried some monkeying around with the changes in/around those two
> commits, but I didn't quite get anywhere before I got distract... Oooh,
> look, shiny!

I think I may now have fixed this problem, but this area is, er, subtle,
so there may be unintended negative consequences... 

>> I think there's supposed to be a variable somewhere saying whether it's
>> possible to jump to a group that doesn't exist (yet).  I certainly think
>> it should be possible to jump to groups that Gnus don't know about.
>
>> So I think the patch should possibly be reverted.
>
> Super.

I've now done so.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-01-31  2:13       ` Scanning methods that don't have any groups (yet) (was: [gnus git] branch master updated: =1= gnus-group: fix jump to unknown groups) Lars Ingebrigtsen
@ 2011-01-31 20:06         ` Adam Sjøgren
  2011-02-01  2:02           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Sjøgren @ 2011-01-31 20:06 UTC (permalink / raw)
  To: ding

On Sun, 30 Jan 2011 18:13:56 -0800, Lars wrote:

> I think I may now have fixed this problem, but this area is, er, subtle,
> so there may be unintended negative consequences... 

It didn't seem to work in my test:

 * Create a new $USER
 * Send an email to him, stored in /var/mail/$USER
 * Configure .gnus with: (setq gnus-select-method '(nnnil "")
                               gnus-secondary-select-methods '((nnml "")))
 * Start Gnus.
 * Try g. Try F. Try g. Nah.

The email stays in /var/mail/$USER until I:

 * j nnml:something, then u on the group, then g. Yes.

>>> So I think the patch should possibly be reverted.

[...] 

> I've now done so.

That part, jumping to an unknown group, worked fine now, again.


  Best regards,

    Adam

-- 
 "My ethicator machine must've had a built-in moral           Adam Sjøgren
  compromise spectral release phantasmatron!"            asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-01-31 20:06         ` Scanning methods that don't have any groups (yet) Adam Sjøgren
@ 2011-02-01  2:02           ` Lars Ingebrigtsen
  2011-02-01 21:30             ` Adam Sjøgren
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-01  2:02 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> It didn't seem to work in my test:
>
>  * Create a new $USER
>  * Send an email to him, stored in /var/mail/$USER
>  * Configure .gnus with: (setq gnus-select-method '(nnnil "")
>                                gnus-secondary-select-methods '((nnml "")))
>  * Start Gnus.
>  * Try g. Try F. Try g. Nah.
>
> The email stays in /var/mail/$USER until I:

Darn.

I thought `gnus-read-active-file-1' would be called in these situations,
and it should split mail.  Could you do an debug-on-entry on that
function before hitting `g'?

If it really isn't called, could you edebug through
`gnus-read-active-for-groups' to see why it isn't called?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-02-01  2:02           ` Lars Ingebrigtsen
@ 2011-02-01 21:30             ` Adam Sjøgren
  2011-02-03 15:37               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Sjøgren @ 2011-02-01 21:30 UTC (permalink / raw)
  To: ding

On Mon, 31 Jan 2011 18:02:32 -0800, Lars wrote:

>> The email stays in /var/mail/$USER until I:

> Darn.

> I thought `gnus-read-active-file-1' would be called in these situations,
> and it should split mail.  Could you do an debug-on-entry on that
> function before hitting `g'?

Let me try. No, it doesn't get called.

> If it really isn't called, could you edebug through
> `gnus-read-active-for-groups' to see why it isn't called?

Trying...

It looks to me like gnus-read-active-for-groups is only called for
nndraft: - not for nnml: - when I go g.

gnus-newsrc-alist does not contain nnml: (there are no nnml:groups).

Ok, so gnus-read-active-for-groups is called from
gnus-get-unread-articles, which consults gnus-newsrc-alist for what
methods to check, as far as I can see.

A comment says:

  ;; First go through all the groups, see what select methods they
  ;; belong to, and then collect them into lists per unique select
  ;; method.

So, maybe gnus-get-unread-articles ought to also go through methods that
don't have groups, after it has gatheres the methods with groups that
need to be checked?

I think I give up for tonight.


 Best regards,

   Adam

-- 
 "Sunday morning when the rain begins to fall                 Adam Sjøgren
  I believe I have seen the end of it all"               asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-02-01 21:30             ` Adam Sjøgren
@ 2011-02-03 15:37               ` Lars Ingebrigtsen
  2011-02-03 18:01                 ` Adam Sjøgren
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-03 15:37 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> So, maybe gnus-get-unread-articles ought to also go through methods that
> don't have groups, after it has gatheres the methods with groups that
> need to be checked?

Yup.  I've now pushed a code that does this.  Let me know whether it
works or not.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-02-03 15:37               ` Lars Ingebrigtsen
@ 2011-02-03 18:01                 ` Adam Sjøgren
  2011-02-03 18:29                   ` Adam Sjøgren
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Sjøgren @ 2011-02-03 18:01 UTC (permalink / raw)
  To: ding

On Thu, 03 Feb 2011 07:37:50 -0800, Lars wrote:

> asjo@koldfront.dk (Adam Sjøgren) writes:
>> So, maybe gnus-get-unread-articles ought to also go through methods that
>> don't have groups, after it has gatheres the methods with groups that
>> need to be checked?

> Yup.  I've now pushed a code that does this.  Let me know whether it
> works or not.

When I start Gnus now (647c1789), I see the logo and after a while I
get: "Buffer is read-only: #<buffer *GNU Emacs*>" and Gnus stops.

*Messages*_ show this:

  For information about GNU Emacs and the GNU system, type C-h C-a.
  Opening nnfolder server on archive...done
  Opening nnml server...done
  No new newsgroups
  Checking new news...
  Reading active file via nnnil... [2 times]
  gnus-active-to-gnus-format: Buffer is read-only: #<buffer *GNU Emacs*>

I wonder what causes this. Let me try edebug-defun'ing
gnus-active-to-gnus-format.

Looks like the problem is that gnus-active-to-gnus-format is being
called on the nnnil method, which fails.

Let me try avoiding that... No, still fails with the same Buffer is
read-only message.

It goes through gnus-active-to-gnus-format fine for the nnfolder+archive
method and the nnml method the first time, but then it gets called again
where current-buffer is *GNU Emacs* and then it fails.

Hm.

  Best regards,

    Adam

-- 
 "Här kommer rädslan, gamle vän                               Adam Sjøgren
  När alla fjärilar i magen vaknar upp                   asjo@koldfront.dk
  Viskar välkommen hem"




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-02-03 18:01                 ` Adam Sjøgren
@ 2011-02-03 18:29                   ` Adam Sjøgren
  2011-02-03 19:49                     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Sjøgren @ 2011-02-03 18:29 UTC (permalink / raw)
  To: ding

On Thu, 03 Feb 2011 19:01:26 +0100, Adam wrote:

> When I start Gnus now (647c1789), I see the logo and after a while I
> get: "Buffer is read-only: #<buffer *GNU Emacs*>" and Gnus stops.

This fixes it:

--- a/lisp/gnus-start.el
+++ b/lisp/gnus-start.el
@@ -1711,7 +1711,8 @@ If SCAN, request a scan of that group as well."
                          gnus-secondary-select-methods))
       (when (and (not (assoc method type-cache))
                 (gnus-check-backend-function 'request-list (car method)))
-       (gnus-read-active-file-1 method nil)))
+       (with-current-buffer nntp-server-buffer
+         (gnus-read-active-file-1 method nil))))
 
     ;; Do the rest of the retrieval.
     (dolist (elem type-cache)


I hope it is correct.


  Best regards,

     Adam

-- 
 "Här kommer rädslan, gamle vän                               Adam Sjøgren
  När alla fjärilar i magen vaknar upp                   asjo@koldfront.dk
  Viskar välkommen hem"




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Scanning methods that don't have any groups (yet)
  2011-02-03 18:29                   ` Adam Sjøgren
@ 2011-02-03 19:49                     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2011-02-03 19:49 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> This fixes it:

Thanks; applied and pushed.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-03 19:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1Pikya-0007us-00@quimby.gnus.org>
2011-01-30 10:20 ` [gnus git] branch master updated: =1= gnus-group: fix jump to unknown groups Adam Sjøgren
2011-01-30 11:30   ` Lars Ingebrigtsen
2011-01-30 11:38     ` Adam Sjøgren
2011-01-31  2:13       ` Scanning methods that don't have any groups (yet) (was: [gnus git] branch master updated: =1= gnus-group: fix jump to unknown groups) Lars Ingebrigtsen
2011-01-31 20:06         ` Scanning methods that don't have any groups (yet) Adam Sjøgren
2011-02-01  2:02           ` Lars Ingebrigtsen
2011-02-01 21:30             ` Adam Sjøgren
2011-02-03 15:37               ` Lars Ingebrigtsen
2011-02-03 18:01                 ` Adam Sjøgren
2011-02-03 18:29                   ` Adam Sjøgren
2011-02-03 19:49                     ` Lars Ingebrigtsen

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).