all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Eric S. Raymond" <esr@thyrsus.com>,  emacs-devel@gnu.org
Subject: Re: Insight into the mystery hangs
Date: Tue, 13 Feb 2024 08:52:06 +0100	[thread overview]
Message-ID: <871q9gg5sp.fsf@gmail.com> (raw)
In-Reply-To: <868r3psv2s.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 12 Feb 2024 14:52:59 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Eric S. Raymond" <esr@thyrsus.com>
>> Date: Sun, 11 Feb 2024 16:37:37 -0500 (EST)
>> 
>> However.  Emacs is not entirely off the hook here.  When I'm not under
>> deadline pressure I will file a bug with a title something like
>> "With debug-on-quit enabled, Emacs does not reliably raise a debug
>> trace on interrupt of call-process"
>
> Isn't that call issued from the mode-line display?  If so, that is
> done from redisplay, and redisplay cannot enter debugger, so it
> catches all errors.  If you want to produce Lisp backtraces from Lisp
> code called by redisplay, you need to use the facilities documented in
> the node "Debugging Redisplay" in the ELisp Reference manual.

Tangential, not so much about debugging errors during redisplay, than
merely noticing them: I do periodically forget that these errors are
caught, so every couple of months I find myself frowning at code
(font-locking, usually) that misbehaves yet fails to throw an error for
about five minutes, before remembering to check *Messages* for any
"Error during redisplay".

Couple of questions:

1. "For Science", I just did…

    (setq mode-line-format '(:eval (error "argh")))

   … and I am surprised that this *Messages* diagnostic…

    > Error during redisplay: (eval (error "argh") t) signaled (error "argh")

   … never seems to make its way to the echo area?  It's a small thing
   (I'll probably have *Messages* open when debugging so I'll notice
   eventually) but it is somewhat surprising that these warnings can
   pile up in *Messages* yet the echo area remains blank.

2. It's neat that…

    (setq mode-line-format '("foo " (:eval (error "argh")) " bar"))

   … will be "robust" enough to display "foo bar" in the mode-line;
   combined with the lack of echo-area reporting it does make it hard to
   ever know something went wrong though.  Might it make sense to (have
   an option to) substitute a signaling :eval form with some "[redisplay
   error]" placeholder?



  parent reply	other threads:[~2024-02-13  7:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 21:37 Insight into the mystery hangs Eric S. Raymond
2024-02-12 12:38 ` Alan Mackenzie
2024-02-12 12:52 ` Eli Zaretskii
2024-02-12 18:26   ` Eric S. Raymond
2024-02-12 19:22     ` Eli Zaretskii
2024-02-13  7:52   ` Kévin Le Gouguec [this message]
2024-02-13 12:56     ` Eli Zaretskii
2024-02-13 23:05       ` Kévin Le Gouguec

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

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

  git send-email \
    --in-reply-to=871q9gg5sp.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esr@thyrsus.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.