pitkali / pos-tip

Show tooltip at point
37 stars 14 forks source link

Unexpected color behavior question #2

Closed grettke closed 10 years ago

grettke commented 10 years ago

Good afternoon,

Today I was learning how to use pos-tip.

Version info:

(message "Emacs version: %S" emacs-version)

Emacs version: "24.3.1"

Pos-tip version:

ls ~/.emacs.d/.cask/24.3.1/elpa | grep pos-tip

pos-tip-20140613.224

OS:

uname -a

Darwin orion 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

My goal was to customize the color of the popup itself like this:

(setq pos-tip-foreground-color "orange")
(setq pos-tip-background-color "violet")
(pos-tip-show "ALERT")

I was expecting orange on violet and got this instead [img], it is a popup with black on yellow which is the default.

Questions:

Love the package, by the way.

Kind regards,

gcr alert-colors

pitkali commented 10 years ago

I've only taken over this package recently, or so it seems, so it's hard for me to say what's going on without debugging. I will take a look, though, especially that handling the desired colour of the tooltip was the reason I originally created this fork in the first place.

pitkali commented 10 years ago

It works as expected on my Emacs 24.3.1 with mac-port compiled from railwaycat/emacs-mac-port. Are you using the standard ns port? Where did you get your emacs from?

pitkali commented 10 years ago

I checked with the NS port straight from emacs-24.3 branch of the original emacs source, and this seems to be a limitation of that port. Or its bug. If I try the following:

(x-show-tip (propertize "test" 'face '(:foreground "orange"
                                       :background "violet"
                                       :height 180))
            (selected-frame) '((foreground-color . "orange")
                               (background-color . "violet")))

which uses builtin x-show-tip directly (and that screws positioning), the tooltip still has not only default colours, but also system default tooltip size and font face. I could ask on the emacs-dev mailing list, if they would accept this as a bug, but I think that's as much as I'm willing to do. I'm not involved with sources of Emacs itself to be able to easily fix this, and it works on mac-port already.

Personally I recommend switching to mac-port, which is generally a more stable way of using Emacs on mac anyway. I originally switched because of some crashes I was getting from ns port when reacting to frame resizing events. There's https://github.com/railwaycat/homebrew-emacsmacport for easy installation using homebrew.

grettke commented 10 years ago

Hi Piotr,

Mine is

[gcr@:/Users/gcr/tmp]$ brew info emacs
emacs: stable 24.3, HEAD
http://www.gnu.org/software/emacs/
/usr/local/Cellar/emacs/24.3 (3909 files, 115M) *
  Built from source with: --cocoa, --srgb, --with-gnutls
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/emacs.rb
grettke commented 10 years ago

Understood, then I too will make the switch.

Good to know. I went with the standard 'emacs' formula since... it is "just Emacs" :).

I will verify what you and thus I expect in 2 hours from now.

grettke commented 10 years ago

This works correctly now.

Thank you.

dgutov commented 10 years ago

I could ask on the emacs-dev mailing list, if they would accept this as a bug, but I think that's as much as I'm willing to do.

Or you could just file a bug on the Emacs bug tracker. You might want to search it first, though.