From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: format padding and text properties Date: Wed, 22 Jun 2016 08:08:29 +0200 Message-ID: <20160622060829.GA32666@tuxteam.de> References: <871t3pye9j.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: ger.gmane.org 1466575813 18551 80.91.229.3 (22 Jun 2016 06:10:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2016 06:10:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 22 08:10:13 2016 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 1bFbMZ-0004Ie-FS for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Jun 2016 08:10:11 +0200 Original-Received: from localhost ([::1]:55860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFbMY-0000MS-GQ for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Jun 2016 02:10:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFbLE-0008LB-Av for help-gnu-emacs@gnu.org; Wed, 22 Jun 2016 02:08:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFbL9-0005ZC-6M for help-gnu-emacs@gnu.org; Wed, 22 Jun 2016 02:08:47 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:57572 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFbL9-0005WN-0S for help-gnu-emacs@gnu.org; Wed, 22 Jun 2016 02:08:43 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1bFbKv-00008p-5F for help-gnu-emacs@gnu.org; Wed, 22 Jun 2016 08:08:29 +0200 In-Reply-To: <871t3pye9j.fsf@ericabrahamsen.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:110546 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Jun 22, 2016 at 01:38:16PM +0800, Eric Abrahamsen wrote: > I'm trying to pad out a string that has had a face applied to it, and > it's not quite going as I'd hoped. In a nutshell: > > (setq ss "bubba") > (put-text-property 0 (length ss) 'face 'my-face ss) > (format "%10s" ss) > > --> #(" bubba" 0 5 (face my-face)) > > I'd like the face to stay with the actual string, not the spaces! Does > text property stickiness have anything to do with this? Does anyone have > any clever tips? This is remarkable. I didn't even know that text properties made it through format (admittedly in a strange way). Learnt something new today :-) regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAldqK10ACgkQBcgs9XrR2kaLlgCeKWgaxjgec2jD4zRnKIowTtV9 vl4An2hzEejXYD356p5U4CXAqWsP5BWg =y28V -----END PGP SIGNATURE-----