unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
To: Dima Kogan <emacs@dima.secretsauce.net>, emacs-devel@gnu.org
Subject: Re: How to debug a transient (message) bug
Date: Fri, 26 May 2023 21:05:21 +0200	[thread overview]
Message-ID: <5b8d7d9d-ae58-626d-05be-51e1329b5b57@vodafonemail.de> (raw)
In-Reply-To: <87a5xrh8no.fsf@secretsauce.net>

On 2023-05-26  08:43, Dima Kogan wrote:
 > I cannot figure out why, and I don't know how to debug it. I'd like to
 > trace some sort of message-transient-buffer-go-away event, but I don't
 > know what that is. This is 100% reproducible and 100% annoying, so I'd
 > like to fix it. Any debugging suggestions?

Messages go away when other messages are written - probably tramp 
interferes with the results you expect by overwriting them with empty or 
temporary text.  So a rather cheap (but uncertain) approach would be to 
trace function `message' with M-x trace-function message RET.

In buffer *trace-output* you should see the call for the message written 
by M-! and (probably) follow-up calls.

Switch off tracing with M-x untrace-all RET.

(Having said that I do not quite understand why the following example

(defun message-test ()
   (interactive)
   (message "bar")
   (with-temp-message
       (message "foo")))

in emacs/master -Q leaves "foo" in the message area and not "bar", but 
I'm kind of too lazy to follow up on that.)

HTH



  reply	other threads:[~2023-05-26 19:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  6:43 How to debug a transient (message) bug Dima Kogan
2023-05-26 19:05 ` Jens Schmidt [this message]
2023-05-26 19:11   ` Jens Schmidt
2023-05-27  8:04   ` Dima Kogan

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=5b8d7d9d-ae58-626d-05be-51e1329b5b57@vodafonemail.de \
    --to=jschmidt4gnu@vodafonemail.de \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@dima.secretsauce.net \
    /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 public inbox

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

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).