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

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

RE: elispQ: How can I extract text from #("text" ... )


From: Drew Adams
Subject: RE: elispQ: How can I extract text from #("text" ... )
Date: Fri, 4 Apr 2008 08:57:22 -0700

> > AFAIK, string= ignores text properties and should do what
> > you want.
> 
> It does work, you are right.  It is that all the extra stuff is really
> not necessary in my application.  And it obscures debugging.

Then I guess your options are to either (1) prevent the string from having a
text property to begin with or (2) remove the text property.

For #1, you need to find where that happens. #2 is straightforward:

 (substring-no-properties string-w-text-props)

Depending on what you are doing, you might alternatively use a print function to
insert text (without faces) in a buffer.:

 (with-output-to-temp-buffer "foo" (princ some-text))

And if you are getting the text from a buffer in the first place, you can use
`buffer-substring-no-properties' instead of `buffer-substring'. See also
`insert-buffer-substring-no-properties'.

HTH






reply via email to

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