Subject: Re: bug#58311: Missing newline in *Messages* between evaluation result and error

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 06 Oct 2022 14:41:08 +0200

Felix Dietrich <[email-masked]> writes:

> Entries added to the “*Messages*” buffer by the following snippet are
> missing a newline between the evaluation result and the error log entry
> put there by “xfaces.c:merge_face_ref” using “xdisp.c:add_to_log”.
>
> #+begin_src emacs-lisp
>   (let ((buf (generate-new-buffer "*test*"))
>         (s (propertize "Hello World" 'face '(:foreground :invalid))))
>     (with-current-buffer buf
>       (insert s))
>     (display-buffer buf))
> #+end_src
>
> #+begin_example
> #<window 54 on *test*<2>>Invalid face attribute :foreground :invalid
> Invalid face attribute :foreground :invalid
> #+end_example

Hm.  Very odd.  The code just calls

		      add_to_log ("Invalid face attribute %S %S",
				  QCinherit, parent_face);

the normal way, and reading the code and poking at this a bit, it seems
like add_to_log should insert a newline before inserting the text, but I
may be misreading message_dolog -- it's pretty long.

Is it "immediately obvious" to somebody else what is happening here?