From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: Render a buffer or string to a simpler string? Date: Mon, 27 May 2013 06:48:54 +0400 Message-ID: <87sj19cf3d.fsf@yandex.ru> References: <87bo7yq2az.fsf@yandex.ru> <83d2serd46.fsf@gnu.org> <87vc66d96b.fsf@yandex.ru> <83a9niqwsa.fsf@gnu.org> <114b888b-eecb-4503-a7a1-9ec09a9e9a05@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369622959 28865 80.91.229.3 (27 May 2013 02:49:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 May 2013 02:49:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: esabof@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 27 04:49:18 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1UgnUr-0003xq-ER for geh-help-gnu-emacs@m.gmane.org; Mon, 27 May 2013 04:49:17 +0200 Original-Received: from localhost ([::1]:36844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgnUq-00059n-PV for geh-help-gnu-emacs@m.gmane.org; Sun, 26 May 2013 22:49:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgnUc-00059h-IQ for help-gnu-emacs@gnu.org; Sun, 26 May 2013 22:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgnUY-0007RZ-17 for help-gnu-emacs@gnu.org; Sun, 26 May 2013 22:49:02 -0400 Original-Received: from mail-lb0-f181.google.com ([209.85.217.181]:48480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgnUX-0007RU-Pz for help-gnu-emacs@gnu.org; Sun, 26 May 2013 22:48:57 -0400 Original-Received: by mail-lb0-f181.google.com with SMTP id w20so6323971lbh.12 for ; Sun, 26 May 2013 19:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:x-antivirus:x-antivirus-status; bh=cJYySY9BxtbLTT1N6Kn806xnewWvmw3a8pIYgW6o22g=; b=fs8hflLTyMd99vsmw7eea7ndPg3O6o02g5fZPdLerPBdhhUOxpgttaREkfRkcGux6l ZNOkC+LfFWK8sGhq/ppARYgoR8KgQua7p9BVVtjmasEKOwIcjF9ZebXVSzKM1b8I80Mr wSd6X3LMQJZ56kfphqyYcf1iYbdJdhDaUGmE6cQhxkIUhN9dtVKaxIBmapWTJCU5bSaf f6RM9aZCuyM8Wt645QgajItNlkCOSG7Am1em6lxPvdXJadG5w7TTsRLRPn7Z7ZC8wY+Q psOwCuVabe+4pHOjSWfnt3F57p6+9V++94S5REcTgEmCTNQMkp9GqvS2JrFEQrcw8APs nERg== X-Received: by 10.152.121.73 with SMTP id li9mr13095347lab.18.1369622936790; Sun, 26 May 2013 19:48:56 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPSA id y1sm11039488lay.3.2013.05.26.19.48.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 May 2013 19:48:55 -0700 (PDT) In-Reply-To: <114b888b-eecb-4503-a7a1-9ec09a9e9a05@googlegroups.com> (esabof@gmail.com's message of "Sun, 26 May 2013 10:56:03 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130526-1, 27.05.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.181 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91085 Archived-At: esabof@gmail.com writes: >> Obviously, some ERT tests could use such a feature, but things like >> >> htmlfontify could probably also make use of it. > > Another primitive which I think doesn't exist, is given a position, > return it's pixel coordinates. From this one could construct things > like region-pixel-width and region-pixel-height. See `posn-at-point'. > It might also be useful to be able to store frame renderings as images > and compare them. This would also allow a somewhat grotesque way to do > transparency. (Save the image (which I think is already possible), > overlay the buffer with a SVG, include the rendering in the SVG and > render whatever necessary ontop of it). The main problem as I see it, is how to output the difference information in case of mismatch. Saying "these pics are different, go look at them yourself" isn't very helpful for test-driven development. This would extend to arrays of glyphs, too, maybe even to a larger degree (haven't thought of that before).