Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: Process imap not running
Date: Mon, 14 Jan 2008 21:33:27 +0100	[thread overview]
Message-ID: <v9ir1wno4o.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87wsqc5ihz.fsf@photon.caeruleus.net> (Ralf Angeli's message of "Mon, 14 Jan 2008 20:12:24 +0100")

On Mon, Jan 14 2008, Ralf Angeli wrote:

> * Knut Anders Hatlen (2008-01-10) writes:
>> Ralf Angeli <angeli@caeruleus.net> writes:
>>> Debugger entered--Lisp error: (error "Process imap not running")
>>>   process-send-string(#<process imap> "37 EXAMINE \"INBOX\"
> [...]
>> I used to have the same problem, but I managed to work around it with a
>> simple fix. See this article for the details:
>>
>> http://article.gmane.org/gmane.emacs.gnus.general/63692
[ Date: Tue, 05 Sep 2006 23:06:33 +0200
  Message-ID: <86d5aa81ly.fsf@ugle.hatlen.net> ]

> Thanks!  I've been using this patch for three days now and haven't got
> the error during this time.

Does anyone see a problem with it?  Simon?  (There was no response to
the original message.)

--- lisp/imap.el	26 Jun 2006 12:08:33 -0000	7.29
+++ lisp/imap.el	4 Sep 2006 17:45:39 -0000
@@ -1142,7 +1142,16 @@
        (buffer-live-p buffer)
        (with-current-buffer buffer
 	 (and imap-process
-	      (memq (process-status imap-process) '(open run))))))
+	      (memq (process-status imap-process) '(open run))
+	      (imap-ping-server)))))
+
+(defun imap-ping-server (&optional buffer)
+  "Ping the imap server in BUFFER with a noop command. Return non-nil
+if the server responds, and nil if it does not respond. If BUFFER is
+nil, the current buffer is used."
+  (condition-case ()
+      (imap-ok-p (imap-send-command-wait "NOOP" buffer))
+    (error nil)))

 (defun imap-authenticate (&optional user passwd buffer)
   "Authenticate to server in BUFFER, using current buffer if nil.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



  reply	other threads:[~2008-01-14 20:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06  9:38 Ralf Angeli
2008-01-10 12:19 ` Knut Anders Hatlen
2008-01-11 13:58   ` Andreas Jaeger
2008-01-14 19:12   ` Ralf Angeli
2008-01-14 20:33     ` Reiner Steib [this message]
2008-01-14 20:57       ` Simon Josefsson
2008-01-14 23:27         ` Reiner Steib
2008-01-15 21:08           ` Ted Zlatanov
2008-01-16 22:50             ` Reiner Steib
2008-01-17 14:36               ` Ted Zlatanov
2008-01-17 18:33                 ` Reiner Steib
2008-01-18  4:58                   ` Ted Zlatanov

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=v9ir1wno4o.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.org \
    --cc=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).