emacs-devel
[Top][All Lists]
Advanced

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

Re: buffer-substring vs. buffer-substring-no-properties


From: Miles Bader
Subject: Re: buffer-substring vs. buffer-substring-no-properties
Date: 16 Nov 2001 01:56:55 +0900

Kevin Layer <address@hidden> writes:
> >> We made this change deliberately, thinking of it as repairing something
> >> broken.  The idea is that colors, fonts, etc. should not be lost.
> 
> I said in a later reply that I thought format was more for human
> readable formatted output, and if this is the case (that's a big
> `if'), then the change doesn't make sense to me.

It's _because_ it's for human consumption that colors &c should be preserved!

If you do (insert (format "%s" (propertize "foo" 'face 'bold))), you'll
get a bold string inserted into the buffer.  How else do you expect it
to work?

As far as I can tell, the only time any `problem' occurs is if you use
one of the lisp commands such as `prin1' to print the result of calling
format, in which case it will explicitly print the lisp reader syntax
for the formatted string -- which is correct, because then it can be
read in again by lisp.

If you expect the result to look like a string in some other language,
you will be disappointed, because lisp's syntax is not exactly the same
as other languages, even if it's often the same.

-Miles
-- 
`The suburb is an obsolete and contradictory form of human settlement'



reply via email to

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