Issue642

classification
Title gnus-group-get-new-news via imap erases current buffer
Type defect Module core code 21.5
Severity data loss Platform mswindows, N/A
Keywords Nosy List adrian
explanation
process
These controls should only be changed by committers and tracker administrators.
Status new   Reason
Superseder  
Priority normal   Assigned To

Created on 2009-12-12.14:41:03 by adrian, last changed 2013-12-02.12:14:23 by stephen.

Messages
msg2019 [hidden] ([hidden]) Date: 2009-12-12.14:41:03
Jury is still out what the right module actually is.

I've seen random erase of all content of buffers I was idling in.
Turns out gnus-group-get-new-news is doing it in imap-close.

Digging deeper it is (delete-process imap-process) which has the side-
effect of changing current-buffer from the imap process buffer to the 
buffer active when gnus-group-get-new-news triggered.

Here's my debugging code and aoutput.

This should probably be simplified to automated tests for delete-
process, not involving gnus and imap.

Adrian


(defun imap-close (&optional buffer)
  "Close connection to server in BUFFER.
If BUFFER is nil, the current buffer is used."
  (with-current-buffer (or buffer (current-buffer))
    (message "in imap-close (1) before eb: buffer: %s, cb: %s" buffer 
(current-buffer))
    (when (imap-opened)
      (condition-case nil
	  (imap-send-command-wait "LOGOUT")
	(quit nil)))
    (message "in imap-close (2) before eb: buffer: %s, cb: %s" buffer 
(current-buffer))
    (when (and imap-process
	       (memq (process-status imap-process) '(open run)))
    (message "in imap-close (4) before eb: buffer: %s, cb: %s" buffer 
(current-buffer))
      (delete-process imap-process)
    (message "in imap-close (5) before eb: buffer: %s, cb: %s" buffer 
(current-buffer))
)
    (setq imap-current-mailbox nil
	  imap-current-message nil
	  imap-process nil)
    (message "in imap-close (3) before eb: buffer: %s, cb: %s" buffer 
(current-buffer))
    (erase-buffer)
    t))

Recent minibuffer messages (most recent first):

in imap-close (3) before eb: buffer:  *imap source*<6>, cb: *Group*
in imap-close (5) before eb: buffer:  *imap source*<6>, cb: *Group*
in imap-close (4) before eb: buffer:  *imap source*<6>, cb:  *imap 
source*<6>
in imap-close (2) before eb: buffer:  *imap source*<6>, cb:  *imap 
source*<6>
in imap-close (1) before eb: buffer:  *imap source*<6>, cb:  *imap 
source*<6>
History
Date User Action Args
2013-12-02 12:14:23stephensetfiles: - neli14.html
2013-10-17 17:27:57economicseries8setfiles: + neli14.html
2009-12-12 14:41:03adriancreate