Subject: bug#35270: 27.0.50; gnus nnimap weird interaction between select methods

From: Eric Abrahamsen <[email-masked]>
Date: Tue, 23 Apr 2019 15:38:15 -0700

On 04/22/19 23:20 PM, Deus Max wrote:
> On Mon, Apr 22 2019, Eric Abrahamsen wrote:
>
>> Deus Max <[email-masked]> writes:
>>
>>> On Sun, Apr 14 2019, Basil L. Contovounesios wrote:
>>>
>>>> Deus Max <[email-masked]> writes:
>>>>
>>>>> Following the recent strange behaviors with gnus group buffers and other
>>>>> gnus related stuff, I decided to have a clean start for my gnus:
>>>>>
>>>>> 1. removed the gnus start-up files:
>>>>>    mv .newsrc dot-newsrc
>>>>>    mv .newsrc.eld dot-newsrc.eld
>>>>>    mv .gnus.el dot-gnus.el   -- (empty anyway)
>>>>>    rm .*~
>>>>
>>>> Can you reproduce this starting from 'emacs -Q' in a clean HOME
>>>> directory, i.e. with
>>>>
>>>>   HOME=$(mktemp -d) emacs -Q
>>>>
>>>> or similar?  I ask because it is possible for something in your
>>>> configuration and/or home directory to be interfering, see e.g.
>>>> https://debbugs.gnu.org/35208#11
>>>>
>>>> Thanks,
>>>
>>> Yes and I did.
>>> Repeating with a clean HOME directory gives the same results wrt
>>>           the gnus behavior described above.
>>
>> I'm trying to imagine what could be causing this behavior, and so far
>> haven't come up with any likely theories! You mentioned removing your
>> start-up files before starting this experiment, but you must have some
>> config in place to define the two imap servers: can you show me the
>> absolute minimum config sufficient to display this weirdness? (And would
>> you mind updating to the most recent master before you do? It's possible
>> some recent updates might have addressed this.)
>>
>> Thanks,
>> Eric
>
> I tried this on Sat Apr. 20 and got the same results.
> Also today, by pulling to the latest commit:
>     : commit 981470e3590534a4d2947dfe5626cae832c6502d
>     : Author: Philipp Stephani <[email-masked]>
>     : Date:   Mon Apr 22 18:58:51 2019 +0200
>
> compiling with "make bootstrap" and running from a (almost) empty
> directory as:  ~HOME=$(pwd) Emacs~
> The HOME directory is ~/tmp/emacs-test
>
> Again the same results!!
> I believe the same results should be repeatable, if running with 2
> imap servers, one defined in the gnus-select-method variable and the
> other in the gnus-secondary-select-methods.

I've tried that with two of my own imap servers, but no luck, everything
works as expected.

> Then the "primary" select method groups exist twice, once without group
> prefix (ex INBOX) and once with (ex nnimap+gmx:INBOX).
>
>
>
> It is surprising gnus asks username/password for a  "gmx+AIA", which is
> weird. Doesn't make sense. Can it be a bug for trying to
> merge/simplify the gnus select methods ? Is there any work, underway to
> combine gnus-select-method and gnus-secondary-select-methods ?

Only in my head! It's something I would like to work on, but I haven't
started yet, so that can't be it. I really don't know how my changes
could have caused it.

> Hope all this helps !
>
>
> For my configuration:
>   1. I have no /etc/emacs files.
>
>   2. The $HOME/.emacs.d/init.el file is:
>
>       (setq custom-file "~/customize.el")
>       (load custom-file)
>       (prefer-coding-system 'utf-8)
>
>   3. The customize.el is attached.
>
>      (custom-set-variables
>  ;; custom-set-variables was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(custom-file "~/customize.el")
>  '(gnus-message-archive-group '(lambda (grp) (if grp gnus-newsgroup-name "Send-Mail")))
>  '(gnus-message-archive-method '(nnimap "gmx"))

Does this actually work? I would have thought you had to fully specify
the archive method.

>  '(gnus-nntp-server nil)

This is obsolete and you might as well delete it.

>  '(gnus-nntpserver-file "/etc/news/spool")
>  '(gnus-play-startup-jingle t)

This variable appears not to exist -- though it sounds both fascinating
and horrifying.

>  '(gnus-secondary-select-methods
>    '((nnimap "AIA"
>              (nnimap-address "imap-mail.outlook.com")
>              (nnimap-stream ssl)
>              (nnimap-server-port "imaps"))))
>  '(gnus-secondary-servers nil)

You might as well get rid of this too, as it's no longer used.

The only other thing I can think of is setting `gnus-verbose' to 10 and
showing us all the messages: that will at least tell you a little bit
more about what Gnus thinks it's doing.

Eric