[Top][All Lists]

[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: Thu, 15 Nov 2001 12:22:05 GMT

address@hidden (Kevin Layer) writes:
> It's a large complex program.  What would you have me do, post the
> whole thing??

No, but since you say the problem occurs when strings are passed to `the
outside world', it would help if you'd show us the code that does the
passing.  For instance, do you do:

   (princ string)

to print the string into a buffer, or perhaps:

   (prin1 string)


The two have very different effects; in particular if you're passing
the string to another program for interpretation, you might use
`prin1', and rely on the emacs lisp syntax for strings being the same
as the external program's syntax for strings.

If you do that, of course, you'll lose, because emacs lisp also has the
notion of a `propertized' string, which has its own syntax (and yet
really is a string).

Removing text properties at the point of output is probably the right
thing to do, since that's the place where the `conversion' to the
syntax of the external program happens.

"I distrust a research person who is always obviously busy on a task."
   --Robert Frosch, VP, GM Research

reply via email to

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