From: Jean Louis <bugs@gnu.support>
To: Drew Adams <drew.adams@oracle.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: [External] : Tip: Debugging with function `message-box'
Date: Thu, 24 Jun 2021 22:31:25 +0300 [thread overview]
Message-ID: <YNTdjZ/Zb5H15ewg@protected.localdomain> (raw)
In-Reply-To: <SA2PR10MB4474FAEA0EBB3BB7E8CA192BF3079@SA2PR10MB4474.namprd10.prod.outlook.com>
* Drew Adams <drew.adams@oracle.com> [2021-06-24 21:50]:
> > I find it often easier to debug values of some variables by using the
> > function `message-box' instead of just `message':
> >
> > (message-box "%s" "Hello")
> >
> > Unlike the function `message' this one blocks the execution for a
> > while, or until confirmed. This is useful in various debugging
> > processes.
>
> Sure. Some alternatives, just for info:
>
> To just pause so you can see the message (which gets
> logged to `*Messages*' anyway), you can use `sit-for'
> or `sleep-for'. E.g. `(message "...")(sleep-for 2)'.
>
> To block until confirmed, you can use `(debug)'.
> (`c' to just confirm.) And `(debug nil <whatever>)'
> prints the <whatever> at the top of the debugger
> (like a message).
Good tips.
When there is something wrong I am also using C-u C-M-x to instrument
the function then I can go step by step verifying what is happening.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2021-06-24 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 15:53 Tip: Debugging with function `message-box' Jean Louis
2021-06-24 18:49 ` [External] : " Drew Adams
2021-06-24 19:31 ` Jean Louis [this message]
2021-06-24 20:19 ` Drew Adams
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=YNTdjZ/Zb5H15ewg@protected.localdomain \
--to=bugs@gnu.support \
--cc=drew.adams@oracle.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).