From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell Adams Subject: Re: insert picture feature request. Date: Wed, 4 May 2011 08:19:17 -0500 Message-ID: <20110504131917.GD2970@x201> References: <20110502132832.GD18788@x201> <697177.63928.qm@web32004.mail.mud.yahoo.com> <4DC12411.6050000@diplan.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHbzB-00026s-3L for emacs-orgmode@gnu.org; Wed, 04 May 2011 09:19:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHbz9-0004Rr-Iw for emacs-orgmode@gnu.org; Wed, 04 May 2011 09:19:25 -0400 Received: from jack.asmallorange.com ([74.52.119.82]:36459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHbz9-0004Rc-G7 for emacs-orgmode@gnu.org; Wed, 04 May 2011 09:19:23 -0400 Content-Disposition: inline In-Reply-To: <4DC12411.6050000@diplan.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer Stengele Cc: emacs-orgmode@gnu.org, "Mark S." 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 RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3