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: Sun, 28 Aug 2005 11:12:06 +0200	[thread overview]
Message-ID: <iluslwumnmh.fsf@latte.josefsson.org> (raw)
In-Reply-To: <9a9bfc170508270705c0af282@mail.gmail.com> (Ramkumar R.'s message of "Sat, 27 Aug 2005 19:35:47 +0530")

Ramkumar R <andyetitmoves@gmail.com> writes:

>> 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:
>
> yeah....i realised that. from what i could gather from the function,
> the function tries to create a new buffer when tls is supported and
> fills in the contents. If we have to use the same buffer, we would
> need to reinitialize the buffer to a clean state, and use it instead
> of a new buffer. as i said, i am not familiar with the gnus
> source...so i didn't know if copying buffer contents after possibly a
> kill-all-local-variables would be safe...(the older buffer also has a
> process) or is it required that we selectively tweak some
> variables....this seemed the easiest way out...if u can figure that
> out, then perhaps we can manage with the same buffer..

But doing that is exactly what the current code attempts to do.  It
create a temporary buffer for the TLS/GSSAPI/whatever, and if that
connection succeed, it close the first connection (in BUFFER), kill
that buffer and rename the new temporary buffer to the old BUFFER:

		    (message "imap: Reconnecting with stream `%s'..." stream)
		    (if (null (let ((imap-stream stream))
				(imap-open-1 (current-buffer))))
			(progn
			  (kill-buffer (current-buffer))
			  (message
			   "imap: Reconnecting with stream `%s'...failed"
			   stream))
		      ;; We're done, kill the first connection
		      (imap-close buffer)
		      (kill-buffer buffer)
		      (rename-buffer buffer)
		      (message "imap: Reconnecting with stream `%s'...done"
			       stream)

>> Exactly what problem did you see?  Use (setq debug-on-signal t) to
>> find errors that are swallowed by condition-case.
>
> well...debug-on-signal springs up a lot of other spurious errors in
> other packages in my setup. For that matter, there are many cases
> where condition-case's are genuine, unlike in the case i described,
> where it was an error which was covered up for the user's convenience.

You can press `c' to continue passed spurious errors.

I think we should go back to what your original problem was instead of
looking at possible solutions.  I haven't understood what problem you
want to solve.



  reply	other threads:[~2005-08-28  9:12 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
2005-08-27 14:05       ` Ramkumar R
2005-08-28  9:12         ` Simon Josefsson [this message]
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=iluslwumnmh.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).