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 01:46:52 +0400 Message-ID: <87vc66d96b.fsf@yandex.ru> References: <87bo7yq2az.fsf@yandex.ru> <83d2serd46.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369518449 18577 80.91.229.3 (25 May 2013 21:47:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 May 2013 21:47:29 +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 Sat May 25 23:47:28 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 1UgMJC-00014d-Ma for geh-help-gnu-emacs@m.gmane.org; Sat, 25 May 2013 23:47:26 +0200 Original-Received: from localhost ([::1]:32863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgMJC-0000gK-Az for geh-help-gnu-emacs@m.gmane.org; Sat, 25 May 2013 17:47:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgMIu-0000fN-WE for help-gnu-emacs@gnu.org; Sat, 25 May 2013 17:47:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgMIi-000707-Mx for help-gnu-emacs@gnu.org; Sat, 25 May 2013 17:47:08 -0400 Original-Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]:57132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgMIi-000701-Eq; Sat, 25 May 2013 17:46:56 -0400 Original-Received: by mail-la0-f49.google.com with SMTP id fp13so5401889lab.8 for ; Sat, 25 May 2013 14:46:54 -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=m8gs7lLFSQ56D9IsHatSxe0gusTFiJF11co2yQrkxEU=; b=PiIWSo+V6UGfTc1sttZ/WpDYne7/czCU1B+DvE8LJSknz6owuR5xVxcyjj8/7SkYKe G3I+ykkFrYybQYULGMghTK5jhrXeybbI6uBmld7I2Ih6z4LZknJjw0fArc8h/3Pdn9jB iedDQopIz8BUV2CnhT6e78LFVhKGWSKvUHwigOKhlBX0IXHqmqkM+uZjnrCo/CFjinXp rsdrFicH9YJQtloAthtlOE4Fm65d7A7eXFpy+wpmySEWtaREEISkrmLvAHzmGrxUFh6A ZpuVEHgp3vPazb0HAzexeCHyyZxOamsSwE/ktpwIjY+4BPZ6oPFMfvlLD3rWo9BHtUpE Ik2Q== X-Received: by 10.112.170.201 with SMTP id ao9mr11495885lbc.40.1369518414881; Sat, 25 May 2013 14:46:54 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPSA id a5sm9138560laa.2.2013.05.25.14.46.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 25 May 2013 14:46:53 -0700 (PDT) In-Reply-To: <83d2serd46.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 25 May 2013 23:58:01 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130525-0, 25.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::231 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:91053 Archived-At: Eli Zaretskii writes: >> From: Dmitry Gutov >> Date: Sat, 25 May 2013 23:36:52 +0400 >> >> Is there an easy way to convert a string with `line-prefix' and, >> optionally, `prefix' and `display' properties to a string without those >> properties corresponding to how the former string is going to be >> displayed? > > Why do you need that? What do you need to accomplish that needs such > a strange feature? Write an automated test (with ERT) that would be easy to read and modify later. I could, for example, compare against a string artificially constructed with `ert-propertized-string', but it requires more effort, it's easy to get wrong, and it would not express the intended feature. To put it differently, the goal is to make the buffer look a certain way, so I'd like to be able to check that it does look that way. (For my current purpose, it would be fine if that render-to-string function disregarded eyecandy text-properties, like `face', but in the general case, being able to compare them, too, would be handy.)