[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Automatic screenshot insertion
From: |
Sébastien Vauban |
Subject: |
[Orgmode] Re: Automatic screenshot insertion |
Date: |
Thu, 18 Nov 2010 18:50:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
Hi Jonathan,
Jonathan BISSON wrote:
> 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)
> )
I find this to be a very smart idea. Maybe I'll never need it, but well
thought!
BTW, ImageMagick exists for Windows as well, so it just needs =import= to be
in the path of executables...
Best regards,
Seb
--
Sébastien Vauban