unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: nljlistbox2@gmail.com, 33654@debbugs.gnu.org
Subject: bug#33654: 27.0.50; No record of init file errors printed in *Messages*
Date: Sun, 09 Dec 2018 09:26:55 +0100	[thread overview]
Message-ID: <5C0CD1CF.7020305@gmx.at> (raw)
In-Reply-To: <83lg4z4yac.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

 > Maybe we could add something to window-setup-hook when we have delayed
 > warnings to display after startup?

I'd leave 'window-setup-hook' alone and do something similar to the
attached patch.  We could also try "(reusable-frames . visible)" there
which should put any frame already showing *Warnings* on top of the
others (at least here it does that), but not all window managers out
there might comply.

Here I neither use desktop nor multiple frames.  So please test the
patch with the originally posted desktop saved multiple frames setup.

Thanks, martin

[-- Attachment #2: startup.el.diff --]
[-- Type: text/plain, Size: 1403 bytes --]

diff --git a/lisp/startup.el b/lisp/startup.el
index a7b40b7..ad19934 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -708,7 +708,12 @@ normal-top-level
 	(if (fboundp 'font-menu-add-default)
 	    (font-menu-add-default))
 	(unless inhibit-startup-hooks
-	  (run-hooks 'window-setup-hook))))
+          ;; Display *Warnings* on selected frame if they happen to be
+          ;; shown elsewhere.
+          (let ((buffer (get-buffer "*Warnings*")))
+            (when (buffer-live-p buffer)
+              (display-buffer buffer '(nil (reusable-frames . nil)))))
+          (run-hooks 'window-setup-hook))))
     ;; Subprocesses of Emacs do not have direct access to the terminal, so
     ;; unless told otherwise they should only assume a dumb terminal.
     ;; We are careful to do it late (after term-setup-hook), although the
@@ -2584,6 +2589,12 @@ command-line-1
         (when (fboundp 'frame-notice-user-settings)
           (frame-notice-user-settings))
 
+        ;; Display *Warnings* on selected frame if they happen to be
+        ;; shown elsewhere.
+        (let ((buffer (get-buffer "*Warnings*")))
+          (when (buffer-live-p buffer)
+            (display-buffer buffer '(nil (reusable-frames . nil)))))
+
         ;; If there are no switches to process, we might as well
         ;; run this hook now, and there may be some need to do it
         ;; before doing any output.


  reply	other threads:[~2018-12-09  8:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  0:42 bug#33654: 27.0.50; No record of init file errors printed in *Messages* N. Jackson
2018-12-07  7:13 ` Eli Zaretskii
2018-12-07 17:08   ` N. Jackson
2018-12-08 10:46     ` Eli Zaretskii
2018-12-08 18:51       ` martin rudalics
2018-12-08 19:24         ` Eli Zaretskii
2018-12-09  8:26           ` martin rudalics [this message]
2020-10-11  1:54             ` Lars Ingebrigtsen
2021-05-11 13:49               ` Lars Ingebrigtsen

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=5C0CD1CF.7020305@gmx.at \
    --to=rudalics@gmx.at \
    --cc=33654@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=nljlistbox2@gmail.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 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).