diff options
| author | fpi | 2020-08-22 18:35:43 +0200 | 
|---|---|---|
| committer | fpi | 2020-08-23 12:55:55 +0200 | 
| commit | fdbc4e7f214335e39bddd2842808e0871ef666aa (patch) | |
| tree | bb286d897d8a4014b9cf0b0f4ecba2498e10b0b1 | |
| parent | Set ox-icalendar to always create ids for caldav (diff) | |
Add function to create svg screenshots
| -rw-r--r-- | emacs-init.org | 18 | 
1 files changed, 18 insertions, 0 deletions
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  | 
