![]() (shell-command ( concat "pngpaste " file)) (make-directory ( file-name-directory file))) (unless ( file-exists-p ( file-name-directory file)) ( concat (s-replace " " "_" ( downcase ( nth 4 (org-heading-components)))) "_-_") (if (bound-and-true-p my/insert-clipboard-image-use-headername) ( downcase (file-name-sans-extension ( buffer-name)))) "_-_") (if (bound-and-true-p my/insert-clipboard-image-use-buffername) (defun my/insert-clipboard-image (filename) (setq my/insert-clipboard-image-use-buffername t) filename: _-_-_.png Full name format filename: _-_-_-_.png (setq my/insert-clipboard-image-use-headername t) filename: _-_-_.png Include the buffername as part of the image name. The default name format of the pasted image is: filename: _-_.png Important - This function depends on 'pngpaste' to paste the clipboard image -> $ brew install pngpaste Basic Customization - Include the current Org-mode header as part of the image name. images directory will be created relative to the current Org-mode document to store the images. Default extension for the pasted filename is. Overview - Inserts an image from the clipboard by prompting the user for a filename.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |