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: Sun, 26 May 2013 19:40:01 +0400 Message-ID: <87sj19sqb2.fsf@yandex.ru> References: <87bo7yq2az.fsf@yandex.ru> <83d2serd46.fsf@gnu.org> <87vc66d96b.fsf@yandex.ru> <83a9niqwsa.fsf@gnu.org> <87y5b2tnpl.fsf@yandex.ru> <834ndprd1z.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369582837 30052 80.91.229.3 (26 May 2013 15:40:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 May 2013 15:40:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 26 17:40:37 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 1Ugd3j-000357-Pu for geh-help-gnu-emacs@m.gmane.org; Sun, 26 May 2013 17:40:35 +0200 Original-Received: from localhost ([::1]:50945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugd3j-0007l5-B9 for geh-help-gnu-emacs@m.gmane.org; Sun, 26 May 2013 11:40:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugd3Q-0007k5-HY for help-gnu-emacs@gnu.org; Sun, 26 May 2013 11:40:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ugd3I-0002GG-R7 for help-gnu-emacs@gnu.org; Sun, 26 May 2013 11:40:16 -0400 Original-Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:50781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugd3I-0002G5-KL; Sun, 26 May 2013 11:40:08 -0400 Original-Received: by mail-la0-f52.google.com with SMTP id fo13so5782688lab.39 for ; Sun, 26 May 2013 08:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:x-antivirus:x-antivirus-status; bh=xlkIMd0I3c9OvW+75R30w08SKi7FQukcqBmk+aMgtxA=; b=v8SlcyNnF9I8pc3+gv8NCqxsD0mBiPgw9KdyoWkNcvnGbbcWjkdVwSk+kj/vZgeliC 5VTmmORQQs9wLpJ7DnJPEniRKfhOdHXo4nva5mKZ/Q/WpJWrLwW0B6IPfqSOQBFbjVCl iZq5YECY2q/WcmKyamfQMWl8rdb6ki/81QTjc4SWP2n0dnOqT8dt6P4uCucsqfGImIym RQ5eKt4ho0xmFdIxEj7cFSj85GCk/mX0EElBC75cxXCBiBDq8/V03OnezfdAMWBjaPeR Zdnf6dYsLnzusGa9cXg2UYUmlLXNwanhIDokRPSfLs+wz+0QgLTcx7kZJ0D3qEBIGjhU PxyA== X-Received: by 10.152.8.231 with SMTP id u7mr12798480laa.27.1369582807456; Sun, 26 May 2013 08:40:07 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPSA id f8sm9997571lbr.10.2013.05.26.08.40.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 May 2013 08:40:06 -0700 (PDT) In-Reply-To: <834ndprd1z.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 26 May 2013 18:11:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130526-0, 26.05.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::234 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:91074 Archived-At: Eli Zaretskii writes: > Btw, the general problem you described -- "render to a string" -- is > not necessarily solvable even in principle. E.g., how do you express > in a string variable fonts and other face attributes that don't change > the text, only how it is displayed? what about pixel-granular > alignment we do with :align-to and similar display properties? what to > do with images and sounds? etc. etc. That's true, but it can be solved well enough to be useful for testing some classes of packages. Pixel-granular alignment would probably be ignored, `face' properties would be either ignored, or just kept as-is in the rendered string. >> I think it's a shame, because out of all (?) text editors, Emacs is the >> best positioned to enable human-readable UI tests, because of how often >> people use text properties to do visuals. > > I don't understand this reasoning at all. Why do you think Emacs is > best positioned for this? And what have human-readable UI tests to do > with this; I thought you were talking about _automated_ tests? A human has to write these tests, and then come back later, be able to read and modify them. Try doing that efficiently with screen grabs. >> Testing UI look in graphical applications has to involve screen grabs, >> at least on some level. > > When Emacs runs on a graphical terminal, it acts as a graphical > application. The only means of building interface widgets exposed to Elisp are text properties, AFAIK. They do include some graphical-only features, but those aren't used as often as one might expect.