unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problems with lwarn at startup
@ 2006-12-13  2:22 Lennart Borgman
  2006-12-13 22:02 ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Lennart Borgman @ 2006-12-13  2:22 UTC (permalink / raw)


If I add the code below to my .emacs and answer 'n' the splash screen 
does not go away. It changes form however to some text only form.

  (unless (y-or-n-p "Some question ")
    (lwarn '(test) :warning "Test warning"))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-13  2:22 Problems with lwarn at startup Lennart Borgman
@ 2006-12-13 22:02 ` Richard Stallman
  2006-12-13 23:59   ` Juanma Barranquero
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2006-12-13 22:02 UTC (permalink / raw)
  Cc: emacs-devel

    If I add the code below to my .emacs and answer 'n' the splash screen 
    does not go away. It changes form however to some text only form.

      (unless (y-or-n-p "Some question ")
	(lwarn '(test) :warning "Test warning"))

This is important to debug, since we're talking about using lwarn
during startup.  Would someone please fix it and ack?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-13 22:02 ` Richard Stallman
@ 2006-12-13 23:59   ` Juanma Barranquero
  2006-12-14  1:08     ` Lennart Borgman
  0 siblings, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2006-12-13 23:59 UTC (permalink / raw)
  Cc: Lennart Borgman, emacs-devel

On 12/13/06, Richard Stallman <rms@gnu.org> wrote:

> This is important to debug, since we're talking about using lwarn
> during startup.  Would someone please fix it and ack?

When Lennart answers "n", lwarn splits the frame into two windows
(using the lower one for the warning). startup.el contains a function
`use-fancy-splash-screens-p' which decides whether to use "fancy"
(graphic) or "normal" (text) splash screen according to several
criteria, among them the following:

 (> window-height (+ image-height 19))

If you try starting Emacs with the following .emacs.el:

;;;;;;;;;;;;;;;;; .emacs.el ;;;;;;;;;;;;;;;;;
(defun use-fancy-splash-screens-p () t)
(unless (y-or-n-p "Some question ")
   (lwarn '(test) :warning "Test warning"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

you won't see the "bug".

                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-13 23:59   ` Juanma Barranquero
@ 2006-12-14  1:08     ` Lennart Borgman
  2006-12-14 16:39       ` Juanma Barranquero
  2006-12-14 17:47       ` Richard Stallman
  0 siblings, 2 replies; 8+ messages in thread
From: Lennart Borgman @ 2006-12-14  1:08 UTC (permalink / raw)
  Cc: rms, emacs-devel

Juanma Barranquero wrote:
> On 12/13/06, Richard Stallman <rms@gnu.org> wrote:
>
>> This is important to debug, since we're talking about using lwarn
>> during startup.  Would someone please fix it and ack?
>
> When Lennart answers "n", lwarn splits the frame into two windows
> (using the lower one for the warning). startup.el contains a function
> `use-fancy-splash-screens-p' which decides whether to use "fancy"
> (graphic) or "normal" (text) splash screen according to several
> criteria, among them the following:
>
> (> window-height (+ image-height 19))
>
> If you try starting Emacs with the following .emacs.el:
>
> ;;;;;;;;;;;;;;;;; .emacs.el ;;;;;;;;;;;;;;;;;
> (defun use-fancy-splash-screens-p () t)
> (unless (y-or-n-p "Some question ")
>   (lwarn '(test) :warning "Test warning"))
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> you won't see the "bug".


Maybe use frame-height instead of window-height?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-14  1:08     ` Lennart Borgman
@ 2006-12-14 16:39       ` Juanma Barranquero
  2006-12-14 16:57         ` Lennart Borgman
  2006-12-14 17:47       ` Richard Stallman
  1 sibling, 1 reply; 8+ messages in thread
From: Juanma Barranquero @ 2006-12-14 16:39 UTC (permalink / raw)
  Cc: emacs-devel

On 12/14/06, Lennart Borgman <lennart.borgman.073@student.lu.se> wrote:

> Maybe use frame-height instead of window-height?

I think the intention is precisely *not* to show the fancy splash
screen in too small a window...

                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-14 16:39       ` Juanma Barranquero
@ 2006-12-14 16:57         ` Lennart Borgman
  2006-12-14 17:09           ` Juanma Barranquero
  0 siblings, 1 reply; 8+ messages in thread
From: Lennart Borgman @ 2006-12-14 16:57 UTC (permalink / raw)
  Cc: emacs-devel

Juanma Barranquero wrote:
> On 12/14/06, Lennart Borgman <lennart.borgman.073@student.lu.se> wrote:
>
>> Maybe use frame-height instead of window-height?
>
> I think the intention is precisely *not* to show the fancy splash
> screen in too small a window...

Yes, of course, but showing another splash screen just because of a 
warning makes it looks like everything could be wrong. It disturbs the 
users view and make the warning disappear from his/her perception I believe.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-14 16:57         ` Lennart Borgman
@ 2006-12-14 17:09           ` Juanma Barranquero
  0 siblings, 0 replies; 8+ messages in thread
From: Juanma Barranquero @ 2006-12-14 17:09 UTC (permalink / raw)
  Cc: emacs-devel

On 12/14/06, Lennart Borgman <lennart.borgman.073@student.lu.se> wrote:

> Yes, of course, but showing another splash screen just because of a
> warning makes it looks like everything could be wrong. It disturbs the
> users view and make the warning disappear from his/her perception I believe.

And it seems like Richard agrees with you ;-)

                    /L/e/k/t/u

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with lwarn at startup
  2006-12-14  1:08     ` Lennart Borgman
  2006-12-14 16:39       ` Juanma Barranquero
@ 2006-12-14 17:47       ` Richard Stallman
  1 sibling, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2006-12-14 17:47 UTC (permalink / raw)
  Cc: lekktu, emacs-devel

    Maybe use frame-height instead of window-height?

I did that.  Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-12-14 17:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-13  2:22 Problems with lwarn at startup Lennart Borgman
2006-12-13 22:02 ` Richard Stallman
2006-12-13 23:59   ` Juanma Barranquero
2006-12-14  1:08     ` Lennart Borgman
2006-12-14 16:39       ` Juanma Barranquero
2006-12-14 16:57         ` Lennart Borgman
2006-12-14 17:09           ` Juanma Barranquero
2006-12-14 17:47       ` Richard Stallman

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