From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mustafa Kocaturk Newsgroups: gmane.emacs.bugs Subject: bug#21301: 25.0.50; Emacs Trunk: Fringe bitmaps confuse foreground/background colors. Date: Thu, 8 Oct 2015 16:26:25 -0500 Message-ID: <3F9297F4-810B-4092-8697-96E97645E680@gmail.com> References: Reply-To: Mustafa Kocaturk NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3096.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_B2587ACE-6E88-49B6-9C41-3D29EE881C7A" X-Trace: ger.gmane.org 1444345470 22893 80.91.229.3 (8 Oct 2015 23:04:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Oct 2015 23:04:30 +0000 (UTC) To: 21301@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 09 01:04:20 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from eggs.gnu.org ([208.118.235.92]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZkKEU-0004Bl-2t for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Oct 2015 01:04:18 +0200 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkKDT-0005Wv-HO for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 19:04:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkKDS-0005V8-VL for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 19:03:15 -0400 Original-Received: from localhost ([::1]:37578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkKDS-0002V5-RV for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 19:03:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkKD0-0002PC-9s for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 19:03:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkKCI-00044O-UK for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 19:02:46 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkKCI-00044I-N0 for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 19:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZkKCH-0007jz-RB for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 19:02:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mustafa Kocaturk Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Oct 2015 23:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144434526329684 (code B ref -1); Thu, 08 Oct 2015 23:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2015 23:01:03 +0000 Original-Received: from localhost ([127.0.0.1]:33171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkKBL-0007ih-8k for submit@debbugs.gnu.org; Thu, 08 Oct 2015 19:01:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39311) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkKBJ-0007iP-MQ for submit@debbugs.gnu.org; Thu, 08 Oct 2015 19:01:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkKB4-0008Bc-QM for submit@debbugs.gnu.org; Thu, 08 Oct 2015 19:01:01 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkKB4-0008BS-Ed for submit@debbugs.gnu.org; Thu, 08 Oct 2015 19:00:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkKAf-0001KM-Cb for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 19:00:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkKAI-0007hn-E8 for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 19:00:21 -0400 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:35134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkIhw-00082j-TD for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 17:26:37 -0400 Original-Received: by oigi138 with SMTP id i138so12319945oig.2 for ; Thu, 08 Oct 2015 14:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:reply-to:subject:date:message-id:to:mime-version; bh=1wA3IbcHyggeJX1ciHEotSlICFmlntceU6BftI0WTJY=; b=oXR0I/uOOCWN3+TU/obsCx5U+1BjJBMBy/cjQee2cdULBWMXrj8ltLx5+v3iEHKeSA 9BIW2xDLzmDnsAtd3kEe3pu5fu12OVtxrthlPUfeKUiTQ849zIK2oFd+5wJxa04thlhy u5PQUiLs0w2Du8liHw1sikv0ZBl/a94k3+yZ61Hkorh+rORko9UlyP2Mot1YMCOmr1zI ljCXQFWlCGq7Lob76mH+iIDH8WetHLRWfPYatNhegIhgKsdGhl/cL5ODdFB9aSOmZQkH WL074BMZUyXfmWFJNQXKTLHWN75V6LfoERtPpkrYdYYepcdPPsjTzcgZQM/2YY/OgURy PQKQ== X-Received: by 10.202.179.69 with SMTP id c66mr5854680oif.67.1444339587704; Thu, 08 Oct 2015 14:26:27 -0700 (PDT) Original-Received: from [10.155.4.144] ([129.192.176.66]) by smtp.gmail.com with ESMTPSA id jo5sm20239118obb.16.2015.10.08.14.26.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Oct 2015 14:26:26 -0700 (PDT) X-Mailer: Apple Mail (2.3096.1) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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-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 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 Xref: news.gmane.org gmane.emacs.bugs:107467 Archived-At: --Apple-Mail=_B2587ACE-6E88-49B6-9C41-3D29EE881C7A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, The fringe bitmap is not only displayed in inverse video, but also as a = mirror image of the original. Both issues are fixed in initFromXBM as follows: 1. Flip the bit shift direction: Put most significant bit first. Fixes = the mirrored image back to normal. 2. Swap background and foreground color. The resulting display makes better sense and looks as original as I can = tell. =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 Patch follows: *** Temp/ediff7256bpj Wed Oct 7 19:22:04 2015 --- src/nsimage.m Wed Oct 7 18:50:41 2015 *************** *** 253,272 **** for (k =3D 0; i < w && k < 8; ++k, ++i) { *alpha++ =3D 0xff; ! if (c & 1) ! { ! *rr++ =3D fgr; ! *gg++ =3D fgg; ! *bb++ =3D fgb; ! } ! else { *rr++ =3D bgr; *gg++ =3D bgg; *bb++ =3D bgb; } idx++; ! c >>=3D 1; } } } --- 253,272 ---- for (k =3D 0; i < w && k < 8; ++k, ++i) { *alpha++ =3D 0xff; ! if (c & 0x80) { *rr++ =3D bgr; *gg++ =3D bgg; *bb++ =3D bgb; } + else + { + *rr++ =3D fgr; + *gg++ =3D fgg; + *bb++ =3D fgb; + } idx++; ! c <<=3D 1; } } } > > Date: Sat, 29 Aug 2015 12:51:11 -0700 > > From: Keith David Bershatsky > > Cc: address@hidden > >=20 > > I rolled back to the commit "SHA = 67a878f78f879ce534232408c34dd11f42dd802b"=20 > > [May 15, 2015 at 2:31 a.m.], then built Emacs, and bug#21301 WAS = present. > >=20 > > I rolled back to the commit "SHA = b1c23fb94072cca7f08ea5f50430916b9ea168e6"=20 > > [May 15, 2015 at 2:17 a.m.], then built Emacs, and bug#21301 was NOT = present=20 > > -- i.e., everything was working as it should. > >=20 > Great, thanks. So we now know for sure that 67a878f _was_ the > culprit. >=20 > I hope someone knowledgeable about NS and OS X will be able to tell > what's wrong with that change, and how to fix it. Just the two reversals mentioned above, which were obvious from the way = bitmaps appear on screen. Not much else was needed in the way of OS X or NS knowledge, luckily for = me :). Another annoying display issue remains, though:=20 Visible bell no longer displays solid black, but distorted pieces of = bitmap from another part of the screen, and leaves a stubborn garbled = rectangle behind, hiding the original text.=20 I=E2=80=99m not sure if this has been reported as a bug, but suspecting = it involves ns_ring_bell in nsterm.m and around the same time frame. Best regards, Mustafa= --Apple-Mail=_B2587ACE-6E88-49B6-9C41-3D29EE881C7A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi,

The fringe bitmap is not only displayed in inverse video, but = also as a mirror image of the original.

Both issues are fixed in initFromXBM as = follows:

1. = Flip the bit shift direction: Put most significant bit first. Fixes the = mirrored image back to normal.
2. Swap background = and foreground color.

The resulting display makes better sense and looks as = original as I can tell.

=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94 Patch follows:

*** Temp/ediff7256bpj Wed Oct =  7 19:22:04 2015
--- src/nsimage.m Wed Oct =  7 18:50:41 2015
***************
*** 253,272 ****
      =       for (k =3D 0; i < w && k < 8; ++k, = ++i)
            =   {
            =     *alpha++ =3D 0xff;
!     =           if (c & 1)
! =                 {
!                 =   *rr++ =3D fgr;
!         =           *gg++ =3D fgg;
! =                   *bb++ =3D = fgb;
!             =     }
!         =       else
      =             {
  =                   *rr++ =3D = bgr;
            =         *gg++ =3D bgg;
  =                   *bb++ =3D = bgb;
            =       }
        =         idx++;
!     =           c >>=3D 1;
              }
          }
    }
--- 253,272 = ----
            for = (k =3D 0; i < w && k < 8; ++k, ++i)
              {
                = *alpha++ =3D 0xff;
!         =       if (c & 0x80)
  =                 {
                =     *rr++ =3D bgr;
      =               *gg++ =3D = bgg;
            =         *bb++ =3D bgb;
  =                 }
+               = else
+             =     {
+         =           *rr++ =3D fgr;
+ =                   *gg++ =3D = fgg;
+             =       *bb++ =3D fgb;
+     =             }
  =               idx++;
!               c = <<=3D 1;
          =     }
          = }
    }


> Date:  Sat, 29 Aug 2015 12:51:11 -0700
> From:  Keith David Bershatsky =
<address@hidden>
> Cc:  address@hidden
> 
> I rolled back to the commit "SHA =
67a878f78f879ce534232408c34dd11f42dd802b" 
> [May 15, 2015 at 2:31 a.m.], then built Emacs, and =
bug#21301 WAS present.
> 
> I rolled back to the commit "SHA =
b1c23fb94072cca7f08ea5f50430916b9ea168e6" 
> [May 15, 2015 at 2:17 a.m.], then built Emacs, and =
bug#21301 was NOT present 
> -- i.e., everything was working as it should.
> 
Great, thanks.  So we now know for sure that =
67a878f _was_ the
culprit.

I hope someone knowledgeable about NS and OS X will be able to tell
what's wrong with that change, and how to fix =
it.
Just the two = reversals mentioned above, which were obvious from the way bitmaps = appear on screen.
Not much else was needed in the = way of OS X or NS knowledge, luckily for me :).

Another annoying display issue remains, = though: 
Visible bell no longer displays solid = black, but distorted pieces of bitmap from another part of the screen, = and leaves a stubborn garbled rectangle behind, hiding the original = text. 
I=E2=80=99m not sure if this has been = reported as a bug, but suspecting it involves ns_ring_bell in nsterm.m = and around the same time frame.

Best regards,
Mustafa
= --Apple-Mail=_B2587ACE-6E88-49B6-9C41-3D29EE881C7A--