Using this reddit post as inspiration, I am trying to create a
screenshot-svg command using the following config:
(defun screenshot-svg () "Save a screenshot of the current frame as an SVG image. Saves to a temp file and puts the filename in the kill ring." (interactive) (let* ((filename (make-temp-file "Emacs" nil ".svg")) (data (x-export-frames nil 'svg))) (with-temp-file filename (insert data)) (kill-new filename) (message filename)))
However, when I try to run the
screenshot-svg command, I get the message
let*: Symbol’s function definition is void: x-export-frames, and nothing seems to happen. How do I check if
x-export-frames is available on my build? What do I need to do to get this working? Are there any other ways to get svg screenshots on emacs?
EDIT: I am using OSX, so I am also wondering if Cairo, or something similar is available for OSX?