From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.bugs Subject: bug#5924: 23.1; accept-process-output switching current-buffer Date: Mon, 24 May 2010 01:07:53 +0100 Message-ID: <19449.50009.338000.183687@gargle.gargle.HOWL> References: <84mxxbknma.fsf@cs.bham.ac.uk> <19393.48894.735000.238546@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274660846 15293 80.91.229.12 (24 May 2010 00:27:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 May 2010 00:27:26 +0000 (UTC) Cc: Uday S Reddy , 5924@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 24 02:27:24 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OGLVq-00077Z-77 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 May 2010 02:27:22 +0200 Original-Received: from localhost ([127.0.0.1]:50837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGLVp-0008Bc-BO for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 May 2010 20:27:21 -0400 Original-Received: from [140.186.70.92] (port=39604 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGLVi-00089A-BP for bug-gnu-emacs@gnu.org; Sun, 23 May 2010 20:27:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGLVf-00020M-UO for bug-gnu-emacs@gnu.org; Sun, 23 May 2010 20:27:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51833) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGLVf-00020D-Sg for bug-gnu-emacs@gnu.org; Sun, 23 May 2010 20:27:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OGLD8-0003Yh-I5; Sun, 23 May 2010 20:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Uday S Reddy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 May 2010 00:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5924 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5924-submit@debbugs.gnu.org id=B5924.127465967613673 (code B ref 5924); Mon, 24 May 2010 00:08:02 +0000 Original-Received: (at 5924) by debbugs.gnu.org; 24 May 2010 00:07:56 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGLD2-0003YU-5h for submit@debbugs.gnu.org; Sun, 23 May 2010 20:07:56 -0400 Original-Received: from sun60.bham.ac.uk ([147.188.128.137]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGLD0-0003YP-Kc for 5924@debbugs.gnu.org; Sun, 23 May 2010 20:07:55 -0400 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun60.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1OGLCv-0002Ci-Nv; Mon, 24 May 2010 01:07:49 +0100 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1OGLCv-0007aJ-E0; Mon, 24 May 2010 01:07:49 +0100 Original-Received: from gromit.cs.bham.ac.uk ([147.188.193.16] helo=MARUTI.cs.bham.ac.uk) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1OGLCv-0003AQ-Ma; Mon, 24 May 2010 01:07:49 +0100 In-Reply-To: X-Mailer: VM 8.1.90a under 23.2.1 (i386-mingw-nt5.1.2600) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 23 May 2010 20:08:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37218 Archived-At: Dear Stefan, I have now tried this with the Windows build that was published today: emacs-20100523. The same problem occurs. (Of course, there was no reason to expect that anything would be different.) Even though I am able to protect the spurious buffer-change inside VM using my wrapper for accept-process-output, I can't do anything if some other process is invoked and the VM process interferes with it. This is now regularly occurring with smtpmail. In the middle of smtpmail, the buffer is changing to VM's IMAP process buffer (invoked for an FCC to an IMAP folder), and smtpmail fails. Sometimes the smtp has gone through and sometimes it hasn't. This is getting to be an annoyance. I am repeating my previous message again below, because it got MIME-encoded in a strange way last time: ---- Here is my current proxy for accept-process-output: (defsubst vm-accept-process-output (process) "Accept output from PROCESS. The variable `vm-imap-server-timeout' specifies how many seconds to wait before timing out. If a timeout occurs, typically VM cannot proceed." ;; protect against possible buffer change due to bug in Emacs (let ((buf (current-buffer)) (got-output (accept-process-output process vm-imap-server-timeout))) (if got-output (when (not (equal (current-buffer) buf)) (if (string-lessp "24" emacs-version) ;; the Emacs bug should have been fixed (message "Emacs process output error: Buffer changed to %s" (current-buffer))) ;; recover from the bug (set-buffer buf)) (vm-imap-protocol-error "No response from the IMAP server")))) and the error came up pretty much the first time I tried it: Emacs process output error: Buffer changed to saved IMAP mailhost.c 10:31:09 The current-buffer should have been "IMAP mailhost.c 10:31.40". But it switched to the "IMAP mailhost.c 10:31:09" (call it the "old buffer") because its process sent some output. I am attaching the contents of the old buffer. I think the last line would have been output while the current accept-process-output was done. (Note that this line came in a few seconds after the current process got started.) ----- starting IMAP session Thu May 20 10:31:09 2010 connecting to mailhost.cs.bham.ac.uk:143 connected for fetch * OK IMAP4 Ready imap 0001cdf3 VM CAPABILITY * CAPABILITY IMAP4 IMAP4REV1 VM OK CAPABILITY VM LOGIN VM OK Logged in. VM SELECT "INBOX" * FLAGS (\Answered \Flagged \Deleted \Seen \Draft forwarded filed redistributed ! $Forwarded 7350 7354 7391 signed * accept action plagiarism Junk NonJunk !@) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft forwarded filed redistributed ! $Forwarded 7350 7354 7391 signed * accept action plagiarism Junk NonJunk !@ \*)] Flags permitted. * 2648 EXISTS * 0 RECENT * OK [UIDVALIDITY 1217243146] UIDs valid * OK [UIDNEXT 26600] Predicted next UID VM OK [READ-WRITE] Select completed. VM UID FETCH 26471:26471 (RFC822.SIZE) * 2594 FETCH (RFC822.SIZE 58175 UID 26471) VM OK Fetch completed. VM UID FETCH 26471:26471 (BODY.PEEK[]) * 2594 FETCH (UID 26471 BODY[] {58175} ) VM OK Fetch completed. VM NOOP VM OK NOOP completed. VM UID FETCH 26582:26582 (RFC822.SIZE) * 2638 FETCH (RFC822.SIZE 2181 UID 26582) VM OK Fetch completed. VM UID FETCH 26582:26582 (BODY.PEEK[]) * 2638 FETCH (UID 26582 BODY[] {2181} ) VM OK Fetch completed. VM NOOP VM OK NOOP completed. VM UID FETCH 26471:26471 (RFC822.SIZE) * 2594 FETCH (RFC822.SIZE 58175 UID 26471) VM OK Fetch completed. VM UID FETCH 26471:26471 (BODY.PEEK[]) * 2594 FETCH (UID 26471 BODY[] {58175} ) VM OK Fetch completed. VM NOOP VM OK NOOP completed. VM UID FETCH 26578:26578 (RFC822.SIZE) * 2635 FETCH (RFC822.SIZE 52388 UID 26578) VM OK Fetch completed. VM UID FETCH 26578:26578 (BODY.PEEK[]) * 2635 FETCH (UID 26578 BODY[] {52388} ) VM OK Fetch completed. VM LOGOUT * BYE Logging out VM OK Logout completed. Process IMAP<2> connection broken by remote peer ending IMAP session Thu May 20 10:31:43 2010 --- Cheers, Uday