From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Different behaviour while debugging? Date: Wed, 20 Feb 2013 15:57:01 +0100 Message-ID: <87mwuzkp8i.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361372267 2978 80.91.229.3 (20 Feb 2013 14:57:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2013 14:57:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 20 15:58:10 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1U8B7T-0008BC-Gq for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 15:58:03 +0100 Original-Received: from localhost ([::1]:33457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8B79-0002j7-E8 for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Feb 2013 09:57:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8B6t-0002hy-Cm for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 09:57:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8B6m-00067T-KQ for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 09:57:27 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:33521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8B6m-000676-BJ for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 09:57:20 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U8B71-0007pP-KM for help-gnu-emacs@gnu.org; Wed, 20 Feb 2013 15:57:35 +0100 Original-Received: from g231224144.adsl.alicedsl.de ([92.231.224.144]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Feb 2013 15:57:35 +0100 Original-Received: from tjolitz by g231224144.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Feb 2013 15:57:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231224144.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:Wd8SYHkegZjRLt9i4ErTFlKREkw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89182 Archived-At: Hi List, I have the very strange case that a program - in some special situation - does not work as expected, but when I instrument the relevant function(s) for edebug and single-step through them, everythings works as expected and the output is fine. There are no errors involved, so 'toggle-debug-on-error does not help. Its just that the program should put a buffer temporarily into a given major-mode and uncomment some comment-lines with 'uncomment-region' before turning-on Org-mode. With other modes it works fine, but in case of html-mode, this step is simply omitted when running the program as-is, but is successfully completed when single-stepping with edebug. How can that be? Has elisp become just *too* fast for correct program execution and programs work only reliably when slowed down by debugging? To be more precise, inserting 'message functions in the relevant program-function revealed that: 1. the function is entered 2. the buffer is in the expected (html) mode but inside the 'cond function in the while loop, the out-commented lines ("comline") are not recognized when run normally ,-------------------------------------- | Entering outorg-convert-to-org.... | html-mode | Entering while-loop ... | Entering codeline after codeline .... | Entering while-loop ... [2 times] | Entering codeline after codeline .... | Entering while-loop ... | Entering codeline after codeline .... | Entering while-loop ... [2 times] | Entering codeline after codeline .... `-------------------------------------- while they are recognized correctly when single-stepping with edebug ,------------------------------------------- | Edebug: outorg-convert-to-org | | Entering outorg-convert-to-org.... | html-mode | Entering while-loop ... | Entering comline after comline or bobp ... | Entering while-loop ... | Entering comline after comline or bobp ... | Entering while-loop ... | Entering comline after comline or bobp ... | Entering while-loop ... | Entering codeline after comline .... `------------------------------------------- Strange, isn't it? -- cheers, Thorsten