unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* format padding and text properties
@ 2016-06-22  5:38 Eric Abrahamsen
  2016-06-22  6:08 ` tomas
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2016-06-22  5:38 UTC (permalink / raw)
  To: help-gnu-emacs

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?

Using Emacs git...

Thanks!
Eric




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-23  6:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1975.1466573922.1216.help-gnu-emacs@gnu.org>
2016-06-22  8:20 ` format padding and text properties Lars Magne Ingebrigtsen
2016-06-22  8:38   ` Eric Abrahamsen
2016-06-22 15:03     ` Eli Zaretskii
2016-06-22 15:10       ` Eric Abrahamsen
2016-06-22  5:38 Eric Abrahamsen
2016-06-22  6:08 ` tomas
2016-06-22  8:06   ` Eric Abrahamsen
2016-06-22  8:21     ` tomas
2016-06-22 15:05   ` Eli Zaretskii
2016-06-23  6:30     ` tomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).