unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
@ 2014-01-28  2:49 Darren Hoo
  2014-01-28  2:54 ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Darren Hoo @ 2014-01-28  2:49 UTC (permalink / raw)
  To: 16574

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

open /Applications/Emacs.app --args -q

the emacs icon on the fancy splash screen (*GNU Emacs*) is missing, try to
increase the frame size a little bit then press `c-h c-a', the icon is back,
however if decrease the frame size to some size less or equal to the initial
startup size and press `c-h c-a' the icon is lost again.



In GNU Emacs 24.3.50.79 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
 of 2014-01-28 on darren-rmbp
Repository revision: 116181 rgm@gnu.org-20140128014902-1z6jns5bv3qnug09
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-h C-a <help-echo> C-h C-a <help-echo> <down-mouse-1>
<mouse-1> C-h C-a <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <help-echo> <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> M-x r e p o r t
<tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
byte-code: Beginning of buffer [38 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

[-- Attachment #2: Type: text/html, Size: 4221 bytes --]

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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-28  2:49 bug#16574: 24.3.50; icon not shown on the splash screen (mac osx) Darren Hoo
@ 2014-01-28  2:54 ` Glenn Morris
  2014-01-28  4:54   ` Darren Hoo
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-01-28  2:54 UTC (permalink / raw)
  To: Darren Hoo; +Cc: 16574

Darren Hoo wrote:

> open /Applications/Emacs.app --args -q
>
> the emacs icon on the fancy splash screen (*GNU Emacs*) is missing, try to
> increase the frame size a little bit then press `c-h c-a', the icon is back,
> however if decrease the frame size to some size less or equal to the initial
> startup size and press `c-h c-a' the icon is lost again.

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.





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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-28  2:54 ` Glenn Morris
@ 2014-01-28  4:54   ` Darren Hoo
  2014-01-28 15:50     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Darren Hoo @ 2014-01-28  4:54 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16574

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

On Tue, Jan 28, 2014 at 10:54 AM, Glenn Morris <rgm@gnu.org> wrote:

> Darren Hoo wrote:
>
> > open /Applications/Emacs.app --args -q
> >
> > the emacs icon on the fancy splash screen (*GNU Emacs*) is missing, try
> to
> > increase the frame size a little bit then press `c-h c-a', the icon is
> back,
> > however if decrease the frame size to some size less or equal to the
> initial
> > startup size and press `c-h c-a' the icon is lost again.
>
> 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.

[-- Attachment #2: Type: text/html, Size: 1989 bytes --]

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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-28  4:54   ` Darren Hoo
@ 2014-01-28 15:50     ` Eli Zaretskii
  2014-01-28 23:52       ` Darren Hoo
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2014-01-28 15:50 UTC (permalink / raw)
  To: Darren Hoo; +Cc: 16574

> Date: Tue, 28 Jan 2014 12:54:46 +0800
> From: Darren Hoo <darren.hoo@gmail.com>
> 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?  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
use-fancy-splash-screens-p is right.  (On my system, the window is 528
pixel high, which is indeed greater than 217 + 304.)





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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-28 15:50     ` Eli Zaretskii
@ 2014-01-28 23:52       ` Darren Hoo
  2014-01-29  3:45         ` Eli Zaretskii
  2014-01-31  2:01         ` Glenn Morris
  0 siblings, 2 replies; 8+ messages in thread
From: Darren Hoo @ 2014-01-28 23:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 16574

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

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

[-- Attachment #2: Type: text/html, Size: 13545 bytes --]

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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-28 23:52       ` Darren Hoo
@ 2014-01-29  3:45         ` Eli Zaretskii
  2014-01-31  2:01         ` Glenn Morris
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2014-01-29  3:45 UTC (permalink / raw)
  To: Darren Hoo; +Cc: 16574

> Date: Wed, 29 Jan 2014 07:52:11 +0800
> From: Darren Hoo <darren.hoo@gmail.com>
> Cc: Glenn Morris <rgm@gnu.org>, 16574@debbugs.gnu.org
> 
> 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).

Ah, that was important information.  Yes, I guess
use-fancy-splash-screens-p should do the same as fancy-splash-head to
determine which image will be displayed.





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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-28 23:52       ` Darren Hoo
  2014-01-29  3:45         ` Eli Zaretskii
@ 2014-01-31  2:01         ` Glenn Morris
  2014-01-31  3:25           ` Darren Hoo
  1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-01-31  2:01 UTC (permalink / raw)
  To: Darren Hoo; +Cc: 16574


Thank, applied.

The whitespace in your patch was severely messed up, to the extent of
extra blank lines all over the place. Please try to figure out why that
happened to avoid it in future.


This raises the question of why some of the versions of the splash image
have slightly different appearance / image dimensions.

png and svg are (almost) the same, as are pbm and xpm.

I did "convert -background transparent splash.png splash2.xpm", and the
result looked better to my untrained eye than the current splash.xpm
does, apart from some edge effects.

Perhaps someone would like to try re-making the xpm and pbm versions
so that they are closer to the other versions.





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

* bug#16574: 24.3.50; icon not shown on the splash screen (mac osx)
  2014-01-31  2:01         ` Glenn Morris
@ 2014-01-31  3:25           ` Darren Hoo
  0 siblings, 0 replies; 8+ messages in thread
From: Darren Hoo @ 2014-01-31  3:25 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16574

Glenn Morris <rgm@gnu.org> writes:

>
> The whitespace in your patch was severely messed up, to the extent of
> extra blank lines all over the place. Please try to figure out why that
> happened to avoid it in future.
>

Sorry for that. Most of the time I just use Gnus, I used gmail web
interface once and it just screwed me up.





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

end of thread, other threads:[~2014-01-31  3:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28  2:49 bug#16574: 24.3.50; icon not shown on the splash screen (mac osx) Darren Hoo
2014-01-28  2:54 ` Glenn Morris
2014-01-28  4:54   ` Darren Hoo
2014-01-28 15:50     ` Eli Zaretskii
2014-01-28 23:52       ` Darren Hoo
2014-01-29  3:45         ` Eli Zaretskii
2014-01-31  2:01         ` Glenn Morris
2014-01-31  3:25           ` Darren Hoo

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