GNU bug report logs - #40784
Clarifying the difference between fringe bitmaps and XBM images

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Wed, 22 Apr 2020 21:53:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40784 in the body.
You can then email your comments to 40784 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#40784; Package emacs. (Wed, 22 Apr 2020 21:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Pit-Claudel <cpitclaudel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Apr 2020 21:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: Clarifying the difference between fringe bitmaps and XBM images
Date: Wed, 22 Apr 2020 17:52:23 -0400
[Message part 1 (text/plain, inline)]
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.
[0001-Point-out-the-difference-in-bit-order-between-fringe.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40784; Package emacs. (Thu, 23 Apr 2020 14:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 40784 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 40784 <at> debbugs.gnu.org
Subject: Re: bug#40784: Clarifying the difference between fringe bitmaps and
 XBM images
Date: Thu, 23 Apr 2020 17:30:47 +0300
> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
> Date: Wed, 22 Apr 2020 17:52:23 -0400
> 
> 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.

I don't think I understand the concern, and therefore cannot make up
my mind about the proposed changes.  Can you tell more about your
difficulties?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40784; Package emacs. (Thu, 23 Apr 2020 14:37:02 GMT) Full text and rfc822 format available.

Message #11 received at 40784 <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 40784 <at> debbugs.gnu.org
Subject: Re: bug#40784: Clarifying the difference between fringe bitmaps and
 XBM images
Date: Thu, 23 Apr 2020 10:35:54 -0400
On 23/04/2020 10.30, Eli Zaretskii wrote:
>> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
>> Date: Wed, 22 Apr 2020 17:52:23 -0400
>>
>> 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.
> 
> I don't think I understand the concern, and therefore cannot make up
> my mind about the proposed changes.  Can you tell more about your
> difficulties?

Of course: I am currently writing a mode that displays indicators either in the margins or in the fringes, depending on the value of a defcustom.
By default, I intended to use the same bitmaps in the margins and in the fringes.  It took me a while to understand what I was doing wrong: I was seeing reversed bitmaps, but I hadn't considered the possibility that the two places where Emacs supports monochrome bitmaps would accept the same representation (unibyte strings) but use a different bit order. 
The proposed patch updates the documentation to save the next person from experiencing the same pain.

Clément.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40784; Package emacs. (Thu, 23 Apr 2020 15:15:01 GMT) Full text and rfc822 format available.

Message #14 received at 40784 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 40784 <at> debbugs.gnu.org
Subject: Re: bug#40784: Clarifying the difference between fringe bitmaps and
 XBM images
Date: Thu, 23 Apr 2020 18:14:11 +0300
> Cc: 40784 <at> debbugs.gnu.org
> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
> Date: Thu, 23 Apr 2020 10:35:54 -0400
> 
> Of course: I am currently writing a mode that displays indicators either in the margins or in the fringes, depending on the value of a defcustom.
> By default, I intended to use the same bitmaps in the margins and in the fringes.  It took me a while to understand what I was doing wrong: I was seeing reversed bitmaps, but I hadn't considered the possibility that the two places where Emacs supports monochrome bitmaps would accept the same representation (unibyte strings) but use a different bit order. 
> The proposed patch updates the documentation to save the next person from experiencing the same pain.

If so, then why do we need to mention this in the doc string?  Won't
the manual be enough?  It is strange to mention just this factoid in
the doc strings, when one can shoot themselves in the foot with
bitmapped images in many exciting ways.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#40784; Package emacs. (Thu, 23 Apr 2020 15:45:01 GMT) Full text and rfc822 format available.

Message #17 received at 40784 <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 40784 <at> debbugs.gnu.org
Subject: Re: bug#40784: Clarifying the difference between fringe bitmaps and
 XBM images
Date: Thu, 23 Apr 2020 11:44:13 -0400
On 23/04/2020 11.14, Eli Zaretskii wrote:
>> Cc: 40784 <at> debbugs.gnu.org
>> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
>> Date: Thu, 23 Apr 2020 10:35:54 -0400
>>
>> Of course: I am currently writing a mode that displays indicators either in the margins or in the fringes, depending on the value of a defcustom.
>> By default, I intended to use the same bitmaps in the margins and in the fringes.  It took me a while to understand what I was doing wrong: I was seeing reversed bitmaps, but I hadn't considered the possibility that the two places where Emacs supports monochrome bitmaps would accept the same representation (unibyte strings) but use a different bit order. 
>> The proposed patch updates the documentation to save the next person from experiencing the same pain.
> 
> If so, then why do we need to mention this in the doc string?  Won't
> the manual be enough?  It is strange to mention just this factoid in
> the doc strings, when one can shoot themselves in the foot with
> bitmapped images in many exciting ways.

The docstrings are usually good enough that I seldom read the manuals :/
Having a brief warning in the docstring is useful in that case.  But I'm happy to yield to your judgement.

Clément.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 25 Apr 2020 10:00:02 GMT) Full text and rfc822 format available.

Notification sent to Clément Pit-Claudel <cpitclaudel <at> gmail.com>:
bug acknowledged by developer. (Sat, 25 Apr 2020 10:00:03 GMT) Full text and rfc822 format available.

Message #22 received at 40784-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 40784-done <at> debbugs.gnu.org
Subject: Re: bug#40784: Clarifying the difference between fringe bitmaps and
 XBM images
Date: Sat, 25 Apr 2020 12:59:31 +0300
> Cc: 40784 <at> debbugs.gnu.org
> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
> Date: Thu, 23 Apr 2020 11:44:13 -0400
> 
> > If so, then why do we need to mention this in the doc string?  Won't
> > the manual be enough?  It is strange to mention just this factoid in
> > the doc strings, when one can shoot themselves in the foot with
> > bitmapped images in many exciting ways.
> 
> The docstrings are usually good enough that I seldom read the manuals :/
> Having a brief warning in the docstring is useful in that case.  But I'm happy to yield to your judgement.

Thanks, I've updated the manual with this caveat.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 May 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.