From fdbc4e7f214335e39bddd2842808e0871ef666aa Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 22 Aug 2020 18:35:43 +0200 Subject: Add function to create svg screenshots --- emacs-init.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'emacs-init.org') diff --git a/emacs-init.org b/emacs-init.org index 8995856..c7025e3 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -47,6 +47,7 @@ - [[#bbdb][BBDB]] - [[#compile][Compile]] - [[#context-aware-hydra][Context aware hydra]] + - [[#minor-utilities][Minor utilities]] - [[#language-settings][Language settings]] - [[#spellcheck][Spellcheck]] - [[#interface][Interface]] @@ -5310,6 +5311,23 @@ _q_ quit _r_ remove result _e_ examplify region ("/" ibuffer-filter-disable "disable") ("b" hydra-ibuffer-main/body "back" :color blue)) #+END_SRC +** Minor utilities +*** Screenshots / -casts +[[https://gitlab.com/ambrevar/emacs-gif-screencast][Here]] is a guide to creating emacs gif screencasts. + +If compiled with =cairo= support emacs can directly create svg screenshots ([[https://www.reddit.com/r/emacs/comments/idz35e/emacs_27_can_take_svg_screenshots_of_itself/][source]]). +#+begin_src emacs-lisp +(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))) +#+end_src * Language settings End sentences with single spaces. #+begin_src emacs-lisp -- cgit v1.2.3