unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa
@ 2015-11-30 12:35 Julien Wintz
  2015-12-04  6:46 ` Alex Dunn
  2017-04-23 19:40 ` Henrik Nyman
  0 siblings, 2 replies; 6+ messages in thread
From: Julien Wintz @ 2015-11-30 12:35 UTC (permalink / raw)
  To: 22060; +Cc: Julien Wintz

Hello,

I am using flycheck to display errors in various programing languages on
the fly. For a minimal setup reproducing the bug, I have run emacs -Q,
enabled flycheck in emacs-lisp-mode.

Fringe indicators are supposed to be displayed on the line of errors and
colored according to their type: error, warning or info, with a
dedicated face. For some reason, 25.1.50.1 chooses an arbitrary color (I
suspect the one of the first indicator encountered) and colors them all
with the same face.

Here are some relevant links with screenshots:

- https://github.com/flycheck/flycheck/issues/811
- https://github.com/Sarcasm/flycheck-irony/issues/13

How could I debug this ?

In GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.0.0, NS appkit-1404.13 Version 10.11.1 (Build 15B42))
 of 2015-11-20
Repository revision: 5c81fd58e32d965c2551663622e084f2800e1e90
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --prefix=/usr/local/Cellar/emacs/HEAD
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --with-xml2
 --without-dbus --without-gnutls --with-ns --disable-ns-self-contained'

Configured features:
JPEG ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  company-mode: t
  rainbow-delimiters-mode: t
  shell-dirtrack-mode: t
  projectile-global-mode: t
  projectile-mode: t
  global-git-gutter-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  global-hl-line-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  beacon-mode: t
  which-key-mode: t
  global-auto-revert-mode: t
  recentf-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading package helm-flycheck
Loading package helm-c-yasnippet
Loading package magit
Loading package git-gutter
Loading package git-gutter-fringe
Loading package projectile
Loading package helm-projectile
ad-handle-definition: ‘tramp-read-passwd’ got redefined
Turn on helm-projectile key bindings
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/Users/jwintz/.emacs.d/prolusion-elpa/helm-20151126.607/helm-multi-match hides /Users/jwintz/.emacs.d/prolusion-elpa/helm-core-20151123.253/helm-multi-match
/Users/jwintz/.emacs.d/prolusion-elpa/cmake-mode-20151012.726/cmake-mode hides /usr/local/share/emacs/site-lisp/cmake/cmake-mode
/Users/jwintz/.emacs.d/prolusion-elpa/irony-20151016.1420/.dir-locals hides /usr/local/Cellar/emacs/HEAD/share/emacs/25.1.50/lisp/gnus/.dir-locals

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils company-files
company-oddmuse company-keywords company-etags etags xref project
company-gtags company-dabbrev-code company-dabbrev company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-css company-nxml company-bbdb company-irony
irony-completion irony-snippet company-irony-c-headers irony company
rainbow-delimiters prolusion-builtins prolusion-projectile
helm-projectile helm-files image-dired tramp tramp-compat tramp-loaddefs
trampver shell pcomplete format-spec dired-x dired-aux ffap helm-tags
helm-bookmark helm-adaptive helm-info bookmark pp helm-external helm-net
browse-url xml url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap helm-buffers
helm-grep helm-regexp helm-plugin helm-elscreen helm-utils helm-locate
helm-help helm-types helm easy-mmode helm-source eieio-compat
helm-multi-match helm-lib dired projectile grep compile comint
ansi-color ibuf-ext ibuffer prolusion-vc git-gutter prolusion-www
prolusion-narrowing prolusion-scoping xcscope ring prolusion-checking
flycheck find-func rx subr-x prolusion-completion prolusion-irony
prolusion-snippets yasnippet cl prolusion-modes prolusion-editor
undo-tree diff hl-line smartparens-config smartparens advice thingatpt
dash whitespace prolusion-eshell exec-path-from-shell prolusion-behavior
edmacro kmacro diminish beacon seq which-key autorevert filenotify
recentf tree-widget wid-edit savehist prolusion-packages finder-inf info
url-handlers url-parse auth-source cl-seq eieio byte-opt bytecomp
byte-compile cl-extra cconv eieio-core cl-macs gv gnus-util mm-util
help-fns help-mode cl-loaddefs pcase cl-lib mail-prsvr password-cache
url-vars package easymenu epg-config prolusion-ui prolusion-dark-theme
prolusion time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel ns-win term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded 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 cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 303332 15787)
 (symbols 48 36985 0)
 (miscs 40 58 134)
 (strings 32 79504 10458)
 (string-bytes 1 2350352)
 (vectors 16 37853)
 (vector-slots 8 697579 3964)
 (floats 8 449 253)
 (intervals 56 290 0)
 (buffers 976 12))






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

* bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa
  2015-11-30 12:35 bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa Julien Wintz
@ 2015-12-04  6:46 ` Alex Dunn
  2016-12-08 22:07   ` Glenn Morris
  2017-04-23 19:40 ` Henrik Nyman
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Dunn @ 2015-12-04  6:46 UTC (permalink / raw)
  To: 22060

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


It looks like the default warning-face is getting overwritten.  When I
run `emacs -Q` and then `M-x customize`, warning-face is DarkOrange, as
expected.  But when I run emacs with my init file, it’s set to Red.

Is that the same as what you’re experiencing?

For me the culprit was the Solarized theme, which themes the
warning-face: https://github.com/sellout/emacs-color-theme-solarized/blob/master/solarized-definitions.el#L236


[-- Attachment #2: emacs -Q --]
[-- Type: image/png, Size: 12831 bytes --]

[-- Attachment #3: emacs with init file --]
[-- Type: image/png, Size: 20596 bytes --]

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

* bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa
  2015-12-04  6:46 ` Alex Dunn
@ 2016-12-08 22:07   ` Glenn Morris
  0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2016-12-08 22:07 UTC (permalink / raw)
  To: 22060

Alex Dunn wrote:

> It looks like the default warning-face is getting overwritten.  When I
> run `emacs -Q` and then `M-x customize`, warning-face is DarkOrange, as
> expected.  But when I run emacs with my init file, it's set to Red.
>
> Is that the same as what you're experiencing?
>
> For me the culprit was the Solarized theme, which themes the
> warning-face:

This doesn't seem relevant to the original report, which is about
error/warning/info indicators all getting the same colour, in emacs -Q
(hence no theme).





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

* bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa
  2015-11-30 12:35 bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa Julien Wintz
  2015-12-04  6:46 ` Alex Dunn
@ 2017-04-23 19:40 ` Henrik Nyman
  2017-04-24  9:48   ` Alan Third
  1 sibling, 1 reply; 6+ messages in thread
From: Henrik Nyman @ 2017-04-23 19:40 UTC (permalink / raw)
  To: 22060

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

Referred to this issue at:

  https://github.com/flycheck/flycheck/issues/811#issuecomment-296476404


I hope this helps with creating a proper fix.


In short:

  - Discovered this one is caused by:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=67a878f78f879ce534232408c34dd11f42dd802b

  - Was able to temporarily fix this issue with (applied on tag emacs-25.2,

    see below). This fixes the behaviour with flycheck  but may have some

    other undesired effects (there probably was a reason to save the

    foreground color in a member variable in the first place).


diff --git src/nsimage.m src/nsimage.m

index 3f49fc046b..ff7ccef0bf 100644

--- src/nsimage.m

+++ src/nsimage.m

@@ -270,7 +270,6 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)

         }

   }


-  xbm_fg = fg;

   [self addRepresentation: bmRep];

   return self;

}

@@ -298,18 +297,14 @@ ns_set_alpha (void *img, int x, int y, unsigned char
a)

   {

     int i, len = s.width*s.height;

     int rr = r * 0xff, gg = g * 0xff, bb = b * 0xff;

-    unsigned char fgr = (xbm_fg >> 16) & 0xff;

-    unsigned char fgg = (xbm_fg >> 8) & 0xff;

-    unsigned char fgb = xbm_fg & 0xff;


     for (i = 0; i < len; ++i)

-      if (planes[0][i] == fgr && planes[1][i] == fgg && planes[2][i] ==
fgb)

+      if (planes[3][i] != 0)

         {

           planes[0][i] = rr;

           planes[1][i] = gg;

           planes[2][i] = bb;

         }

-    xbm_fg = ((rr << 16) & 0xff) + ((gg << 8) & 0xff) + (bb & 0xff);

   }


   return self;

diff --git src/nsterm.h src/nsterm.h

index 5d2513aea7..9de7d94be4 100644

--- src/nsterm.h

+++ src/nsterm.h

@@ -643,7 +643,6 @@ char const * nstrace_fullscreen_type_name (int);

   NSBitmapImageRep *bmRep; /* used for accessing pixel data */

   unsigned char *pixmapData[5]; /* shortcut to access pixel data */

   NSColor *stippleMask;

-  unsigned long xbm_fg;

}

+ allocInitFromFile: (Lisp_Object)file;

- (void)dealloc;


Tested with Emacs 25.2 @3a34412caa, macOS Sierra 10.12.2

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

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

* bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa
  2017-04-23 19:40 ` Henrik Nyman
@ 2017-04-24  9:48   ` Alan Third
  2017-04-24 10:30     ` Henrik Nyman
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Third @ 2017-04-24  9:48 UTC (permalink / raw)
  To: Henrik Nyman; +Cc: 22060

On Sun, Apr 23, 2017 at 07:40:17PM +0000, Henrik Nyman wrote:
> Referred to this issue at:
> 
>   https://github.com/flycheck/flycheck/issues/811#issuecomment-296476404
> 
> 
> I hope this helps with creating a proper fix.

I’ve pushed a fix to the master branch. Can you please give it a try?

> (there probably was a reason to save the foreground color in a
> member variable in the first place).

I think the old code just looked at the alpha channel to determine
whether any particular pixel was background or foreground, but the new
code uses the actual colour value.

If you then change the foreground colour, you have to look for that
new colour the next time you want to change it.

I’m not really sure why that specific change was made. I can only
assume that the alpha channel isn’t always a perfect guide.
-- 
Alan Third





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

* bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa
  2017-04-24  9:48   ` Alan Third
@ 2017-04-24 10:30     ` Henrik Nyman
  0 siblings, 0 replies; 6+ messages in thread
From: Henrik Nyman @ 2017-04-24 10:30 UTC (permalink / raw)
  To: Alan Third; +Cc: 22060

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

Can confirm that the bug is fixed on master now. Thanks for the quick
response!

-Henrik

On Mon, Apr 24, 2017 at 12:48 PM Alan Third <alan@idiocy.org> wrote:

> On Sun, Apr 23, 2017 at 07:40:17PM +0000, Henrik Nyman wrote:
> > Referred to this issue at:
> >
> >   https://github.com/flycheck/flycheck/issues/811#issuecomment-296476404
> >
> >
> > I hope this helps with creating a proper fix.
>
> I’ve pushed a fix to the master branch. Can you please give it a try?
>
> > (there probably was a reason to save the foreground color in a
> > member variable in the first place).
>
> I think the old code just looked at the alpha channel to determine
> whether any particular pixel was background or foreground, but the new
> code uses the actual colour value.
>
> If you then change the foreground colour, you have to look for that
> new colour the next time you want to change it.
>
> I’m not really sure why that specific change was made. I can only
> assume that the alpha channel isn’t always a perfect guide.
> --
> Alan Third
>

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

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

end of thread, other threads:[~2017-04-24 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 12:35 bug#22060: 25.1.50; Fringe faces or not honored in 25.1.50.1 on OSX 10.11 installed via homebrew --use-git-head --cocoa Julien Wintz
2015-12-04  6:46 ` Alex Dunn
2016-12-08 22:07   ` Glenn Morris
2017-04-23 19:40 ` Henrik Nyman
2017-04-24  9:48   ` Alan Third
2017-04-24 10:30     ` Henrik Nyman

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