[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: [Orgmode] Automatic screenshot insertion
From: |
Russell Adams |
Subject: |
[O] Re: [Orgmode] Automatic screenshot insertion |
Date: |
Tue, 29 Mar 2011 09:43:27 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Sun, Nov 28, 2010 at 08:35:23PM +0100, David Maus wrote:
> At Thu, 18 Nov 2010 18:16:22 +0100,
> 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).
> >
>
> Nice. Do you mind of I put the function on Org mode'S wiki (Worg) in
> the "Org hacks" page?[1]
>
> Best,
> -- David
>
> [1] http://orgmode.org/worg/org-hacks.php
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... address@hidden
> Email..... address@hidden
I made a minor change. File names are now generated by using the
current org buffer filename, plus the date and time, and a unique
number. This allows me to sort out the images better.
(defun org-screenshot ()
"Take a screenshot into a time stamped unique-named
file in the same directory as the org-buffer and insert a link to this file."
(interactive)
(setq filename
(concat
(make-temp-name
(concat (buffer-file-name)
"_"
(format-time-string
"%Y%m%d_%H%M%S_")) ) ".png"))
(call-process "import" nil nil nil filename)
(insert (concat "[[" filename "]]"))
(org-display-inline-images))
------------------------------------------------------------------
Russell Adams address@hidden
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] Re: [Orgmode] Automatic screenshot insertion,
Russell Adams <=