emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Automatic screenshot insertion


From: Jonathan BISSON
Subject: [Orgmode] Automatic screenshot insertion
Date: Thu, 18 Nov 2010 18:16:22 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Lanikai/3.1.6

Here is a little function that allows a user to insert a screenshot easily. Only works on unix-like systems where ImageMagick is installed (adapt "import" to your screenshot program if needed).



(defun my-screenshot ()
"Take a screenshot into a unique-named file in the current buffer file directory and insert a link to this file."

 (interactive)
 (setq filename
  (concat
   (make-temp-name
    (file-name-directory (buffer-file-name))
   )
   ".jpg"
  )
 )

 (call-process "import" nil nil nil filename)
 (insert (concat "[[" filename "]]"))
 (org-display-inline-images)
)




Cheers,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]