From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60817 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Fwd: Patch for a bug in imap-open Date: Sat, 27 Aug 2005 15:15:58 +0200 Message-ID: References: <9a9bfc1705082505035774a0e0@mail.gmail.com> <9a9bfc1705082613105b0a87f1@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1125148633 4744 80.91.229.2 (27 Aug 2005 13:17:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 27 Aug 2005 13:17:13 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M9349=ding+2Daccount=gmane.org@lists.math.uh.edu Sat Aug 27 15:17:07 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E90Xo-0001cC-HY for ding-account@gmane.org; Sat, 27 Aug 2005 15:16:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1E90Xm-0005lV-01 for ding-account@gmane.org; Sat, 27 Aug 2005 08:16:22 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1E90Xg-0005lN-00 for ding@lists.math.uh.edu; Sat, 27 Aug 2005 08:16:16 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1E90Xf-0006Ou-Io for ding@lists.math.uh.edu; Sat, 27 Aug 2005 08:16:15 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1E90XZ-0006nL-00 for ; Sat, 27 Aug 2005 15:16:09 +0200 Original-Received: from latte.josefsson.org (c494102a.s-bi.bostream.se [217.215.27.65]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3) with ESMTP id j7RDG0H5013774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 27 Aug 2005 15:16:01 +0200 Original-To: Ramkumar R OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:050827:andyetitmoves@gmail.com::5RXoYsxksM2z31ar:3iJ X-Hashcash: 1:21:050827:ding@gnus.org::IEIx4MEM9gDIyXlw:ASUK In-Reply-To: <9a9bfc1705082613105b0a87f1@mail.gmail.com> (Ramkumar R.'s message of "Sat, 27 Aug 2005 01:40:24 +0530") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=failed version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yxa-iv X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60817 Archived-At: Ramkumar R writes: > Hi! > > I had sent a patch to Lars (plz. see details in the conv. below). He > has asked me to send it to this group for its perusal...so here's the > patch... ... >> I encountered an error when opening my inbox over imap with starttls. >> There is an error thrown up which gets swallowed by a condition-case >> somewhere higher up and I get an error message and a yes-or-no-p >> asking me if I want to continue. Traced the problem to imap-open and I >> have enclosed a patch. I program in lisp, but have no idea about the >> gnus source. So, it is likely that the solution is wrong or hackish. >> Works for me though :) ... > Index: lisp/imap.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/imap.el,v > retrieving revision 7.21 > diff -r7.21 imap.el > 1094,1095c1094,1097 > < (kill-buffer buffer) > < (rename-buffer buffer) > --- >> (let ((bname (buffer-name buffer))) >> (kill-buffer buffer) >> (setq buffer (current-buffer)) >> (rename-buffer bname)) There is something wrong with this patch; imap-open should make sure the returned process is inside the buffer provided in the BUFFER argument. Your patch changes this interface, causing all callers of imap-open to be updated as follows: > Index: lisp/mail-source.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/mail-source.el,v > retrieving revision 7.11 > diff -r7.11 mail-source.el > 993c993 > < (if (and (imap-open server port stream authentication buf) > --- >> (if (and (setq buf (imap-open server port stream authentication buf)) Doing that is complicated inside nnimap.el, and I'd rather not change the API in this way if possible. Exactly what problem did you see? Use (setq debug-on-signal t) to find errors that are swallowed by condition-case.