unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Different behaviour while debugging?
@ 2013-02-20 14:57 Thorsten Jolitz
  2013-02-20 15:08 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Thorsten Jolitz @ 2013-02-20 14:57 UTC (permalink / raw)
  To: help-gnu-emacs


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





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-02-23 11:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 14:57 Different behaviour while debugging? Thorsten Jolitz
2013-02-20 15:08 ` Drew Adams
2013-02-20 15:45   ` Thorsten Jolitz
2013-02-20 16:25     ` Drew Adams
2013-02-20 16:50       ` Thorsten Jolitz
2013-02-20 15:56 ` Stefan Monnier
2013-02-20 16:31   ` Thorsten Jolitz
2013-02-22 14:06     ` Stefan Monnier
2013-02-22 17:44       ` Thorsten Jolitz
2013-02-22 18:56 ` Andreas Röhler
2013-02-23  9:07   ` Thorsten Jolitz
2013-02-23 11:35     ` Andreas Röhler

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 read-only IMAP folder(s) and NNTP newsgroup(s).