Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: possible imap.el bug
Date: Tue, 26 Oct 2004 22:07:52 +0200	[thread overview]
Message-ID: <ilu7jpdjl9j.fsf@latte.josefsson.org> (raw)
In-Reply-To: <4ny8htmk2d.fsf@lifelogs.com> (Ted Zlatanov's message of "26 Oct 2004 14:05:30 -0400")

"Ted Zlatanov" <tzz@lifelogs.com> writes:

> On Tue, 26 Oct 2004, jas@extundo.com wrote:
>
>>> Does imap-open have to take a buffer argument?
>> 
>> If not, it will create a new unique one.  I think it is better to name
>> the server " *nnimap* foo", to mimic how nntp do things.
>> 
>>> I would make it always create the buffer, to be safe, and because
>>> reusing the old buffer has no obvious (to me) benefit.
>> 
>> Passwords, stream preferences, and possibly more useful data, are
>> stored in the buffer.  Those can be costly to discover again.
>> Especially since IMAP servers typically throw you out after 30
>> minutes.
>
> Yes, but when it doesn't work that's tough to defend :)

Right, although is anyone but you seeing this?  It could be some weird
interaction with some customization.  Anyway, it doesn't seem right to
change something without knowing what was wrong in the old code.  On
the other hand, if you can come up with a patch that works for you,
and seem harmless, and works for others, I guess there is no major
reason not to apply it, although I feel a bit uneasy about such
changes in general.

> I think that get-buffer-or-create will do the right thing anyhow based
> on the server name in imap-open, so if the buffer already exists it
> will be selected correctly.

I'm not sure.  imap-open name the buffers after the network address,
not after the virtual server name.  Imagine:

(setq gnus-secondary-select-methods
       '((nnimap "foo" (nnimap-address "mail"))
         (nnimap "bar" (nnimap-address "mail"))))

Where, for example, "foo" and "bar" could map to different user names
in ~/.authinfo.  Then there would be a collision of buffer names,
since imap.el would pick the same buffer for both servers.

Only nnimap.el have the virtual server name, that is why it create the
buffer.  Which must be unique among nnimap servers, so it can be
assumed to correspond to the same server later on.  Network addresses
aren't unique enough.

> In general, I don't understand why buffer
> names are stored in the nnimap-server-buffer-alist instead of simply
> generated on the fly.  If that buffer exists already, great.  If not,
> it's no problem either.  The parameter to imap-open may be a "purpose"
> parameter like 'nnimap, which can be used in making the buffer name
> string, but there should be no chance for passing an incorrect buffer
> as is happening now.

Is nnimap passing the incorrect buffer to imap-open?

>>> At some point, it's called with nnimap-server-buffer set to the
>>> wrong buffer but I don't know where.  I do know it happens when many
>>> articles are moved sequentially between IMAP servers.
>> 
>> Maybe the problem is in gnus-move.el?
>> 
>>> I'll keep investigating, but if we can eliminate the buffer argument
>>> to imap-open I think that would make life much easier.
>> 
>> Perhaps you could modify your local copy, temporarily?  If some code
>> is using the wrong buffer, perhaps renaming it will somehow trigger
>> the bug more easily.
>
> I'm not sure what you mean here, what should I debug?

You could modify nnimap and imap locally, to generate buffer names on
the fly, to see if that solve your problem.



  reply	other threads:[~2004-10-26 20:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 18:48 Ted Zlatanov
2004-10-14 19:03 ` Simon Josefsson
2004-10-15 15:04   ` Ted Zlatanov
2004-10-15 16:39     ` Simon Josefsson
2004-10-15 16:53       ` Ted Zlatanov
2004-10-15 16:57         ` Simon Josefsson
2004-10-15 17:32           ` Ted Zlatanov
2004-10-15 17:37             ` Simon Josefsson
     [not found]               ` <4nsm8f956n.fsf@lifelogs.com>
     [not found]                 ` <iluacunx0k6.fsf@latte.josefsson.org>
     [not found]                   ` <4nsm8fcr00.fsf@bwh.harvard.edu>
     [not found]                     ` <iluvfdbrsni.fsf@latte.josefsson.org>
     [not found]                       ` <4nvfd7ubzv.fsf@lifelogs.com>
     [not found]                         ` <ilulldvoplv.fsf@latte.josefsson.org>
2004-10-25 19:11                           ` Ted Zlatanov
2004-10-25 19:29                             ` Simon Josefsson
2004-10-26 15:06                               ` Ted Zlatanov
2004-10-26 15:54                                 ` Simon Josefsson
2004-10-26 17:09                                   ` CHENG Gao
2004-10-26 17:59                                     ` Ted Zlatanov
2004-10-26 18:05                                   ` Ted Zlatanov
2004-10-26 20:07                                     ` Simon Josefsson [this message]
2004-10-26 15:51                             ` Gerd Flaig
2004-10-26 16:01                               ` Simon Josefsson
2004-10-26 16:30                                 ` Gerd Flaig

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=ilu7jpdjl9j.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /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).