From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Alignment and images Date: Tue, 28 Jun 2016 19:24:02 +0300 Message-ID: <831t3hxowt.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467131222 17436 80.91.229.3 (28 Jun 2016 16:27:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2016 16:27:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 18:27:01 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bHvqm-0004tT-Ml for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 18:27:00 +0200 Original-Received: from localhost ([::1]:38063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHvqi-0001Z0-K3 for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2016 12:26:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHvoP-0000EA-91 for emacs-devel@gnu.org; Tue, 28 Jun 2016 12:24:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHvoJ-0007EZ-Mt for emacs-devel@gnu.org; Tue, 28 Jun 2016 12:24:32 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHvoJ-0007EK-K4; Tue, 28 Jun 2016 12:24:27 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4388 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bHvoI-0001s2-Qi; Tue, 28 Jun 2016 12:24:27 -0400 In-reply-to: (message from Lars Magne Ingebrigtsen on Tue, 28 Jun 2016 15:32:26 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204865 Archived-At: > From: Lars Magne Ingebrigtsen > Date: Tue, 28 Jun 2016 15:32:26 +0200 > > My first attempt was a loop like this: > > (unless (bolp) > (insert (propertize " " 'display > `(space :align-to (,(* (mod i width) pixels))) > 'intangible t))) > (insert-image (create-image file 'imagemagick nil > :max-width pixels > :max-height pixels) > " ") > > This gives me a nice grid visually, but when moving around in the grid, > every other lands me on the align-to space thing, which doesn't > feel very nice. It's not clear what you want to happen instead. Can you spell that out for me? Like, describe what should happen as you press time after time. > I thought that the 'intangible should make that effect disappear, > but it didn't. Is that a bug? Or am I doing something wrong? Not sure. Problem is, I don't build with Imagemagick, so I cannot try your code and see what's going on there. Can you show something similar, but using more traditional images? > The second attempt was to add both the image and the align-to to the > same display property. Kinda like this: > > (insert (propertize " " 'display > `(,(create-image file 'imagemagick nil > :max-width pixels > :max-height pixels) > :align-to (,(* (mod i width) pixels))))) > > That didn't work at all, but I didn't really expect it to. :-) Right.