From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#40784: Clarifying the difference between fringe bitmaps and XBM images Date: Wed, 22 Apr 2020 17:52:23 -0400 Message-ID: <15c13a13-efad-aee4-ac0e-f2630dc7ca11@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3654564FDC20C48571386FCF" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="113087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 To: 40784@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 22 23:53:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRNIx-000TK8-J9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Apr 2020 23:53:15 +0200 Original-Received: from localhost ([::1]:58522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNIw-0003vx-NO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Apr 2020 17:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53822) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNIl-0003ui-Pz for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:53:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRNIl-0006Ux-BD for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRNIk-0006SD-IK for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jRNIk-0001DX-Cv for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Apr 2020 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40784 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.15875923514631 (code B ref -1); Wed, 22 Apr 2020 21:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Apr 2020 21:52:31 +0000 Original-Received: from localhost ([127.0.0.1]:53495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRNIE-0001Cc-Jl for submit@debbugs.gnu.org; Wed, 22 Apr 2020 17:52:30 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRNID-0001CU-0L for submit@debbugs.gnu.org; Wed, 22 Apr 2020 17:52:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53310) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNIC-0003Vb-6j for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:52:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRNIB-0004iQ-22 for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:52:27 -0400 Original-Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]:47088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRNIA-0004g6-IZ for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 17:52:26 -0400 Original-Received: by mail-qv1-xf30.google.com with SMTP id bu9so1780381qvb.13 for ; Wed, 22 Apr 2020 14:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=7ROUgRXgg9jmpcgLQ4nr1d4B1Nvr3VcTaC5tA5MbtsY=; b=IldEGhv+OpundCstvTSNWWaf0diXKzPtJMoGNw7k5ojaMFgzN5fBVfOMkV0D8xCTZl NqV7TzSH4yRIdgEK4xGKFFfNccez9FhH8LzTviCnNvGcsCG0ug7wWZTyone+Li4Z6lW8 dPdYbWtNLBINr5TCJ78a6A8DCKUPu0tvlvy2ipDdPnu0eo6xRYJzZSteHdk01nEV/bSK V1knUMyeoD56QQY5dot845lO1OdK16P9u/Q8A4wZVuUVc0wE2rsmM4IYitn/90Y47HHY 3pSqbwysVVvM1Snvaob41Dt6dG1ckKEcRH+WBKM6cqvCTIdLOo5pBqJXrZ3mqdfAIDE6 tPlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=7ROUgRXgg9jmpcgLQ4nr1d4B1Nvr3VcTaC5tA5MbtsY=; b=igv+HPJ9Gz45iOmDbm1jdFx8jP/5RyZh2i7KFpJvhdjjLjxTen6TkotDGAG34TajrJ CEsEHhADf/oF30cvRVMpLDDgYaalJkxSm5SAulfkYJkze7S9z5bttATrF/z770vd2QVd aGawwI/3jXf0ZAHwHG4GJcgdMgEuM0gc4e4ial+30dqUyPTHIoMZkm1PObObW06kqnit Z7x+sCWoYIMLL93QER3Tt8bJOW7ds4CYg6Nn2DbKsyfXIe44+OW8HNp0+JPDgJlA6ibR jxaVB+9TQECvKyCK85bBkvisVquVUJBvhebivzmZi/GPJqG8Pp9GAVHxCRtWqvvohehA 1uag== X-Gm-Message-State: AGi0PuYj/9A8hmKF9o2/vpIXxYF/E6CrbZrRVkgTLTA4Fb0Of1+0ba0j PQdd4Jrfp5lIxVIctfq2PvQHQ6cA X-Google-Smtp-Source: APiQypLrYeyqJQOeGlAVUvEGYBFoRRz5sLPicgIuMXfGrXwF7QsGW2DWi4Yinycy1a6kMnK3SVaT3A== X-Received: by 2002:a0c:c506:: with SMTP id x6mr1142041qvi.188.1587592345216; Wed, 22 Apr 2020 14:52:25 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:40b5:9c78:223e:9420? ([2601:184:4180:66e7:40b5:9c78:223e:9420]) by smtp.googlemail.com with ESMTPSA id u27sm397526qtc.73.2020.04.22.14.52.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Apr 2020 14:52:24 -0700 (PDT) Content-Language: en-GB Received-SPF: pass client-ip=2607:f8b0:4864:20::f30; envelope-from=cpitclaudel@gmail.com; helo=mail-qv1-xf30.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178833 Archived-At: This is a multi-part message in MIME format. --------------3654564FDC20C48571386FCF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi all, I was experimenting with XBM images today and it took me a while to realize that the bits in XBM and fringe bitmaps are not in the same order. The attached patch attempts to highlight this. Cheers, Clément. --------------3654564FDC20C48571386FCF Content-Type: text/x-patch; charset=UTF-8; name="0001-Point-out-the-difference-in-bit-order-between-fringe.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Point-out-the-difference-in-bit-order-between-fringe.pa"; filename*1="tch" >From e6c55630b1210ce852214e84a81d59c931663506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pit-Claudel?= Date: Wed, 22 Apr 2020 17:46:07 -0400 Subject: [PATCH] Point out the difference in bit order between fringe bitmaps and XBM * doc/lispref/display.texi (Customizing Bitmaps), src/fringe.c (Fdefine_fringe_bitmap): Add a caveat about XBM. --- doc/lispref/display.texi | 3 ++- src/fringe.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 132a3c8535..5a5091b57b 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -4338,7 +4338,8 @@ Customizing Bitmaps either a string or a vector of integers, where each element (an integer) corresponds to one row of the bitmap. Each bit of an integer corresponds to one pixel of the bitmap, where the low bit corresponds -to the rightmost pixel of the bitmap. +to the rightmost pixel of the bitmap (this is the opposite of XBM +images; @pxref{XBM Images}). The height is normally the length of @var{bits}. However, you can specify a different height with non-@code{nil} @var{height}. The width diff --git a/src/fringe.c b/src/fringe.c index d8d80bb3fe..f33eb83bbf 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1498,7 +1498,9 @@ DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap, 2, 5, 0, doc: /* Define fringe bitmap BITMAP from BITS of size HEIGHT x WIDTH. BITMAP is a symbol identifying the new fringe bitmap. -BITS is either a string or a vector of integers. +BITS is either a string or a vector of integers. Beware: the lowest +bits of each integer is the rightmost pixel of each line, unlike in +XBM bitmaps. HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS. WIDTH must be an integer from 1 to 16, or nil which defaults to 8. An error is signaled if WIDTH is outside this range. -- 2.17.1 --------------3654564FDC20C48571386FCF--