New answers tagged

4

@NickD provided a good answer: use a face. OP's comment to Nick's answer says that he'll try to write a function that, given a string, returns a propertized string. Such functions already exist: propertize does that, and so does add-face-text-property. For example: (setq ss (propertize "abcde" 'face '(:foreground "red"))) or (setq ss &...


2

You need to create a string with the appropriate face. You do that by attaching a face text property to the string, giving it value of some face (predefined or defined for the specific purpose - you can look at all the predefined faces with M-x list-faces-display and pick one from there, or you can define your own face). E.g. here's a snippet to use a ...


1

I suspect that the full value is returned, but you are being fooled by printing that elides part of the returned value. Try C-h v print-length, to see how to control such elision. If you don't believe that the returned value is correct (full length), apply function length to it, to see (to the list's car, in this case, or to the final string).


Top 50 recent answers are included