* How to show *Warnings* buffer at startup time?
@ 2009-03-18 13:22 Kenichi Handa
2009-03-18 13:28 ` Lennart Borgman
0 siblings, 1 reply; 3+ messages in thread
From: Kenichi Handa @ 2009-03-18 13:22 UTC (permalink / raw)
To: emacs-devel
I'm going to change create-fontset-from-x-resource
(fontset.el) as this:
@@ -1049,8 +1058,11 @@
(while (setq fontset-spec (x-get-resource (format "fontset-%d" idx)
(format "Fontset-%d" idx)))
(condition-case nil
- (create-fontset-from-fontset-spec fontset-spec t 'noerror)
- (error (message "Fontset-%d: invalid specification in X resource" idx)))
+ (create-fontset-from-fontset-spec fontset-spec t)
+ (error (display-warning
+ 'initialization
+ (format "Fontset-%d: invalid specification in X resource" idx)
+ :warning)))
(setq idx (1+ idx)))))
;;
But the *Warnings* buffer doesn't show up at startup time
even if create-fontset-from-fontset-spec causes an error.
Could someone tell me what is wrong with the above change?
If it is because the X frame is not yet created at that
time, don't we need something like the attached patch?
---
Kenichi Handa
handa@m17n.org
--- startup.el.~1.527.~ 2009-02-23 09:51:02.000000000 +0900
+++ startup.el 2009-03-18 22:16:35.000000000 +0900
@@ -1235,7 +1235,13 @@
(if (and (boundp 'x-session-previous-id)
(stringp x-session-previous-id))
(with-no-warnings
- (emacs-session-restore x-session-previous-id))))
+ (emacs-session-restore x-session-previous-id)))
+
+ (let ((warning-buf (get-buffer "*Warnings*")))
+ (if (and warning-buf
+ (not (get-buffer-window warning-buf))
+ (> (buffer-size warning-buf) 0))
+ (display-buffer warning-buf))))
(defcustom initial-scratch-message (purecopy "\
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to show *Warnings* buffer at startup time?
2009-03-18 13:22 How to show *Warnings* buffer at startup time? Kenichi Handa
@ 2009-03-18 13:28 ` Lennart Borgman
2009-03-19 0:39 ` Kenichi Handa
0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2009-03-18 13:28 UTC (permalink / raw)
To: Kenichi Handa; +Cc: emacs-devel
On Wed, Mar 18, 2009 at 2:22 PM, Kenichi Handa <handa@m17n.org> wrote:
> I'm going to change create-fontset-from-x-resource
> (fontset.el) as this:
>
> @@ -1049,8 +1058,11 @@
> (while (setq fontset-spec (x-get-resource (format "fontset-%d" idx)
> (format "Fontset-%d" idx)))
> (condition-case nil
> - (create-fontset-from-fontset-spec fontset-spec t 'noerror)
> - (error (message "Fontset-%d: invalid specification in X resource" idx)))
> + (create-fontset-from-fontset-spec fontset-spec t)
> + (error (display-warning
> + 'initialization
> + (format "Fontset-%d: invalid specification in X resource" idx)
> + :warning)))
> (setq idx (1+ idx)))))
>
> ;;
>
> But the *Warnings* buffer doesn't show up at startup time
> even if create-fontset-from-fontset-spec causes an error.
> Could someone tell me what is wrong with the above change?
Could it be that something later closes the window that shows the
*Warnings* buffer?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to show *Warnings* buffer at startup time?
2009-03-18 13:28 ` Lennart Borgman
@ 2009-03-19 0:39 ` Kenichi Handa
0 siblings, 0 replies; 3+ messages in thread
From: Kenichi Handa @ 2009-03-19 0:39 UTC (permalink / raw)
To: Lennart Borgman; +Cc: emacs-devel
In article <e01d8a50903180628o3ff53835rd3e19745492241b0@mail.gmail.com>, Lennart Borgman <lennart.borgman@gmail.com> writes:
> > But the *Warnings* buffer doesn't show up at startup time
> > even if create-fontset-from-fontset-spec causes an error.
> > Could someone tell me what is wrong with the above change?
> Could it be that something later closes the window that shows the
> *Warnings* buffer?
Perhaps. I found this code in command-line.
;; Under X Window, this creates the X frame and deletes the terminal frame.
(unless (daemonp)
(frame-initialize))
So, it seems that the window showing *Warnings* in the
initial terminal frame before the above code is deleted, and
the new X frame doesn't have a window showing *Warnings*.
---
Kenichi Handa
handa@m17n.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-19 0:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 13:22 How to show *Warnings* buffer at startup time? Kenichi Handa
2009-03-18 13:28 ` Lennart Borgman
2009-03-19 0:39 ` Kenichi Handa
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.