From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: [Orgmode] Automatic screenshot insertion Date: Mon, 06 Jun 2011 20:59:16 +0200 Message-ID: <87lixerdkr.wl%dmaus@ictsoc.de> References: <4CE55F66.80802@gmail.com> <87vd3hmebo.wl%dmaus@ictsoc.de> <20110329144327.GE2902@x201> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Mon_Jun__6_20:59:16_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTf1H-0002Ge-Rr for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 14:59:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTf1F-00083U-KP for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 14:59:23 -0400 Received: from mail.xlhost.de ([213.202.242.118]:59552 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTf1F-00083L-4u for emacs-orgmode@gnu.org; Mon, 06 Jun 2011 14:59:21 -0400 In-Reply-To: <20110329144327.GE2902@x201> 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: Russell Adams Cc: emacs-orgmode@gnu.org --pgp-sign-Multipart_Mon_Jun__6_20:59:16_2011-1 Content-Type: text/plain; charset=US-ASCII At Tue, 29 Mar 2011 09:43:27 -0500, Russell Adams wrote: > 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)) > Thanks, I update the function on Worg. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Mon_Jun__6_20:59:16_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iF4EABEIAAYFAk3tI4QACgkQma24O1pEeOaq7wD/RKuC+lFOzwYi3PnlkiUQs1NL ogi9fUb2niDHwqV3wikA/RNuevLBNIaJmnFTGuarwSAuAeZPtd9PjJyjA3ZMnjF/ =oLjB -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Jun__6_20:59:16_2011-1--