0

here a little example to explain my problem :

How to get "marge" or ("marge") from oef-highlighted-variable ?

oef-highlighted-variable
#("marge" 0 5 (fontified nil face oef-font-variable-name-face))

With replace-regexp-in-string or Is there a better way ?

SOLVED by wasamasa

(substring-no-properties oef-highlighted-variable)
"marge"
0

1 Answer 1

1

This is how Emacs displays a propertized string. It contains of the text "marge", but also has the properties fontified and face applied from position 0 to 5. If you pass it to other string handling functions, it will be handled the same, with the exception of those that look up string properties (such as equal-including-properties which compares them, string-equal however doesn't).

If you're still bothered by this, you can use substring-no-properties to obtain a string without them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.