Gnus development mailing list
 help / color / mirror / Atom feed
* [gmane.emacs.gnus.user] Re: One folder in local imap not seen
@ 2014-08-12 13:36 Rainer M Krug
  2014-08-12 23:17 ` Eric Abrahamsen
  0 siblings, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2014-08-12 13:36 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]

I am posting this here now, as I did not get any reponse on the
gnus.user list.

I have one folder in my local imap, which I see when I telnet into the
local imap server, which is seen by e.g. Mail (OSX), but not seen by
gnus. I have added the local imap server again as an additional server,
but I also couldn't see it there. It is not killed as far as I can see.

Further details are in the forwarded email below.

Suggestions?

Rainer


[-- Attachment #1.2: Type: message/rfc822, Size: 10846 bytes --]

[-- Attachment #1.2.1.1.1: Type: text/plain, Size: 3951 bytes --]

I created a new foreign group which connects to my local imap server and
I still can't see the imap folder named "Later"

I can see 

,----
|            0:                           .[Mailbox].To Buy
|            0:                           .         .To Follow
| *          0:                           .         .To Read
|            0:                           .         .To Watch
|            0:                           .         .Wait For Feedback
|            0:                           .         .To Download
`----

of the following folders:

,----
| ── .RMKrugGMAIL.[Mailbox].Later
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.cache
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
| ├── .RMKrugGMAIL.[Mailbox].To Buy
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.cache
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
| ├── .RMKrugGMAIL.[Mailbox].To Download
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.cache
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
| ├── .RMKrugGMAIL.[Mailbox].To Follow
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.cache
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
| ├── .RMKrugGMAIL.[Mailbox].To Read
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.cache
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
| ├── .RMKrugGMAIL.[Mailbox].To Watch
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
| ├── .RMKrugGMAIL.[Mailbox].Wait For Feedback
| │   ├── cur
| │   ├── dovecot-uidlist
| │   ├── dovecot.index.cache
| │   ├── dovecot.index.log
| │   ├── maildirfolder
| │   ├── new
| │   └── tmp
`----


So what is happening here?

As I said, when I Mail (OSX), I can see the folders.

Rainer


Rainer M Krug <Rainer@krugs.de> writes:

> ping
>
> any ideas why this is the case?
>
> Is there a cache which I could delete?
>
> Rainer
>
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Hi
>>
>> I am using 
>>
>> ,----
>> | gmail <-> offlineimap <-> dovecot tunnel <-> local maildir <-> dovecot tunnel <-> gnus
>> `----
>>
>> to access my mail. I have one folder which is in gmail, synched to my
>> local maildir, visible via localhost from the Mail app (I am using OSX)
>> but I can't see it in gnus.
>>
>> It is not listed in under the servers, not even as killed folder.
>>
>> Any suggestions how I can see this folder from gnus?
>>
>> The name of the folder is 
>>
>> ,----
>> | [Mailbox]/Later
>> `----
>>
>> while there are sever other folders like
>>
>> ,----
>> | [Mailbox].To Buy
>> `----
>>
>> and all 
>>
>> ,----
>> | [gmail]...
>> `----
>>
>> which I can see.
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #1.2.1.1.2: Type: application/pgp-signature, Size: 494 bytes --]



[-- Attachment #1.3: Type: text/plain, Size: 71 bytes --]


-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2014-08-12 13:36 [gmane.emacs.gnus.user] Re: One folder in local imap not seen Rainer M Krug
@ 2014-08-12 23:17 ` Eric Abrahamsen
  2014-08-13  8:29   ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2014-08-12 23:17 UTC (permalink / raw)
  To: ding

Rainer M Krug <Rainer@krugs.de> writes:

> I am posting this here now, as I did not get any reponse on the
> gnus.user list.
>
> I have one folder in my local imap, which I see when I telnet into the
> local imap server, which is seen by e.g. Mail (OSX), but not seen by
> gnus. I have added the local imap server again as an additional server,
> but I also couldn't see it there. It is not killed as far as I can see.

One good way of seeing where things are going wrong is to edebug
`nnimap-get-groups'. When you go into the *Server* buffer and list the
groups in your local imap server, you'll be able to see the results of
the LIST command, and then see how Gnus parses those results. That
should get you closer to the source of the problem.

HTH,
Eric

> Further details are in the forwarded email below.
>
> Suggestions?
>
> Rainer
>
> From: Rainer M Krug <Rainer@krugs.de>
> Subject: Re: One folder in local imap not seen
> Newsgroups: gmane.emacs.gnus.user
> To: info-gnus-english@gnu.org
> Date: Mon, 11 Aug 2014 18:44:43 +0200 (1 day, 6 hours, 26 minutes ago)
>
> I created a new foreign group which connects to my local imap server and
> I still can't see the imap folder named "Later"
>
> I can see 
>
> ,----
> |            0:                           .[Mailbox].To Buy
> |            0:                           .         .To Follow
> | *          0:                           .         .To Read
> |            0:                           .         .To Watch
> |            0:                           .         .Wait For Feedback
> |            0:                           .         .To Download
> `----
>
> of the following folders:
>
> ,----
> | ── .RMKrugGMAIL.[Mailbox].Later
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.cache
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> | ├── .RMKrugGMAIL.[Mailbox].To Buy
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.cache
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> | ├── .RMKrugGMAIL.[Mailbox].To Download
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.cache
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> | ├── .RMKrugGMAIL.[Mailbox].To Follow
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.cache
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> | ├── .RMKrugGMAIL.[Mailbox].To Read
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.cache
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> | ├── .RMKrugGMAIL.[Mailbox].To Watch
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> | ├── .RMKrugGMAIL.[Mailbox].Wait For Feedback
> | │   ├── cur
> | │   ├── dovecot-uidlist
> | │   ├── dovecot.index.cache
> | │   ├── dovecot.index.log
> | │   ├── maildirfolder
> | │   ├── new
> | │   └── tmp
> `----
>
>
> So what is happening here?
>
> As I said, when I Mail (OSX), I can see the folders.
>
> Rainer
>
>
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> ping
>>
>> any ideas why this is the case?
>>
>> Is there a cache which I could delete?
>>
>> Rainer
>>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> Hi
>>>
>>> I am using 
>>>
>>> ,----
>>> | gmail <-> offlineimap <-> dovecot tunnel <-> local maildir <-> dovecot tunnel <-> gnus
>>> `----
>>>
>>> to access my mail. I have one folder which is in gmail, synched to my
>>> local maildir, visible via localhost from the Mail app (I am using OSX)
>>> but I can't see it in gnus.
>>>
>>> It is not listed in under the servers, not even as killed folder.
>>>
>>> Any suggestions how I can see this folder from gnus?
>>>
>>> The name of the folder is 
>>>
>>> ,----
>>> | [Mailbox]/Later
>>> `----
>>>
>>> while there are sever other folders like
>>>
>>> ,----
>>> | [Mailbox].To Buy
>>> `----
>>>
>>> and all 
>>>
>>> ,----
>>> | [gmail]...
>>> `----
>>>
>>> which I can see.
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>>
>>> Rainer
>
> -- 
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :       +33 - (0)9 53 10 27 44
> Cell:       +33 - (0)6 85 62 59 98
> Fax :       +33 - (0)9 58 10 27 44
>
> Fax (D):    +49 - (0)3 21 21 25 22 44
>
> email:      Rainer@krugs.de
>
> Skype:      RMkrug
>
> PGP: 0x0F52F982
>
>
> ----------




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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2014-08-12 23:17 ` Eric Abrahamsen
@ 2014-08-13  8:29   ` Rainer M Krug
  2014-08-13  9:14     ` Eric Abrahamsen
  0 siblings, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2014-08-13  8:29 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

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

<#secure method=pgpmime mode=sign>
Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Rainer M Krug <Rainer@krugs.de> writes:
>
>> I am posting this here now, as I did not get any reponse on the
>> gnus.user list.
>>
>> I have one folder in my local imap, which I see when I telnet into the
>> local imap server, which is seen by e.g. Mail (OSX), but not seen by
>> gnus. I have added the local imap server again as an additional server,
>> but I also couldn't see it there. It is not killed as far as I can see.
>
> One good way of seeing where things are going wrong is to edebug
> `nnimap-get-groups'. When you go into the *Server* buffer and list the
> groups in your local imap server, you'll be able to see the results of
> the LIST command, and then see how Gnus parses those results. That
> should get you closer to the source of the problem.

OK - yes, it does. But it does not help me. When I cycle through the
'nnimap-get-groups' function, I can't make any sense out of the results,
but I realized that in the (while ...) loop (see the code for reference below), the folder
...[Mailbox].Later does not occur. As I can't make any sense out of the
previous results.

Any further tips how I can debug this? 

For information, some info on the folders:

This one does not =show in GNUS:
,----
| a EXAMINE "RMKrugGMAIL.[Mailbox].Later"
| * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
| * OK [PERMANENTFLAGS ()] Read-only mailbox.
| * 11 EXISTS
| * 0 RECENT
| * OK [UIDVALIDITY 1355158626] UIDs valid
| * OK [UIDNEXT 60] Predicted next UID
| * OK [HIGHESTMODSEQ 54] Highest
| a OK [READ-ONLY] Examine completed (0.008 secs).
`----

This one does:
,----
| a EXAMINE "RMKrugGMAIL.[Mailbox].To Read"
| * OK [CLOSED] Previous mailbox closed.
| * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
| * OK [PERMANENTFLAGS ()] Read-only mailbox.
| * 57 EXISTS
| * 0 RECENT
| * OK [UIDVALIDITY 1355158623] UIDs valid
| * OK [UIDNEXT 62] Predicted next UID
| * OK [HIGHESTMODSEQ 65] Highest
| a OK [READ-ONLY] Examine completed (0.007 secs).
`----

Any further suggestions?

Rainer

,----
| (defun nnimap-get-groups ()
|   (erase-buffer)
|   (let ((sequence (nnimap-send-command "LIST \"\" \"*\""))
| 	groups)
|     (nnimap-wait-for-response sequence)
|     (subst-char-in-region (point-min) (point-max)
| 			  ?\\ ?% t)
|     (goto-char (point-min))
|     (nnimap-unfold-quoted-lines)
|     (goto-char (point-min))
|     (while (search-forward "* LIST " nil t)
|       (let ((flags (read (current-buffer)))
| 	    (separator (read (current-buffer)))
| 	    (group (read (current-buffer))))
| 	(unless (member '%NoSelect flags)
| 	  (push (utf7-decode (if (stringp group)
| 				 group
| 			       (format "%s" group)) t)
| 		groups))))
|     (nreverse groups)))
`----


>
> HTH,
> Eric
>
>> Further details are in the forwarded email below.
>>
>> Suggestions?
>>
>> Rainer
>>
>> From: Rainer M Krug <Rainer@krugs.de>
>> Subject: Re: One folder in local imap not seen
>> Newsgroups: gmane.emacs.gnus.user
>> To: info-gnus-english@gnu.org
>> Date: Mon, 11 Aug 2014 18:44:43 +0200 (1 day, 6 hours, 26 minutes ago)
>>
>> I created a new foreign group which connects to my local imap server and
>> I still can't see the imap folder named "Later"
>>
>> I can see 
>>
>> ,----
>> |            0:                           .[Mailbox].To Buy
>> |            0:                           .         .To Follow
>> | *          0:                           .         .To Read
>> |            0:                           .         .To Watch
>> |            0:                           .         .Wait For Feedback
>> |            0:                           .         .To Download
>> `----
>>
>> of the following folders:
>>
>> ,----
>> | .\0 .RMKrugGMAIL.[Mailbox].Later
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.cache
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> | .\0. .RMKrugGMAIL.[Mailbox].To Buy
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.cache
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> | .\0. .RMKrugGMAIL.[Mailbox].To Download
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.cache
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> | .\0. .RMKrugGMAIL.[Mailbox].To Follow
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.cache
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> | .\0. .RMKrugGMAIL.[Mailbox].To Read
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.cache
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> | .\0. .RMKrugGMAIL.[Mailbox].To Watch
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> | .\0. .RMKrugGMAIL.[Mailbox].Wait For Feedback
>> | . . .\0. cur
>> | . . .\0. dovecot-uidlist
>> | . . .\0. dovecot.index.cache
>> | . . .\0. dovecot.index.log
>> | . . .\0. maildirfolder
>> | . . .\0. new
>> | . . .\0. tmp
>> `----
>>
>>
>> So what is happening here?
>>
>> As I said, when I Mail (OSX), I can see the folders.
>>
>> Rainer
>>
>>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> ping
>>>
>>> any ideas why this is the case?
>>>
>>> Is there a cache which I could delete?
>>>
>>> Rainer
>>>
>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>
>>>> Hi
>>>>
>>>> I am using 
>>>>
>>>> ,----
>>>> | gmail <-> offlineimap <-> dovecot tunnel <-> local maildir <-> dovecot tunnel <-> gnus
>>>> `----
>>>>
>>>> to access my mail. I have one folder which is in gmail, synched to my
>>>> local maildir, visible via localhost from the Mail app (I am using OSX)
>>>> but I can't see it in gnus.
>>>>
>>>> It is not listed in under the servers, not even as killed folder.
>>>>
>>>> Any suggestions how I can see this folder from gnus?
>>>>
>>>> The name of the folder is 
>>>>
>>>> ,----
>>>> | [Mailbox]/Later
>>>> `----
>>>>
>>>> while there are sever other folders like
>>>>
>>>> ,----
>>>> | [Mailbox].To Buy
>>>> `----
>>>>
>>>> and all 
>>>>
>>>> ,----
>>>> | [gmail]...
>>>> `----
>>>>
>>>> which I can see.
>>>>
>>>> Any suggestions?
>>>>
>>>> Thanks,
>>>>
>>>> Rainer
>>
>> -- 
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Stellenbosch University
>> South Africa
>>
>> Tel :       +33 - (0)9 53 10 27 44
>> Cell:       +33 - (0)6 85 62 59 98
>> Fax :       +33 - (0)9 58 10 27 44
>>
>> Fax (D):    +49 - (0)3 21 21 25 22 44
>>
>> email:      Rainer@krugs.de
>>
>> Skype:      RMkrug
>>
>> PGP: 0x0F52F982
>>
>>
>> ----------
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2014-08-13  8:29   ` Rainer M Krug
@ 2014-08-13  9:14     ` Eric Abrahamsen
  2014-08-13 10:05       ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2014-08-13  9:14 UTC (permalink / raw)
  To: ding

Rainer M Krug <Rainer@krugs.de> writes:

> <#secure method=pgpmime mode=sign>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> I am posting this here now, as I did not get any reponse on the
>>> gnus.user list.
>>>
>>> I have one folder in my local imap, which I see when I telnet into the
>>> local imap server, which is seen by e.g. Mail (OSX), but not seen by
>>> gnus. I have added the local imap server again as an additional server,
>>> but I also couldn't see it there. It is not killed as far as I can see.
>>
>> One good way of seeing where things are going wrong is to edebug
>> `nnimap-get-groups'. When you go into the *Server* buffer and list the
>> groups in your local imap server, you'll be able to see the results of
>> the LIST command, and then see how Gnus parses those results. That
>> should get you closer to the source of the problem.
>
> OK - yes, it does. But it does not help me. When I cycle through the
> 'nnimap-get-groups' function, I can't make any sense out of the results,
> but I realized that in the (while ...) loop (see the code for reference below), the folder
> ...[Mailbox].Later does not occur. As I can't make any sense out of the
> previous results.
>
> Any further tips how I can debug this? 

The early part of the function is just issuing the LIST command to imap,
and inserting the results into a buffer. Just to make sure that the LIST
command *isn't* returning your folder, step through `nnimap-get-groups'
again, and when you get to the second (goto-char (point-min)), hit "e"
to eval, and tell it (switch-to-buffer (current-buffer)). That should
make visible a buffer with a name like "#<buffer *nnimap PR nil
*nntpd**-44898>". You can see the results of the LIST command there.

If the folder really isn't in that list, then I don't know what to tell
you -- Gnus should be getting exactly the same results as your local
telnet experiments. Are you using dovecot or what?

Eric

> For information, some info on the folders:
>
> This one does not =show in GNUS:
> ,----
> | a EXAMINE "RMKrugGMAIL.[Mailbox].Later"
> | * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
> | * OK [PERMANENTFLAGS ()] Read-only mailbox.
> | * 11 EXISTS
> | * 0 RECENT
> | * OK [UIDVALIDITY 1355158626] UIDs valid
> | * OK [UIDNEXT 60] Predicted next UID
> | * OK [HIGHESTMODSEQ 54] Highest
> | a OK [READ-ONLY] Examine completed (0.008 secs).
> `----
>
> This one does:
> ,----
> | a EXAMINE "RMKrugGMAIL.[Mailbox].To Read"
> | * OK [CLOSED] Previous mailbox closed.
> | * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
> | * OK [PERMANENTFLAGS ()] Read-only mailbox.
> | * 57 EXISTS
> | * 0 RECENT
> | * OK [UIDVALIDITY 1355158623] UIDs valid
> | * OK [UIDNEXT 62] Predicted next UID
> | * OK [HIGHESTMODSEQ 65] Highest
> | a OK [READ-ONLY] Examine completed (0.007 secs).
> `----
>
> Any further suggestions?
>
> Rainer
>
> ,----
> | (defun nnimap-get-groups ()
> |   (erase-buffer)
> |   (let ((sequence (nnimap-send-command "LIST \"\" \"*\""))
> | 	groups)
> |     (nnimap-wait-for-response sequence)
> |     (subst-char-in-region (point-min) (point-max)
> | 			  ?\\ ?% t)
> |     (goto-char (point-min))
> |     (nnimap-unfold-quoted-lines)
> |     (goto-char (point-min))
> |     (while (search-forward "* LIST " nil t)
> |       (let ((flags (read (current-buffer)))
> | 	    (separator (read (current-buffer)))
> | 	    (group (read (current-buffer))))
> | 	(unless (member '%NoSelect flags)
> | 	  (push (utf7-decode (if (stringp group)
> | 				 group
> | 			       (format "%s" group)) t)
> | 		groups))))
> |     (nreverse groups)))
> `----
>
>
>>
>> HTH,
>> Eric
>>
>>> Further details are in the forwarded email below.
>>>
>>> Suggestions?
>>>
>>> Rainer
>>>
>>> From: Rainer M Krug <Rainer@krugs.de>
>>> Subject: Re: One folder in local imap not seen
>>> Newsgroups: gmane.emacs.gnus.user
>>> To: info-gnus-english@gnu.org
>>> Date: Mon, 11 Aug 2014 18:44:43 +0200 (1 day, 6 hours, 26 minutes ago)
>>>
>>> I created a new foreign group which connects to my local imap server and
>>> I still can't see the imap folder named "Later"
>>>
>>> I can see 
>>>
>>> ,----
>>> |            0:                           .[Mailbox].To Buy
>>> |            0:                           .         .To Follow
>>> | *          0:                           .         .To Read
>>> |            0:                           .         .To Watch
>>> |            0:                           .         .Wait For Feedback
>>> |            0:                           .         .To Download
>>> `----
>>>
>>> of the following folders:
>>>
>>> ,----
>>> | . .RMKrugGMAIL.[Mailbox].Later
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.cache
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> | .. .RMKrugGMAIL.[Mailbox].To Buy
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.cache
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> | .. .RMKrugGMAIL.[Mailbox].To Download
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.cache
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> | .. .RMKrugGMAIL.[Mailbox].To Follow
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.cache
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> | .. .RMKrugGMAIL.[Mailbox].To Read
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.cache
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> | .. .RMKrugGMAIL.[Mailbox].To Watch
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> | .. .RMKrugGMAIL.[Mailbox].Wait For Feedback
>>> | .. .. cur
>>> | .. .. dovecot-uidlist
>>> | .. .. dovecot.index.cache
>>> | .. .. dovecot.index.log
>>> | .. .. maildirfolder
>>> | .. .. new
>>> | .. .. tmp
>>> `----
>>>
>>>
>>> So what is happening here?
>>>
>>> As I said, when I Mail (OSX), I can see the folders.
>>>
>>> Rainer
>>>
>>>
>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>
>>>> ping
>>>>
>>>> any ideas why this is the case?
>>>>
>>>> Is there a cache which I could delete?
>>>>
>>>> Rainer
>>>>
>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>
>>>>> Hi
>>>>>
>>>>> I am using 
>>>>>
>>>>> ,----
>>>>> | gmail <-> offlineimap <-> dovecot tunnel <-> local maildir <-> dovecot tunnel <-> gnus
>>>>> `----
>>>>>
>>>>> to access my mail. I have one folder which is in gmail, synched to my
>>>>> local maildir, visible via localhost from the Mail app (I am using OSX)
>>>>> but I can't see it in gnus.
>>>>>
>>>>> It is not listed in under the servers, not even as killed folder.
>>>>>
>>>>> Any suggestions how I can see this folder from gnus?
>>>>>
>>>>> The name of the folder is 
>>>>>
>>>>> ,----
>>>>> | [Mailbox]/Later
>>>>> `----
>>>>>
>>>>> while there are sever other folders like
>>>>>
>>>>> ,----
>>>>> | [Mailbox].To Buy
>>>>> `----
>>>>>
>>>>> and all 
>>>>>
>>>>> ,----
>>>>> | [gmail]...
>>>>> `----
>>>>>
>>>>> which I can see.
>>>>>
>>>>> Any suggestions?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Rainer
>>>
>>> -- 
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>
>>> Centre of Excellence for Invasion Biology
>>> Stellenbosch University
>>> South Africa
>>>
>>> Tel :       +33 - (0)9 53 10 27 44
>>> Cell:       +33 - (0)6 85 62 59 98
>>> Fax :       +33 - (0)9 58 10 27 44
>>>
>>> Fax (D):    +49 - (0)3 21 21 25 22 44
>>>
>>> email:      Rainer@krugs.de
>>>
>>> Skype:      RMkrug
>>>
>>> PGP: 0x0F52F982
>>>
>>>
>>> ----------
>>
>>
>>




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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2014-08-13  9:14     ` Eric Abrahamsen
@ 2014-08-13 10:05       ` Rainer M Krug
  2014-08-13 10:43         ` Eric Abrahamsen
  0 siblings, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2014-08-13 10:05 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

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

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Rainer M Krug <Rainer@krugs.de> writes:
>
>> <#secure method=pgpmime mode=sign>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>
>>>> I am posting this here now, as I did not get any reponse on the
>>>> gnus.user list.
>>>>
>>>> I have one folder in my local imap, which I see when I telnet into the
>>>> local imap server, which is seen by e.g. Mail (OSX), but not seen by
>>>> gnus. I have added the local imap server again as an additional server,
>>>> but I also couldn't see it there. It is not killed as far as I can see.
>>>
>>> One good way of seeing where things are going wrong is to edebug
>>> `nnimap-get-groups'. When you go into the *Server* buffer and list the
>>> groups in your local imap server, you'll be able to see the results of
>>> the LIST command, and then see how Gnus parses those results. That
>>> should get you closer to the source of the problem.
>>
>> OK - yes, it does. But it does not help me. When I cycle through the
>> 'nnimap-get-groups' function, I can't make any sense out of the results,
>> but I realized that in the (while ...) loop (see the code for reference below), the folder
>> ...[Mailbox].Later does not occur. As I can't make any sense out of the
>> previous results.
>>
>> Any further tips how I can debug this? 
>
> The early part of the function is just issuing the LIST command to imap,
> and inserting the results into a buffer. Just to make sure that the LIST
> command *isn't* returning your folder, step through `nnimap-get-groups'
> again, and when you get to the second (goto-char (point-min)), hit "e"
> to eval, and tell it (switch-to-buffer (current-buffer)). That should
> make visible a buffer with a name like "#<buffer *nnimap PR nil
> *nntpd**-44898>". You can see the results of the LIST command there.
>
> If the folder really isn't in that list, then I don't know what to tell
> you -- Gnus should be getting exactly the same results as your local
> telnet experiments. 

OK - they are in the result from the LIST output:

,----
| ...
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Gmail].All Mail".
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Bin.
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Drafts.
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Important.
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Sent.
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Gmail].Sent Mail".
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Spam.
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Starred.
| * LIST (%HasChildren) "." RMKrugGMAIL.[Mailbox].
| * LIST (%HasNoChildren) "." RMKrugGMAIL.[Mailbox].Later.
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Buy".
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Download".
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Follow".
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Read".
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Watch".
| * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].Wait For Feedback".
| * LIST (%HasNoChildren) "." RMKrugGMAIL.Emacs-macosx.
| * LIST (%HasNoChildren) "." RMKrugGMAIL.INBOX.
| ...
`----

But the line with the '.Later' folder is not iterated through in the
while loop.

> Are you using dovecot or what?

Yes - I am using dovecot via the following definition:

,----
| (add-to-list 'gnus-secondary-select-methods          
|              '(nnimap "Maildir"
|                       (nnimap-stream shell)
|                       (nnimap-shell-program "/usr/local/opt/dovecot/libexec/dovecot/imap -o mail_location=maildir:$HOME/Maildir")))
`----

But as the LIST command returns the folder, the problem is likely in the
(while ...) loop.

When I do search-forward in the buffer itself, it stops as expected in
each line.

Rainer

>
> Eric
>
>> For information, some info on the folders:
>>
>> This one does not =show in GNUS:
>> ,----
>> | a EXAMINE "RMKrugGMAIL.[Mailbox].Later"
>> | * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
>> | * OK [PERMANENTFLAGS ()] Read-only mailbox.
>> | * 11 EXISTS
>> | * 0 RECENT
>> | * OK [UIDVALIDITY 1355158626] UIDs valid
>> | * OK [UIDNEXT 60] Predicted next UID
>> | * OK [HIGHESTMODSEQ 54] Highest
>> | a OK [READ-ONLY] Examine completed (0.008 secs).
>> `----
>>
>> This one does:
>> ,----
>> | a EXAMINE "RMKrugGMAIL.[Mailbox].To Read"
>> | * OK [CLOSED] Previous mailbox closed.
>> | * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
>> | * OK [PERMANENTFLAGS ()] Read-only mailbox.
>> | * 57 EXISTS
>> | * 0 RECENT
>> | * OK [UIDVALIDITY 1355158623] UIDs valid
>> | * OK [UIDNEXT 62] Predicted next UID
>> | * OK [HIGHESTMODSEQ 65] Highest
>> | a OK [READ-ONLY] Examine completed (0.007 secs).
>> `----
>>
>> Any further suggestions?
>>
>> Rainer
>>
>> ,----
>> | (defun nnimap-get-groups ()
>> |   (erase-buffer)
>> |   (let ((sequence (nnimap-send-command "LIST \"\" \"*\""))
>> | 	groups)
>> |     (nnimap-wait-for-response sequence)
>> |     (subst-char-in-region (point-min) (point-max)
>> | 			  ?\\ ?% t)
>> |     (goto-char (point-min))
>> |     (nnimap-unfold-quoted-lines)
>> |     (goto-char (point-min))
>> |     (while (search-forward "* LIST " nil t)
>> |       (let ((flags (read (current-buffer)))
>> | 	    (separator (read (current-buffer)))
>> | 	    (group (read (current-buffer))))
>> | 	(unless (member '%NoSelect flags)
>> | 	  (push (utf7-decode (if (stringp group)
>> | 				 group
>> | 			       (format "%s" group)) t)
>> | 		groups))))
>> |     (nreverse groups)))
>> `----
>>
>>
>>>
>>> HTH,
>>> Eric
>>>
>>>> Further details are in the forwarded email below.
>>>>
>>>> Suggestions?
>>>>
>>>> Rainer
>>>>
>>>> From: Rainer M Krug <Rainer@krugs.de>
>>>> Subject: Re: One folder in local imap not seen
>>>> Newsgroups: gmane.emacs.gnus.user
>>>> To: info-gnus-english@gnu.org
>>>> Date: Mon, 11 Aug 2014 18:44:43 +0200 (1 day, 6 hours, 26 minutes ago)
>>>>
>>>> I created a new foreign group which connects to my local imap server and
>>>> I still can't see the imap folder named "Later"
>>>>
>>>> I can see 
>>>>
>>>> ,----
>>>> |            0:                           .[Mailbox].To Buy
>>>> |            0:                           .         .To Follow
>>>> | *          0:                           .         .To Read
>>>> |            0:                           .         .To Watch
>>>> |            0:                           .         .Wait For Feedback
>>>> |            0:                           .         .To Download
>>>> `----
>>>>
>>>> of the following folders:
>>>>
>>>> ,----
>>>> | . .RMKrugGMAIL.[Mailbox].Later
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.cache
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> | .. .RMKrugGMAIL.[Mailbox].To Buy
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.cache
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> | .. .RMKrugGMAIL.[Mailbox].To Download
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.cache
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> | .. .RMKrugGMAIL.[Mailbox].To Follow
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.cache
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> | .. .RMKrugGMAIL.[Mailbox].To Read
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.cache
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> | .. .RMKrugGMAIL.[Mailbox].To Watch
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> | .. .RMKrugGMAIL.[Mailbox].Wait For Feedback
>>>> | .. .. cur
>>>> | .. .. dovecot-uidlist
>>>> | .. .. dovecot.index.cache
>>>> | .. .. dovecot.index.log
>>>> | .. .. maildirfolder
>>>> | .. .. new
>>>> | .. .. tmp
>>>> `----
>>>>
>>>>
>>>> So what is happening here?
>>>>
>>>> As I said, when I Mail (OSX), I can see the folders.
>>>>
>>>> Rainer
>>>>
>>>>
>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>
>>>>> ping
>>>>>
>>>>> any ideas why this is the case?
>>>>>
>>>>> Is there a cache which I could delete?
>>>>>
>>>>> Rainer
>>>>>
>>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> I am using 
>>>>>>
>>>>>> ,----
>>>>>> | gmail <-> offlineimap <-> dovecot tunnel <-> local maildir <-> dovecot tunnel <-> gnus
>>>>>> `----
>>>>>>
>>>>>> to access my mail. I have one folder which is in gmail, synched to my
>>>>>> local maildir, visible via localhost from the Mail app (I am using OSX)
>>>>>> but I can't see it in gnus.
>>>>>>
>>>>>> It is not listed in under the servers, not even as killed folder.
>>>>>>
>>>>>> Any suggestions how I can see this folder from gnus?
>>>>>>
>>>>>> The name of the folder is 
>>>>>>
>>>>>> ,----
>>>>>> | [Mailbox]/Later
>>>>>> `----
>>>>>>
>>>>>> while there are sever other folders like
>>>>>>
>>>>>> ,----
>>>>>> | [Mailbox].To Buy
>>>>>> `----
>>>>>>
>>>>>> and all 
>>>>>>
>>>>>> ,----
>>>>>> | [gmail]...
>>>>>> `----
>>>>>>
>>>>>> which I can see.
>>>>>>
>>>>>> Any suggestions?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Rainer
>>>>
>>>> -- 
>>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>>
>>>> Centre of Excellence for Invasion Biology
>>>> Stellenbosch University
>>>> South Africa
>>>>
>>>> Tel :       +33 - (0)9 53 10 27 44
>>>> Cell:       +33 - (0)6 85 62 59 98
>>>> Fax :       +33 - (0)9 58 10 27 44
>>>>
>>>> Fax (D):    +49 - (0)3 21 21 25 22 44
>>>>
>>>> email:      Rainer@krugs.de
>>>>
>>>> Skype:      RMkrug
>>>>
>>>> PGP: 0x0F52F982
>>>>
>>>>
>>>> ----------
>>>
>>>
>>>
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2014-08-13 10:05       ` Rainer M Krug
@ 2014-08-13 10:43         ` Eric Abrahamsen
  2014-08-13 12:29           ` SOLVED: unquoted group names from dovecot not shown in GNUS WAS: " Rainer M Krug
  2015-01-27  7:34           ` [gmane.emacs.gnus.user] " Lars Ingebrigtsen
  0 siblings, 2 replies; 12+ messages in thread
From: Eric Abrahamsen @ 2014-08-13 10:43 UTC (permalink / raw)
  To: ding

Rainer M Krug <Rainer@krugs.de> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> <#secure method=pgpmime mode=sign>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>
>>>>> I am posting this here now, as I did not get any reponse on the
>>>>> gnus.user list.
>>>>>
>>>>> I have one folder in my local imap, which I see when I telnet into the
>>>>> local imap server, which is seen by e.g. Mail (OSX), but not seen by
>>>>> gnus. I have added the local imap server again as an additional server,
>>>>> but I also couldn't see it there. It is not killed as far as I can see.
>>>>
>>>> One good way of seeing where things are going wrong is to edebug
>>>> `nnimap-get-groups'. When you go into the *Server* buffer and list the
>>>> groups in your local imap server, you'll be able to see the results of
>>>> the LIST command, and then see how Gnus parses those results. That
>>>> should get you closer to the source of the problem.
>>>
>>> OK - yes, it does. But it does not help me. When I cycle through the
>>> 'nnimap-get-groups' function, I can't make any sense out of the results,
>>> but I realized that in the (while ...) loop (see the code for reference below), the folder
>>> ...[Mailbox].Later does not occur. As I can't make any sense out of the
>>> previous results.
>>>
>>> Any further tips how I can debug this? 
>>
>> The early part of the function is just issuing the LIST command to imap,
>> and inserting the results into a buffer. Just to make sure that the LIST
>> command *isn't* returning your folder, step through `nnimap-get-groups'
>> again, and when you get to the second (goto-char (point-min)), hit "e"
>> to eval, and tell it (switch-to-buffer (current-buffer)). That should
>> make visible a buffer with a name like "#<buffer *nnimap PR nil
>> *nntpd**-44898>". You can see the results of the LIST command there.
>>
>> If the folder really isn't in that list, then I don't know what to tell
>> you -- Gnus should be getting exactly the same results as your local
>> telnet experiments. 
>
> OK - they are in the result from the LIST output:
>
> ,----
> | ...
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Gmail].All Mail".
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Bin.
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Drafts.
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Important.
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Sent.
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Gmail].Sent Mail".
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Spam.
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Starred.
> | * LIST (%HasChildren) "." RMKrugGMAIL.[Mailbox].
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Mailbox].Later.
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Buy".
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Download".
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Follow".
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Read".
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Watch".
> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].Wait For Feedback".
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.Emacs-macosx.
> | * LIST (%HasNoChildren) "." RMKrugGMAIL.INBOX.
> | ...
> `----
>
> But the line with the '.Later' folder is not iterated through in the
> while loop.

In Gnus, do you see any of the groups above that are *not* quoted? Ie,
Important, or Emacs-macosx?

A problem I've run into in the past is that Gnus parses the mailbox name
using (read (current-buffer)). That's supposed to chomp the whole name
in one go, which it does if the mailbox is quoted. But if it isn't
quoted, the read just chomps forward until it hits a slash, or a period,
or some other character that it considers to delimit a Lisp object.

Right now, browsing the group list for any of my Gmail imap accounts, I
see this in the list:

U      0: [Gmail]
U      0: [Gmail]
U      0: [Gmail]
U      0: [Gmail]

Actually, those are my Spam, Trash, and Drafts groups, plus the one
"HasChildren" [Gmail] mailbox. They just show up broken in the browse
list, I think because of the problem I outlined above.

Mind you, I'm actually able to access those groups in the *Group*
buffer, I assume because the groups were already entered into my newsrc
file.

It would be nice if there was a dovecot option to say "quote mailbox
names no matter what," but I don't know if there is. I think the spec
says the names must be quoted if there's a space in them, but if not
it's up to the server.

Just to confirm this, would you mind eval'ling this version of
nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
ago, that I used when I was having this problem, but then I stopped
using it, I don't remember why. It's possible I used it for a while, the
groups were entered correctly into my newsrc, and then when I stopped
using it it didn't break anything, so I let it go.

One manual edit you'll have to make is to add a ^M control character
where I've indicated below -- I think it wouldn't survive the email
trip.

(defun nnimap-get-groups ()
  (erase-buffer)
  (let ((sequence (nnimap-send-command "LIST \"\" \"*\""))
	groups)
    (nnimap-wait-for-response sequence)
    (subst-char-in-region (point-min) (point-max)
			  ?\\ ?% t)
    (goto-char (point-min))
    (nnimap-unfold-quoted-lines)
    (goto-char (point-min))
    (while (search-forward "* LIST " nil t)
      (let ((flags (read (current-buffer)))
	    (separator (read (current-buffer)))
	    (group (buffer-substring-no-properties
		    (progn (skip-chars-forward " \"")
			   (point))
		    (progn (move-end-of-line 1)
			   (skip-chars-backward " \"") ; add a C-q C-m inside this string
			   (point)))))
	(unless (member '%NoSelect flags)
	  (push (utf7-decode (if (stringp group)
				 group
			       (format "%s" group)) t)
		groups))))
    (nreverse groups)))




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

* SOLVED: unquoted group names from dovecot not shown in GNUS WAS: One folder in local imap not seen
  2014-08-13 10:43         ` Eric Abrahamsen
@ 2014-08-13 12:29           ` Rainer M Krug
  2014-08-13 14:39             ` Eric Abrahamsen
  2015-01-27  7:34           ` [gmane.emacs.gnus.user] " Lars Ingebrigtsen
  1 sibling, 1 reply; 12+ messages in thread
From: Rainer M Krug @ 2014-08-13 12:29 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

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

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>
>>>> <#secure method=pgpmime mode=sign>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>>
>>>>>> I am posting this here now, as I did not get any reponse on the
>>>>>> gnus.user list.
>>>>>>
>>>>>> I have one folder in my local imap, which I see when I telnet into the
>>>>>> local imap server, which is seen by e.g. Mail (OSX), but not seen by
>>>>>> gnus. I have added the local imap server again as an additional server,
>>>>>> but I also couldn't see it there. It is not killed as far as I can see.
>>>>>
>>>>> One good way of seeing where things are going wrong is to edebug
>>>>> `nnimap-get-groups'. When you go into the *Server* buffer and list the
>>>>> groups in your local imap server, you'll be able to see the results of
>>>>> the LIST command, and then see how Gnus parses those results. That
>>>>> should get you closer to the source of the problem.
>>>>
>>>> OK - yes, it does. But it does not help me. When I cycle through the
>>>> 'nnimap-get-groups' function, I can't make any sense out of the results,
>>>> but I realized that in the (while ...) loop (see the code for reference below), the folder
>>>> ...[Mailbox].Later does not occur. As I can't make any sense out of the
>>>> previous results.
>>>>
>>>> Any further tips how I can debug this? 
>>>
>>> The early part of the function is just issuing the LIST command to imap,
>>> and inserting the results into a buffer. Just to make sure that the LIST
>>> command *isn't* returning your folder, step through `nnimap-get-groups'
>>> again, and when you get to the second (goto-char (point-min)), hit "e"
>>> to eval, and tell it (switch-to-buffer (current-buffer)). That should
>>> make visible a buffer with a name like "#<buffer *nnimap PR nil
>>> *nntpd**-44898>". You can see the results of the LIST command there.
>>>
>>> If the folder really isn't in that list, then I don't know what to tell
>>> you -- Gnus should be getting exactly the same results as your local
>>> telnet experiments. 
>>
>> OK - they are in the result from the LIST output:
>>
>> ,----
>> | ...
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Gmail].All Mail".
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Bin.
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Drafts.
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Important.
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Sent.
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Gmail].Sent Mail".
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Spam.
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Gmail].Starred.
>> | * LIST (%HasChildren) "." RMKrugGMAIL.[Mailbox].
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.[Mailbox].Later.
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Buy".
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Download".
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Follow".
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Read".
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].To Watch".
>> | * LIST (%HasNoChildren) "." "RMKrugGMAIL.[Mailbox].Wait For Feedback".
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.Emacs-macosx.
>> | * LIST (%HasNoChildren) "." RMKrugGMAIL.INBOX.
>> | ...
>> `----
>>
>> But the line with the '.Later' folder is not iterated through in the
>> while loop.
>
> In Gnus, do you see any of the groups above that are *not* quoted? Ie,
> Important, or Emacs-macosx?

I see all groups which are not quoted except the ones which have "[...]"
in their name / path. So I do not see RMKrugGMAIL.[Gmail].Important, but
I see e.g. RMKrugGMAIL.INBOX


>
> A problem I've run into in the past is that Gnus parses the mailbox name
> using (read (current-buffer)). That's supposed to chomp the whole name
> in one go, which it does if the mailbox is quoted. But if it isn't
> quoted, the read just chomps forward until it hits a slash, or a period,
> or some other character that it considers to delimit a Lisp object.

That explains.

>
> Right now, browsing the group list for any of my Gmail imap accounts, I
> see this in the list:
>
> U      0: [Gmail]
> U      0: [Gmail]
> U      0: [Gmail]
> U      0: [Gmail]

Interestingly, when stepping through the code, I see several
Gmail. occurring, but I do not see them in the listing. 

>
> Actually, those are my Spam, Trash, and Drafts groups, plus the one
> "HasChildren" [Gmail] mailbox. They just show up broken in the browse
> list, I think because of the problem I outlined above.
>
> Mind you, I'm actually able to access those groups in the *Group*
> buffer, I assume because the groups were already entered into my newsrc
> file.

Same here - and I think I saw them in an earlier version of gnus, but I
am not sure.

>
> It would be nice if there was a dovecot option to say "quote mailbox
> names no matter what," but I don't know if there is. I think the spec
> says the names must be quoted if there's a space in them, but if not
> it's up to the server.

Agreed. AS I am using offlineimap, I could use name translation rules,
but I kind of don't like the idea here.

>
> Just to confirm this, would you mind eval'ling this version of
> nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
> ago, that I used when I was having this problem, but then I stopped
> using it, I don't remember why. It's possible I used it for a while, the
> groups were entered correctly into my newsrc, and then when I stopped
> using it it didn't break anything, so I let it go.
>
> One manual edit you'll have to make is to add a ^M control character
> where I've indicated below -- I think it wouldn't survive the email
> trip.

OK - this is working. Thanks a lot. I will add it to my .gnus.el file
until a release of gnus which includes a fix is released.

If there is anything else I should test, please let ma know.

Thanks a million,

Rainer

>
> (defun nnimap-get-groups ()
>   (erase-buffer)
>   (let ((sequence (nnimap-send-command "LIST \"\" \"*\""))
> 	groups)
>     (nnimap-wait-for-response sequence)
>     (subst-char-in-region (point-min) (point-max)
> 			  ?\\ ?% t)
>     (goto-char (point-min))
>     (nnimap-unfold-quoted-lines)
>     (goto-char (point-min))
>     (while (search-forward "* LIST " nil t)
>       (let ((flags (read (current-buffer)))
> 	    (separator (read (current-buffer)))
> 	    (group (buffer-substring-no-properties
> 		    (progn (skip-chars-forward " \"")
> 			   (point))
> 		    (progn (move-end-of-line 1)
> 			   (skip-chars-backward " \"") ; add a C-q C-m inside this string
> 			   (point)))))
> 	(unless (member '%NoSelect flags)
> 	  (push (utf7-decode (if (stringp group)
> 				 group
> 			       (format "%s" group)) t)
> 		groups))))
>     (nreverse groups)))
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: SOLVED: unquoted group names from dovecot not shown in GNUS WAS: One folder in local imap not seen
  2014-08-13 12:29           ` SOLVED: unquoted group names from dovecot not shown in GNUS WAS: " Rainer M Krug
@ 2014-08-13 14:39             ` Eric Abrahamsen
  2014-08-13 16:12               ` Rainer M Krug
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2014-08-13 14:39 UTC (permalink / raw)
  To: ding

Rainer M Krug <Rainer@krugs.de> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>
>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>
>>>>> <#secure method=pgpmime mode=sign>
>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>
>>>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>>>

[...]

>> A problem I've run into in the past is that Gnus parses the mailbox name
>> using (read (current-buffer)). That's supposed to chomp the whole name
>> in one go, which it does if the mailbox is quoted. But if it isn't
>> quoted, the read just chomps forward until it hits a slash, or a period,
>> or some other character that it considers to delimit a Lisp object.
>
> That explains.
>
>>
>> Right now, browsing the group list for any of my Gmail imap accounts, I
>> see this in the list:
>>
>> U      0: [Gmail]
>> U      0: [Gmail]
>> U      0: [Gmail]
>> U      0: [Gmail]
>
> Interestingly, when stepping through the code, I see several
> Gmail. occurring, but I do not see them in the listing. 
>
>>
>> Actually, those are my Spam, Trash, and Drafts groups, plus the one
>> "HasChildren" [Gmail] mailbox. They just show up broken in the browse
>> list, I think because of the problem I outlined above.
>>
>> Mind you, I'm actually able to access those groups in the *Group*
>> buffer, I assume because the groups were already entered into my newsrc
>> file.
>
> Same here - and I think I saw them in an earlier version of gnus, but I
> am not sure.
>
>>
>> It would be nice if there was a dovecot option to say "quote mailbox
>> names no matter what," but I don't know if there is. I think the spec
>> says the names must be quoted if there's a space in them, but if not
>> it's up to the server.
>
> Agreed. AS I am using offlineimap, I could use name translation rules,
> but I kind of don't like the idea here.
>
>>
>> Just to confirm this, would you mind eval'ling this version of
>> nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
>> ago, that I used when I was having this problem, but then I stopped
>> using it, I don't remember why. It's possible I used it for a while, the
>> groups were entered correctly into my newsrc, and then when I stopped
>> using it it didn't break anything, so I let it go.
>>
>> One manual edit you'll have to make is to add a ^M control character
>> where I've indicated below -- I think it wouldn't survive the email
>> trip.
>
> OK - this is working. Thanks a lot. I will add it to my .gnus.el file
> until a release of gnus which includes a fix is released.

Mostly I'm just glad because it proves I'm not crazy! When I ran into
this a year or so ago I posted to the list, and got nothing but
crickets. I didn't understand how I could be the only one having the
problem...

I'm not sure if this is the best fix (it's certainly ugly), but it does
work, and I do think it's Gnus' responsibility to handle non-quoted
mailbox names -- they are legal. I hope someone else on the list has an
opinion on the best solution...

Glad it's fixed!

Eric




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

* Re: SOLVED: unquoted group names from dovecot not shown in GNUS WAS: One folder in local imap not seen
  2014-08-13 14:39             ` Eric Abrahamsen
@ 2014-08-13 16:12               ` Rainer M Krug
  0 siblings, 0 replies; 12+ messages in thread
From: Rainer M Krug @ 2014-08-13 16:12 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

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

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>
>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>
>>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>>
>>>>>> <#secure method=pgpmime mode=sign>
>>>>>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>>>>>
>>>>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>>>>
>
> [...]
>
>>> A problem I've run into in the past is that Gnus parses the mailbox name
>>> using (read (current-buffer)). That's supposed to chomp the whole name
>>> in one go, which it does if the mailbox is quoted. But if it isn't
>>> quoted, the read just chomps forward until it hits a slash, or a period,
>>> or some other character that it considers to delimit a Lisp object.
>>
>> That explains.
>>
>>>
>>> Right now, browsing the group list for any of my Gmail imap accounts, I
>>> see this in the list:
>>>
>>> U      0: [Gmail]
>>> U      0: [Gmail]
>>> U      0: [Gmail]
>>> U      0: [Gmail]
>>
>> Interestingly, when stepping through the code, I see several
>> Gmail. occurring, but I do not see them in the listing. 
>>
>>>
>>> Actually, those are my Spam, Trash, and Drafts groups, plus the one
>>> "HasChildren" [Gmail] mailbox. They just show up broken in the browse
>>> list, I think because of the problem I outlined above.
>>>
>>> Mind you, I'm actually able to access those groups in the *Group*
>>> buffer, I assume because the groups were already entered into my newsrc
>>> file.
>>
>> Same here - and I think I saw them in an earlier version of gnus, but I
>> am not sure.
>>
>>>
>>> It would be nice if there was a dovecot option to say "quote mailbox
>>> names no matter what," but I don't know if there is. I think the spec
>>> says the names must be quoted if there's a space in them, but if not
>>> it's up to the server.
>>
>> Agreed. AS I am using offlineimap, I could use name translation rules,
>> but I kind of don't like the idea here.
>>
>>>
>>> Just to confirm this, would you mind eval'ling this version of
>>> nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
>>> ago, that I used when I was having this problem, but then I stopped
>>> using it, I don't remember why. It's possible I used it for a while, the
>>> groups were entered correctly into my newsrc, and then when I stopped
>>> using it it didn't break anything, so I let it go.
>>>
>>> One manual edit you'll have to make is to add a ^M control character
>>> where I've indicated below -- I think it wouldn't survive the email
>>> trip.
>>
>> OK - this is working. Thanks a lot. I will add it to my .gnus.el file
>> until a release of gnus which includes a fix is released.
>
> Mostly I'm just glad because it proves I'm not crazy! When I ran into
> this a year or so ago I posted to the list, and got nothing but
> crickets. I didn't understand how I could be the only one having the
> problem...

Same here - I tried a few times on the other mailing list and no
response there.

>
> I'm not sure if this is the best fix (it's certainly ugly), but it does
> work, and I do think it's Gnus' responsibility to handle non-quoted
> mailbox names -- they are legal. I hope someone else on the list has an
> opinion on the best solution...

Just send a bug report.

>
> Glad it's fixed!
>
> Eric
>
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2014-08-13 10:43         ` Eric Abrahamsen
  2014-08-13 12:29           ` SOLVED: unquoted group names from dovecot not shown in GNUS WAS: " Rainer M Krug
@ 2015-01-27  7:34           ` Lars Ingebrigtsen
  2015-01-27 14:37             ` Eric Abrahamsen
  1 sibling, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-27  7:34 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Just to confirm this, would you mind eval'ling this version of
> nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
> ago, that I used when I was having this problem, but then I stopped
> using it, I don't remember why. It's possible I used it for a while, the
> groups were entered correctly into my newsrc, and then when I stopped
> using it it didn't break anything, so I let it go.

Could you submit a patch with this fix?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2015-01-27  7:34           ` [gmane.emacs.gnus.user] " Lars Ingebrigtsen
@ 2015-01-27 14:37             ` Eric Abrahamsen
  2015-01-28  0:45               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2015-01-27 14:37 UTC (permalink / raw)
  To: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Just to confirm this, would you mind eval'ling this version of
>> nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
>> ago, that I used when I was having this problem, but then I stopped
>> using it, I don't remember why. It's possible I used it for a while, the
>> groups were entered correctly into my newsrc, and then when I stopped
>> using it it didn't break anything, so I let it go.
>
> Could you submit a patch with this fix?  :-)

Can do! Will this require any NEWS or CHANGELOG entries?




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

* Re: [gmane.emacs.gnus.user] Re: One folder in local imap not seen
  2015-01-27 14:37             ` Eric Abrahamsen
@ 2015-01-28  0:45               ` Lars Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2015-01-28  0:45 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> Just to confirm this, would you mind eval'ling this version of
>>> nnimap-get-groups, and seeing if it helps? It's an ugly hack from ages
>>> ago, that I used when I was having this problem, but then I stopped
>>> using it, I don't remember why. It's possible I used it for a while, the
>>> groups were entered correctly into my newsrc, and then when I stopped
>>> using it it didn't break anything, so I let it go.
>>
>> Could you submit a patch with this fix?  :-)
>
> Can do! Will this require any NEWS or CHANGELOG entries?

No, I don't think so.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

end of thread, other threads:[~2015-01-28  0:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12 13:36 [gmane.emacs.gnus.user] Re: One folder in local imap not seen Rainer M Krug
2014-08-12 23:17 ` Eric Abrahamsen
2014-08-13  8:29   ` Rainer M Krug
2014-08-13  9:14     ` Eric Abrahamsen
2014-08-13 10:05       ` Rainer M Krug
2014-08-13 10:43         ` Eric Abrahamsen
2014-08-13 12:29           ` SOLVED: unquoted group names from dovecot not shown in GNUS WAS: " Rainer M Krug
2014-08-13 14:39             ` Eric Abrahamsen
2014-08-13 16:12               ` Rainer M Krug
2015-01-27  7:34           ` [gmane.emacs.gnus.user] " Lars Ingebrigtsen
2015-01-27 14:37             ` Eric Abrahamsen
2015-01-28  0:45               ` 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).