bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

princ does not preserve text properties


From: Kevin Rodgers
Subject: princ does not preserve text properties
Date: Wed, 24 Sep 2003 12:41:53 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

`princ' is used to print objects without quoting, which is the
recommended way to generate output that looks nice for humans (according
to the Output Functions node of the Emacs Lisp manual).  But outputting
strings that have text properties to a buffer with `princ' does not
preserve them.

For example, wouldn't it be nice if this worked:

(with-output-to-temp-buffer "*Foo Bar*"
  (princ (propertize "foo: bar" 'face 'bold))
  (terpri))

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]