unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Different behaviour while debugging?
Date: Sat, 23 Feb 2013 10:07:22 +0100	[thread overview]
Message-ID: <8738wns8j9.fsf@gmail.com> (raw)
In-Reply-To: 5127BF5D.2060402@easy-emacs.de

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

>> 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.
>
> IMHO that's possible, for example if some function expects faces, which are only there if
> fontification is done

At the surface of my application program, there are no faces involved,
its about recognizing if there is a comment on a line with
'comment-on-line-p', which calls 'comment-search-forward', which
searches for 'comment-start-skip'. 

Since, when in html-mode, the following condition-case (inside a 'cond
structure) is never entered in normal execution but is correctly entered
when (e)debugging, I would guess the 'comment-on-line-p' makes the
difference. 

         ,---------------------------------------------------
         | ((and
         |   (save-excursion
         |     (not (eq (comment-on-line-p) (point-at-bol))))
         |   last-line-comment-p) ...)
         `---------------------------------------------------

And, actually, if I edebug 'comment-search-forward', things work as
expected, just like when I edebug my own function that contains the
above condition-case. 

> try some (sit-for) then

ok - thanks for the tip. 

-- 
cheers,
Thorsten




  reply	other threads:[~2013-02-23  9:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-02-23 11:35     ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738wns8j9.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).