Re: Icons missing in ECB if started --daemon/emacsclient

Daniel Clemente <[email protected]> Fri, 08 May 2009 12:42:53 +0200
Newsgroups gmane.emacs.code-browser
Message-ID <[email protected]>

To reproduce the bug, do the following. I used: GNU Emacs 23.0.92.6 (i686-pc-linux-gnu, GTK+ Version 2.16.0) of 2009-04-27

1. Use a simple ~/.emacs which just loads CEDET+ECB, like the following:

(add-to-list 'load-path "~/.emacs.d/cedet-cvs/common")
(load-file "~/.emacs.d/cedet-cvs/common/cedet.el")
(semantic-load-enable-gaudy-code-helpers)

(add-to-list 'load-path "~/.emacs.d/ecb-snap/")
(require 'ecb-autoloads)
(require 'ecb)


2. Run from a terminal:
emacs  --daemon

3. Run from a terminal:
emacsclient -c

4. Use C-h v ecb-images-can-be-used RET. It is nil. It shouldn't because you're seeing it on a graphical window. 



The problem seems to be indeed in:

>
> (defconst ecb-images-can-be-used
>   (and (or (fboundp 'defimage)
>            (fboundp 'make-image-specifier))
>        (if (fboundp 'display-images-p)
>            (display-images-p)
>          window-system)))
>
>

  I tried on GNU/Linux:


emacs --batch --eval '(prin1 (display-images-p))'
I get: nil

emacs  --batch --eval "(prin1 (fboundp 'display-images-p))"
I get:  t

  Therefore, ecb-images-can-be-used ends up with (and t nil) = nil



  Maybe it should init this variable when ecb is activated, not when the code is loaded.



-- Daniel


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com