From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53419 Path: main.gmane.org!not-for-mail From: Gaute B Strokkenes Newsgroups: gmane.emacs.gnus.general Subject: Funny-looking code in imap.el Date: Mon, 14 Jul 2003 03:05:38 +0100 Organization: The Church of Emacs Sender: ding-owner@lists.math.uh.edu Message-ID: <87znjhsw0d.fsf@cam.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1058148369 9426 80.91.224.249 (14 Jul 2003 02:06:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2003 02:06:09 +0000 (UTC) Original-X-From: ding-owner+M1963@lists.math.uh.edu Mon Jul 14 04:06:06 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19bsj8-0002RM-00 for ; Mon, 14 Jul 2003 04:06:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19bsjr-0004eI-00; Sun, 13 Jul 2003 21:06:51 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19bsjj-0004eC-00 for ding@lists.math.uh.edu; Sun, 13 Jul 2003 21:06:44 -0500 Original-Received: (qmail 9757 invoked by alias); 14 Jul 2003 02:06:43 -0000 Original-Received: (qmail 9752 invoked from network); 14 Jul 2003 02:06:43 -0000 Original-Received: from mta03-svc.ntlworld.com (62.253.162.43) by sclp3.sclp.com with SMTP; 14 Jul 2003 02:06:43 -0000 Original-Received: from belldandy ([81.100.93.186]) by mta03-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20030714020642.SZXK2652.mta03-svc.ntlworld.com@belldandy> for ; Mon, 14 Jul 2003 03:06:42 +0100 Original-Received: from gs234 by belldandy with local (Exim 3.36 #1 (Debian)) id 19bsig-0002U9-00 for ; Mon, 14 Jul 2003 03:05:38 +0100 Mail-Copies-To: never Original-To: ding@gnus.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEWWWBTly7aGMwb+/vz9 +ffIilb///+yaCxNCwHGVC3gAAACU0lEQVR4nF2TQWvjMBBGVUGwj3WxaY/aAWNfi0zuwZPuHp0Q ob079OwYjHrsChb0s3dGctJ0ddTzm9F8lsR7WiNiWWL/flviul9Uh0NR4vY/gJUxJjOEtt/AubBy UsotRfH2DbxWE0hom3w5XJUEKis9hACt2hR4B86VDOtqTNHfgeEGvLiUN7Ddze26Dx6y1CUa+ygo NwFQm0N/BeMzCZAtNIoQrd9EhcH5mWpnztB8ZpJBlH23jaAbuE4EhZ2Bam0TeJ0DRMCKVP6CegWk q4z2TVFUx0946FOPcSe9ELE3rSHAj15rBuddS0C4BGyAutfpVAQkKdZOQiwMMIHxlUDrgeej5Ns7 I/ccSWNBLda1XwYBEG1Qswy1yXJf879nA4cjkNI0H+FzoUyuRodPA5eqZwFONG34i30ccOxeKFUy flNe1szqsgLdvXwKCj6zjTXODHV9M46gZPCLlYKCGTYO8S0aOAvJzRfD0w+1XcGIsxLUw/sYl5sM 9n0yjkoSUDOByrijwRRiAq13NhqLJYB3ACazrgN2bIwanyJQKXhHAJPRPQruEaCJP2Shy4DJ2As+ FQjJZH7AZIy6w0pQiiRYAh8nTEZHYDfRqSDeB5OXq4EEcAC4NocvoBl4+n1cyl54nyLRNA3iIwRP wNGFOK1g1Gz8jNfaCjdtqJLm2LXuqMc+50cDIJQpr6X0OHa4X58ULAw03QbRd7GUiG/K04mj0bNB xQhwJkEsJiZ1Bbgb6CnF79cBE+jwF91qniOCP3fghUFKxOShjIATw/wOfIQTg39LpFHtxhlKywAA AABJRU5ErkJggg== User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53419 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53419 Having recently switched to using imap over ssl as a mail-source (as opposed to fetchmail), I have been a bit annoyed at the amount of time it can take to say `g' now that I have two extra imap-over-ssl mail-sources. Looking at imap-ssl-open in imap.el: (while (and (memq (process-status process) '(open run)) (set-buffer buffer) ;; XXX "blue moon" nntp.el bug (goto-char (point-max)) (forward-line -1) (not (imap-parse-greeting))) (accept-process-output process 1) (sit-for 1)) I find the sit-for here rather surprising, though this bit of the logic is duplicated in the other imap-foo-open functions, so it's clearly not by mistake. The elisp manual states that the typical use of sit-for is to give the user time to read a message; that doesn't seem useful here. (The elisp manual also says that sit-for will wait for the specified amount of time or "until there is input available"--it's not clear whether this includes output from subprocesses, but there is already a call to accept-process-output anyway...) -- Gaute Strokkenes http://www.srcf.ucam.org/~gs234/ What a COINCIDENCE! I'm an authorized ``SNOOTS OF THE STARS'' dealer!!