Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: Fwd: Patch for a bug in imap-open
Date: Sat, 27 Aug 2005 15:15:58 +0200	[thread overview]
Message-ID: <ilur7cfo701.fsf@latte.josefsson.org> (raw)
In-Reply-To: <9a9bfc1705082613105b0a87f1@mail.gmail.com> (Ramkumar R.'s message of "Sat, 27 Aug 2005 01:40:24 +0530")

Ramkumar R <andyetitmoves@gmail.com> 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.



  reply	other threads:[~2005-08-27 13:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9a9bfc1705082505035774a0e0@mail.gmail.com>
     [not found] ` <m3pss2x8uo.fsf@quimbies.gnus.org>
2005-08-26 20:10   ` Ramkumar R
2005-08-27 13:15     ` Simon Josefsson [this message]
2005-08-27 14:05       ` Ramkumar R
2005-08-28  9:12         ` Simon Josefsson
2005-08-29  7:20           ` Ramkumar R

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