Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get content of the kill-ring

Tags:

emacs

elisp

So I have copied something to the ring:

(car kill-ring) ; #("foo" 0 4 (fontified t))

Then how do I get the main content this text property, namely the string "foo"?

like image 408
deprecated Avatar asked Jul 29 '12 21:07

deprecated


Video Answer


1 Answers

You can remove all properties from a text string with substring-no-properties:

(substring-no-properties (car kill-ring))
like image 108
Juancho Avatar answered Nov 06 '22 18:11

Juancho