OS Debian GNU/Linux 7 emacs-24.3
I want to save the content of the clipboard or the last item of the kill-ring (depending whats newer) as a string so that I can do stuff with it in a eLisp function. At the moment I use this:
(setq zwischenablage (car kill-ring))
I have 2 problems at the moment:
- When the text was copied in emacs and was highlighted something like "#("Wechseln" 0 8 (fontified t face font-lock-doc-face))" is saved in the string. For some reason yank-handled-properties seems not to be applied.
- When I copy text from outside emacs like the browser or so it is not used. I have to yank it and after this my function works fine.
Does anyone know any solution for these problems?
(setq zwischenablage (current-kill 0 t))
. gnu.org/software/emacs/manual/html_node/elisp/…