From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday Reddy Newsgroups: gmane.emacs.devel Subject: Re: Emacs24 unpredictable behaviour [Was: coding system problems] Date: Sun, 2 Dec 2012 11:42:39 +0000 Message-ID: <20667.16047.781000.350998@gargle.gargle.HOWL> References: <20627.33570.796000.901596@gargle.gargle.HOWL> <20649.12724.125000.858979@gargle.gargle.HOWL> <83k3tizkl2.fsf@gnu.org> <20649.61758.750000.69012@gargle.gargle.HOWL> <20657.53134.989000.793074@gargle.gargle.HOWL> <874nkdrjhc.wl%%xmue@d1.dion.ne.jp> <20658.30817.183000.810770@gargle.gargle.HOWL> <831ufhz8pl.fsf@gnu.org> <20658.43946.898000.250218@gargle.gargle.HOWL> <83y5hpxc6y.fsf@gnu.org> <87zk24davy.wl%%xmue@d1.dion.ne.jp> <83txscxp21.fsf@gnu.org> <50B67F2A.4020803@gmail.com> <83y5hlul4e.fsf@gnu.org> <20664.37180.453000.739079@gargle.gargle.HOWL> <83624nus2j.fsf@gnu.org> <20666.42193.203000.238289@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354448589 11879 80.91.229.3 (2 Dec 2012 11:43:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2012 11:43:09 +0000 (UTC) Cc: Eli Zaretskii , monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Uday Reddy Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 02 12:43:21 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tf7x6-0005H1-5Z for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2012 12:43:16 +0100 Original-Received: from localhost ([::1]:46917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tf7wu-0008K2-KM for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2012 06:43:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tf7wr-0008Jr-7q for emacs-devel@gnu.org; Sun, 02 Dec 2012 06:43:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tf7wp-0000CX-PG for emacs-devel@gnu.org; Sun, 02 Dec 2012 06:43:01 -0500 Original-Received: from sun60.bham.ac.uk ([147.188.128.137]:34293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tf7wp-0000CS-Ix; Sun, 02 Dec 2012 06:42:59 -0500 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun60.bham.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1Tf7wn-0004ko-Pb; Sun, 02 Dec 2012 11:42:57 +0000 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk (envelope-from ) with esmtp (Exim 4.72) id 1Tf7wn-0000wt-Fa using interface smart1.bham.ac.uk; Sun, 02 Dec 2012 11:42:57 +0000 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 1Tf7wn-00073W-MB; Sun, 02 Dec 2012 11:42:57 +0000 In-Reply-To: <20666.42193.203000.238289@gargle.gargle.HOWL> X-Mailer: VM 8.2.0b under 24.2.1 (i386-mingw-nt5.1.2600) X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 147.188.128.137 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155172 Archived-At: Uday Reddy writes: > Here is a sample piece of code that I inserted into the middle of VM, to > figure out how Emacs24 is behaving: > > (defun vm-test-retrieve (mm) > (save-current-buffer > (set-buffer (vm-buffer-of mm)) > (goto-char (vm-text-of mm)) > (debug nil (list (point) > (marker-position (vm-text-of mm)) > (= (point) (marker-position (vm-text-of mm))) > )) > (debug nil (= (point) (marker-position (vm-text-of mm)))) > )) > > Since goto-char is going to (vm-text-of mm), the first debug should > print two identical numbers and `t' for the comparison. However, here is an > instance where it doesn't: > > Debugger entered: ((99947 98744 nil)) > vm-test-retrieve([[# # nil # # #]...]) Following Andreas Schwab's prompt, I have changed the "debug" calls to "message". And, the misbehaviour of goto-char is still found: (102332 98744 nil) nil 98744 98744 t The third line is printed by the regular VM code, which is right after this call to `vm-test-retrieve'. Surprisingly, in that instance, goto-char works. From this point on, VM appears to work normally. The problem that causes buffer corruption happens earlier, which produced a trace like this: (104925 104925 t) t 104925 104925 t just before fetch 104925 just before insert 98778 The problem here is that between the "just before fetch" line and the "just before insert" line, the point changes. The message body gets inserted in the wrong place as a result. I have narrowed down this point change to a call to `auth-source-user-or-password' because, if I set `auth-sources' to nil, this point change is avoided. However, `auth-source-user-or-password' couldn't have guessed the position 98778 where another marker is pointing. So, the problem must be some marker code of Emacs. I suspect that if we can figure out why the `goto-char' above doesn't work, we might be closer to identifying the problem. Cheers, Uday