![]() (call-process "import" nil nil nil filename)) (call-process "screencapture" nil nil nil "-i" filename)) (make-directory (file-name-directory filename))) (unless (file-exists-p (file-name-directory filename)) It now places screenshots in a subdirectory, creates the directory if required, and only inserts the link into emacs if the image was actually created (i.e., does nothing if you hit ESC). I have recently improved on the script a little. (call-process "screencapture" nil nil nil "-i" filename) (concat (file-name-nondirectory (buffer-file-name)) I also find it more convenient to use a relative path for the link rather than the absolute. The import command was not working for me, so I swapped it to screencapture with an -i argument. The following compliments Assem's answer. (call-process "import" nil nil nil filename)įor OS X users. Same directory as the org-buffer and insert a link to this file." ![]() "Take a screenshot into a time stamped unique-named file in the The exact functionality you want isn't currently implemented, but I would be skeptical of saving lots of images into a research log if your opinion is that you "definitely don't want to save them."Īnyways, the functionality you desire has been expressed in the org-mode mailing list a couple of times in recent years - first link includes some code to launch a screenshot utility (via ImageMagick) to save the file and insert an inline link in your org-mode buffer.Īs stated in that thread, the code was improved upon and added to org-mode hacks page - which has lots of useful gems:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |