From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Darren Hoo Newsgroups: gmane.emacs.bugs Subject: bug#16574: 24.3.50; icon not shown on the splash screen (mac osx) Date: Wed, 29 Jan 2014 07:52:11 +0800 Message-ID: References: <83ppnc85rc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bfcf01651c67504f11083d3 X-Trace: ger.gmane.org 1390953192 11578 80.91.229.3 (28 Jan 2014 23:53:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2014 23:53:12 +0000 (UTC) Cc: 16574@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 29 00:53:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8ISz-0002Wy-0m for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jan 2014 00:53:17 +0100 Original-Received: from localhost ([::1]:39941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8ISy-00087B-Gy for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 18:53:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8ISp-000872-Ty for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 18:53:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8ISl-0006iE-1n for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 18:53:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8ISk-0006i6-Ue for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 18:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W8ISk-0000zV-BS for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 18:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Darren Hoo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 23:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16574 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16574-submit@debbugs.gnu.org id=B16574.13909531383754 (code B ref 16574); Tue, 28 Jan 2014 23:53:02 +0000 Original-Received: (at 16574) by debbugs.gnu.org; 28 Jan 2014 23:52:18 +0000 Original-Received: from localhost ([127.0.0.1]:39652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8IS1-0000yT-Cx for submit@debbugs.gnu.org; Tue, 28 Jan 2014 18:52:18 -0500 Original-Received: from mail-wg0-f41.google.com ([74.125.82.41]:46274) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8IRx-0000yE-7N for 16574@debbugs.gnu.org; Tue, 28 Jan 2014 18:52:14 -0500 Original-Received: by mail-wg0-f41.google.com with SMTP id n12so7053330wgh.0 for <16574@debbugs.gnu.org>; Tue, 28 Jan 2014 15:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wSvagDRgH7IkTVBVgUvj8GKMzFCmCW3aykbgfYW08Gc=; b=Otrpd7IjhpH6CyluFBl7KoF5k9lxZgFxAlw3gCsUqx8fWB5QToeC7v8+xPCxE7nkUZ 3wiODZBUEY26+0Il/yqdzODxaO2PXFFrgSqbBPp1ZiL1/yS46tU77TsHBKwg0WbZU3Wn cJ4mJf7V7H923onrpvaiBEc3ujM0VgSgzrGKf8FatUoNdhxXaHKkrUXexq4JtZCA8iN2 jW2JIhLjgn+b6uSY16AI81km3hSmLoq4cocQMafcYO8WMye2b41XPvupqwXRivaku5om ZqIDI5keVOsM8wds2WKK+YUBNx1fPTvzS2Ld3RXun1J+cKGjhHwoK/LnpmOJpuCLgF5i 9+SQ== X-Received: by 10.194.76.134 with SMTP id k6mr2724511wjw.32.1390953131785; Tue, 28 Jan 2014 15:52:11 -0800 (PST) Original-Received: by 10.194.104.231 with HTTP; Tue, 28 Jan 2014 15:52:11 -0800 (PST) In-Reply-To: <83ppnc85rc.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84198 Archived-At: --047d7bfcf01651c67504f11083d3 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jan 28, 2014 at 11:50 PM, Eli Zaretskii wrote: > > Date: Tue, 28 Jan 2014 12:54:46 +0800 > > From: Darren Hoo > > Cc: 16574@debbugs.gnu.org > > > > > I don't think this is a bug, and AFAIK it has been like this for some > time. > > > The image is not shown if the frame seems to be too small. > > > See use-fancy-splash-screens-p. > > > > > > > OK, I see. > > Though use-fancy-splash-screens-p is not strictly correct on this. > > If I force it to use splash screen: > > > > (defun use-fancy-splash-screens-p () t) > > > > And examine these values of the splash screen on the initial startup > > frame: > > > > (window-pixel-height) > > => 476 > > > > (cdr (window-text-pixel-size > > (selected-window) nil nil nil nil t)) ; include mode-line > > => 462 > > > > it has plenty room for display. > > How do you deduce that this is enough? I can see that on my system the splash screen fits the frame quite well in one page. window-text-pixel-size (462) above returns the height of the text displayed, that counts the height of the splash image and the window-pixel-height is 476 > 462, both inludes the height of the modeline. > splash.xpm needs 217 pixels on > my system, and use-fancy-splash-screens-p reserves 19 more lines for > text, which on my system need 19 x 16 = 304 more pixels. The sum is > greater than either 462 or 476, so it sounds to me like Which splash file on your system is actually used for display? The problem is that use-fancy-splash-screens-p uses splash.xpm to determine the image height which is 217 pixel high, while on my system splash.png (188 pixel high) is actually used (since it's more fancier than the xpm one). I think it's better for use-fancy-splash-screens-p and fancy-splash-head to use the same file: === modified file 'lisp/startup.el' --- lisp/startup.el 2014-01-01 07:43:34 +0000 +++ lisp/startup.el 2014-01-28 23:09:37 +0000 @@ -1590,24 +1590,28 @@ (declare-function image-size "image.c" (spec &optional pixels frame)) + +(defun fancy-splash-file () + (cond ((stringp fancy-splash-image) + fancy-splash-image) + ((display-color-p) + (cond ((<= (display-planes) 8) + (if (image-type-available-p 'xpm) + "splash.xpm" + "splash.pbm")) + ((or (image-type-available-p 'svg) + (image-type-available-p 'imagemagick)) + "splash.svg") + ((image-type-available-p 'png) + "splash.png") + ((image-type-available-p 'xpm) + "splash.xpm") + (t "splash.pbm"))) + (t "splash.pbm"))) + (defun fancy-splash-head () "Insert the head part of the splash screen into the current buffer." - (let* ((image-file (cond ((stringp fancy-splash-image) - fancy-splash-image) - ((display-color-p) - (cond ((<= (display-planes) 8) - (if (image-type-available-p 'xpm) - "splash.xpm" - "splash.pbm")) - ((or (image-type-available-p 'svg) - (image-type-available-p 'imagemagick)) - "splash.svg") - ((image-type-available-p 'png) - "splash.png") - ((image-type-available-p 'xpm) - "splash.xpm") - (t "splash.pbm"))) - (t "splash.pbm"))) + (let* ((image-file (fancy-splash-file)) (img (create-image image-file)) (image-width (and img (car (image-size img)))) (window-width (window-width))) @@ -1805,22 +1809,16 @@ (defun use-fancy-splash-screens-p () "Return t if fancy splash screens should be used." - (when (and (display-graphic-p) - (or (and (display-color-p) - (image-type-available-p 'xpm)) - (image-type-available-p 'pbm))) - (let ((frame (fancy-splash-frame))) - (when frame - (let* ((img (create-image (or fancy-splash-image - (if (and (display-color-p) - (image-type-available-p 'xpm)) - "splash.xpm" "splash.pbm")))) - (image-height (and img (cdr (image-size img nil frame)))) - ;; We test frame-height so that, if the frame is split - ;; by displaying a warning, that doesn't cause the normal - ;; splash screen to be used. - (frame-height (1- (frame-height frame)))) - (> frame-height (+ image-height 19))))))) + (and (display-graphic-p) + (let ((frame (fancy-splash-frame))) + (when frame + (let* ((img (create-image (fancy-splash-file))) + (image-height (and img (cdr (image-size img nil frame)))) + ;; We test frame-height so that, if the frame is split + ;; by displaying a warning, that doesn't cause the normal + ;; splash screen to be used. + (frame-height (1- (frame-height frame)))) + (> frame-height (+ image-height 19))))))) (defun normal-splash-screen (&optional startup concise) --047d7bfcf01651c67504f11083d3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Jan 28, 2014 at 11:50 PM, Eli Zaretskii <eliz@gnu.org= > wrote:
> Date: Tue, 28 Jan 2014 12:54:46 +0800
> From: Darren Hoo <darren.hoo@gmail.com>
> Cc: 16574@d= ebbugs.gnu.org
>
> > I don't think this is a bug, and AFAIK it has been like this = for some time.
> > The image is not shown if the frame seems to be too small.
> > See use-fancy-splash-screens-p.
> >
>
> OK, I see.
> Though use-fancy-splash-screens-p is not strictly correct on this.
> If =A0I force it to use splash screen:
>
> (defun use-fancy-splash-screens-p () t)
>
> And examine these values of the splash screen on the initial startup > frame:
>
> (window-pixel-height)
> =A0=3D> 476
>
> (cdr (window-text-pixel-size
> =A0 =A0 =A0 (selected-window) nil nil nil nil t)) ; include mode-line<= br> > =A0=3D> 462
>
> it has plenty room for display.

How do you deduce that this is enough? =A0

I can see that on my system the splash screen fits the frame quite we= ll
in one page.=A0

window-text-pixel-siz= e (462) above returns the height of the text displayed,=A0
that counts the height of the splash image and the window-pixel-height=
is 476 > 462, both inludes the height of the modeline.
<= div>=A0
splash.xpm needs 217 pixels on
my system, and use-fancy-splash-screens-p reserves 19 more lines for
text, which on my system need 19 x 16 =3D 304 more pixels. =A0The sum is greater than either 462 or 476, so it sounds to me like
Which =A0splash file on your system is actually used for displ= ay?

The problem is that use-fancy-splash-scre= ens-p uses splash.xpm to=A0
determine the image height which =A0is 217 pixel high, while on my sys= tem =A0
splash.png (188 pixel high) is actually =A0used (since it= 's more fancier=A0
than the xpm one).

I think it's better for=A0=A0= use-fancy-splash-screens-p=A0and=A0fancy-splash-head= =A0
to=A0use =A0th= e same file:=A0

=3D=3D=3D modified file 'lisp/startup.el'

--- lisp/startup.e= l 2014-01-01 07:43:34 +0000

+++ lisp/startup.e= l 2014-01-28 23:09:37 +0000

@@ -1590,24 +1590,= 28 @@

= =A0

=A0(declare-functi= on image-size "image.c" (spec &optional pixels frame))

= =A0

+

+(defun fancy-spla= sh-file ()

+=A0 (cond ((strin= gp fancy-splash-image)

+ fancy-splash-image)

+ ((display-color-p)

+ (cond ((<=3D (display-planes) 8)

+ (if (image-type-available-p 'xpm)

+ =A0 =A0 "splash.xpm"

+ =A0 "splash.pbm"))

+ =A0 =A0 =A0 ((or (image-type-available-p '= svg)

+ =A0 =A0 (image-type-available-p 'imagemagi= ck))

+ "splash.svg")

+ =A0 =A0 =A0 ((image-type-available-p 'png)=

+ "splash.png")

+ =A0 =A0 =A0 ((image-type-available-p 'xpm)=

+ "splash.xpm")

+ =A0 =A0 =A0 (t "splash.pbm")))

+ (t "splash.pbm")))

+

=A0(defun fancy-sp= lash-head ()

=A0=A0 "Inser= t the head part of the splash screen into the current buffer."

-=A0 (let* ((image= -file (cond ((stringp fancy-splash-image)

- =A0 =A0 fancy-splash-image)

- =A0 ((display-color-p)

- =A0 =A0 (cond ((<=3D (display-planes) 8)

- =A0 (if (image-type-available-p 'xpm)

- =A0 =A0 =A0 "splash.xpm"

- =A0 =A0 "splash.pbm"))

- =A0 ((or (image-type-available-p 'svg)

- =A0 =A0 =A0 (image-type-available-p 'im= agemagick))

- =A0 "splash.svg")

- =A0 ((image-type-available-p 'png)

- =A0 "splash.png")

- =A0 ((image-type-available-p 'xpm)

- =A0 "splash.xpm")

- =A0 (t "splash.pbm")))

- =A0 (t "splash.pbm")))

+=A0 (let* ((image= -file (fancy-splash-file))

=A0 (img (create-image image-file))

=A0 (image-width (and img (car (image-size img))= ))

=A0 (window-width (window-width)))

@@ -1805,22 +1809,= 16 @@

= =A0

=A0(defun use-fanc= y-splash-screens-p ()

=A0=A0 "Retur= n t if fancy splash screens should be used."

-=A0 (when (and (d= isplay-graphic-p)

- =A0 =A0 =A0 =A0 = =A0 =A0 (or (and (display-color-p)

- =A0 =A0 =A0 (image-type-available-p 'xpm))=

- =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 (image-type-available-p 'pbm)))

-=A0 =A0 (let ((fr= ame (fancy-splash-frame)))

-=A0 =A0 =A0 (when= frame

- (let* ((img (create-image (or fancy-splash-imag= e

- =A0 =A0 =A0 (if (and (display-color-p)

- =A0 =A0 =A0 (image-type-available-p 'x= pm))

- =A0 "splash.xpm" "splash.pbm= "))))

- =A0 =A0 =A0 (image-height (and img (cdr (image= -size img nil frame))))

- =A0 =A0 =A0 ;; We test frame-height so that, i= f the frame is split

- =A0 =A0 =A0 ;; by displaying a warning, that d= oesn't cause the normal

- =A0 =A0 =A0 ;; splash screen to be used.

- =A0 =A0 =A0 (frame-height (1- (frame-height fr= ame))))

- =A0 (> frame-height (+ image-height 19))))))= )

+=A0 (and (display= -graphic-p)

+ =A0 =A0 =A0 (let= ((frame (fancy-splash-frame)))

+ (when frame

+ =A0 (let* ((img (create-image (fancy-splash-fi= le)))

+ =A0 (image-height (and img (cdr (image-size im= g nil frame))))

+ =A0 ;; We test frame-height so that, if the fr= ame is split

+ =A0 ;; by displaying a warning, that doesn'= ;t cause the normal

+ =A0 ;; splash screen to be used.

+ =A0 (frame-height (1- (frame-height frame))))<= /p>

+ =A0 =A0 (> frame-height (+ image-height 19)= ))))))

= =A0

= =A0

=A0(defun normal-s= plash-screen (&optional startup concise)


=
--047d7bfcf01651c67504f11083d3--