emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] insert picture feature request.


From: Russell Adams
Subject: Re: [O] insert picture feature request.
Date: Wed, 4 May 2011 08:19:17 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, May 04, 2011 at 12:01:53PM +0200, Rainer Stengele wrote:

> i_view32.exe /capture=2 /convert=c:\capture_$U(%d%m%Y_%H%M%S).jpg

(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 "i_view32.exe" nil nil nil
                "/capture=2" (concat "/convert=" filename) )
  (insert (concat "[[" filename "]]"))
  (org-display-inline-images))

Does that work? Elisp is formatting the filename based on the Org
buffer you're in and adding a timestamp.

------------------------------------------------------------------
Russell Adams                            address@hidden

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



reply via email to

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