From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36337: 26.1; XBM images are sometimes not displayed correctly Date: Fri, 28 Jun 2019 08:29:04 +0000 Message-ID: References: <83tvcgml2s.fsf@gnu.org> <83o92omezr.fsf@gnu.org> <83blyii1kr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="86767"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36337@debbugs.gnu.org, triska@metalevel.at To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 10:30:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgmGs-000MFE-5c for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 10:30:14 +0200 Original-Received: from localhost ([::1]:57700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgmGq-0005aZ-VZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2019 04:30:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60889) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgmGh-0005aC-R8 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 04:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgmGg-00073W-I1 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 04:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55034) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgmGg-00071s-D0 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 04:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgmGg-0006BE-4Q for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 04:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2019 08:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36337 X-GNU-PR-Package: emacs Original-Received: via spool by 36337-submit@debbugs.gnu.org id=B36337.156171058923713 (code B ref 36337); Fri, 28 Jun 2019 08:30:02 +0000 Original-Received: (at 36337) by debbugs.gnu.org; 28 Jun 2019 08:29:49 +0000 Original-Received: from localhost ([127.0.0.1]:40345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgmGS-0006AP-RI for submit@debbugs.gnu.org; Fri, 28 Jun 2019 04:29:49 -0400 Original-Received: from mail-ot1-f53.google.com ([209.85.210.53]:46808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgmGQ-0006AA-ED for 36337@debbugs.gnu.org; Fri, 28 Jun 2019 04:29:46 -0400 Original-Received: by mail-ot1-f53.google.com with SMTP id z23so5145310ote.13 for <36337@debbugs.gnu.org>; Fri, 28 Jun 2019 01:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zCj2lQk+iy+rfbusPvMW1QIKBOqSGdTwg5qLwcGO1o0=; b=BSgfHoSEy015u7GE2Q7SPaSpAZapNvE/wn9GwWK5hFl81nr7OjwM+LAEaKkn5J7Hj+ ZH62ErN25lSciVI87aYBw3H8GayUIf1DlclHMjMrYklMl8MpFm+bei7Dv/qB4csICDfZ iib8H3XbegYRVvC8/xDvm4zDxnSPzMfdUdSh/6Hozoc6w1D88kw6I89t0VP7vB5ZTL9X Pko8VaQE0sMADw5Y86+PoKxAERnSZszy1qclFusXHnQvkGdXTM8xMiSITIYJyo+kBl5L dNKYYA1Jg89MwwdlnNbOZP9C0EigDgspKekSaWB4g2GwmnnOxXhdwLBreX5dW79SWOkT wV8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zCj2lQk+iy+rfbusPvMW1QIKBOqSGdTwg5qLwcGO1o0=; b=s/Ueb5JFue64ZW45EY0XX8n9uNjKU4JPQZRQcDcvaJkhYmvh3XGs2R8trSwjiLmdBc pTC1xqTFVv1aFqh9aSdzpjcYZsh2Y7Azr+hBkYcdlzw8v6I/qSKbmu51ofgvCZgg+hMC F+5E0d+BkqC5S3Z6Fu148FCtBqhsolxCvGU9wDl+ooFB2gxg+LGJHYwaQld6f5hXHDPq BUaWW/QW6q5mpMGNhFq4GIm8wsnQdcsikrtv5bJkZpOdP2XKAQmg4m13LA6/lxsCr5aQ zRy6ilq5f2g1g4nsN2RjnVuMSLB/K/etYGP5VSOwtV+ytaUup1nssWQ94SPHvtN34WPP RR2g== X-Gm-Message-State: APjAAAUqLeTyXs6uLzjsERXX5rHV+MyckzI0vCYwhkz7+tkgDHtwLhpY CPrn1iM1sBNKeYeE7uToqrJ+CbxsXMG9PWluRdY= X-Google-Smtp-Source: APXvYqwTADuhDjvHAFkvgCgTpftOcIb/fvbi+m0FAQF5fb8FaqYpAAolBS0MmCUOydlouhs1RxLShHzLiVw31k8dRlQ= X-Received: by 2002:a9d:744f:: with SMTP id p15mr2456693otk.287.1561710580753; Fri, 28 Jun 2019 01:29:40 -0700 (PDT) In-Reply-To: <83blyii1kr.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161698 Archived-At: On Fri, Jun 28, 2019 at 7:58 AM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Sun, 23 Jun 2019 19:16:04 +0000 > > Cc: triska@metalevel.at, 36337@debbugs.gnu.org > > > > > Or maybe we should have a variant of make-bool-vector that accepts 2 > > > dimension s instead of just one? > > > > I don't really see how that would be generally useful, to be honest. > > For one, it would be useful in this particular case. Or would you > rather require the width of XBM be an integral multiple of 8? Having thought about it, I would rather require the bool vector passed to XBM to be in the right format: the width can be 100, but the stride, specified by a new :stride argument, must be the smallest multiple of 8 greater or equal to the width. If you don't want that, pass a vector of bool vectors which is copied together, but let's not pretend we can take a 10,000-bit bool vector and display it efficiently. I think my mistake was not to distinguish between stride and width, but we can easily do so. Shall I prepare a patch? > > In fact, I just played around with removing bool vector support > > entirely. > I'm sorry, but I object to removing a feature that has been with us > since Emacs 19 Okay. Thanks for taking the time to explain. One serious question, though unrelated to the current bug: do you think it is just the Lisp API that we're stuck with for eternity, or is the C representation of bool vectors forbidden territory as well? > , for which we installed new operations just recently in Emacs 24. If we add new features for bool vectors, they might stick out less. People might actually start using them. That would invalidate my earlier argument. > What you propose is not what I think I had in mind. I meant to extend > make-bool-vector (or make a new function, if extending proves > inconvenient or inelegant) that generates a bool-vector given 2 > dimensions, not one. Then such vectors could be used to create XBM > images of arbitrary dimensions. We could even call this new function > something like make-xbm-data or somesuch, if its utility is limited to > XBM images. How is a vector of bool vectors different from a 2-dimensional bool vector, from the point of view of Lisp? If I understand you correctly, you would like two-dimensional bool vectors to be represented in memory in the XBM format. As for the problem at hand, how would you feel about adding a :stride argument which must be a multiple of 8 and ensures that the bool vector passed to the XBM code has the right memory layout?