From: Juergen Kreileder <jk@blackdown.de>
Subject: Re: Three problems with multiple IMAP accounts (patch for 2 of 3)
Date: Fri, 18 Feb 2005 14:44:45 +0100 [thread overview]
Message-ID: <87is4q0ype.fsf@blackdown.de> (raw)
In-Reply-To: <87wtt76edw.fsf@blackdown.de>
Juergen Kreileder <jk@blackdown.de> writes:
> Problem 1: Excessive reconnecting
> ==========
This was caused by comparing imap-state with 'select instead of
'selected.
I've attached a patch which seems to fix that and problem 3.
So this just leaves:
> Problem 2: Agent confusion
> ==========
> Sometimes the agent confuses the two IMAP accounts. The consequence
> is that new mail doesn't show up anymore, or it shows up on the
> wrong account. Entering a group also shows the contents from the
> group with the same name on the other account. To get things
> working again, I have to delete ~/News/agent/.
Fix for problems 1 and 3:
--- /usr/share/emacs/site-lisp/gnus/lisp/imap.el 2005-02-16 12:30:12.000000000 +0100
+++ ./imap.el 2005-02-18 14:24:12.000000000 +0100
@@ -1123,7 +1123,7 @@ password is remembered in the buffer."
(with-current-buffer (or buffer (current-buffer))
(if (not (eq imap-state 'nonauth))
(or (eq imap-state 'auth)
- (eq imap-state 'select)
+ (eq imap-state 'selected)
(eq imap-state 'examine))
(make-local-variable 'imap-username)
(make-local-variable 'imap-password)
--- /usr/share/emacs/site-lisp/gnus/lisp/nnimap.el 2005-02-16 12:30:12.000000000 +0100
+++ ./nnimap.el 2005-02-18 14:23:17.000000000 +0100
@@ -826,7 +826,7 @@ If EXAMINE is non-nil the group is selec
(or (and nnimap-server-buffer
(imap-opened nnimap-server-buffer)
(if (with-current-buffer nnimap-server-buffer
- (memq imap-state '(auth select examine)))
+ (memq imap-state '(auth selected examine)))
t
(imap-close nnimap-server-buffer)
(nnimap-open-connection server)))
@@ -989,8 +989,11 @@ function is generally only called when G
(defun nnimap-update-unseen (group &optional server)
"Update the unseen count in `nnimap-mailbox-info'."
(gnus-sethash
- (gnus-group-prefixed-name group server)
- (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server)
+ (gnus-group-prefixed-name group (gnus-server-to-method
+ (format "nnimap:%s" server)))
+ (let ((old (gnus-gethash-safe (gnus-group-prefixed-name
+ group (gnus-server-to-method
+ (format "nnimap:%s" server)))
nnimap-mailbox-info)))
(list (nth 0 old) (nth 1 old)
(imap-mailbox-status group 'unseen nnimap-server-buffer)
@@ -1098,7 +1101,9 @@ function is generally only called when G
(dolist (group groups)
(gnus-message 9 "nnimap: Quickly checking mailbox %s" group)
(add-to-list (if (gnus-gethash-safe
- (gnus-group-prefixed-name group server)
+ (gnus-group-prefixed-name
+ group (gnus-server-to-method
+ (format "nnimap:%s" server)))
nnimap-mailbox-info)
'asyncgroups
'slowgroups)
@@ -1111,20 +1116,26 @@ function is generally only called when G
new old)
(when (imap-ok-p (imap-wait-for-tag tag nnimap-server-buffer))
(if (or (not (string=
- (nth 0 (gnus-gethash (gnus-group-prefixed-name
- group server)
- nnimap-mailbox-info))
+ (nth 0 (gnus-gethash
+ (gnus-group-prefixed-name
+ group (gnus-server-to-method
+ (format "nnimap:%s" server)))
+ nnimap-mailbox-info))
(imap-mailbox-get 'uidvalidity group
nnimap-server-buffer)))
(not (string=
- (nth 1 (gnus-gethash (gnus-group-prefixed-name
- group server)
- nnimap-mailbox-info))
+ (nth 1 (gnus-gethash
+ (gnus-group-prefixed-name
+ group (gnus-server-to-method
+ (format "nnimap:%s" server)))
+ nnimap-mailbox-info))
(imap-mailbox-get 'uidnext group
nnimap-server-buffer))))
(push (list group) slowgroups)
(insert (nth 3 (gnus-gethash (gnus-group-prefixed-name
- group server)
+ group (gnus-server-to-method
+ (format "nnimap:%s"
+ server)))
nnimap-mailbox-info))))))))
(dolist (group slowgroups)
(if nnimap-retrieve-groups-asynchronous
@@ -1144,7 +1155,8 @@ function is generally only called when G
(insert str)
(when nnimap-retrieve-groups-asynchronous
(gnus-sethash
- (gnus-group-prefixed-name group server)
+ (gnus-group-prefixed-name
+ group (gnus-server-to-method (format "nnimap:%s" server)))
(list (or (imap-mailbox-get
'uidvalidity group nnimap-server-buffer)
(imap-mailbox-status
=
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/
prev parent reply other threads:[~2005-02-18 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-17 3:42 Three problems with multiple IMAP accounts Juergen Kreileder
2005-02-17 4:12 ` Mark Plaksin
2005-02-17 5:31 ` Juergen Kreileder
2005-02-18 13:44 ` Juergen Kreileder [this message]
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=87is4q0ype.fsf@blackdown.de \
--to=jk@blackdown.de \
/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).