From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan BISSON Subject: Automatic screenshot insertion Date: Thu, 18 Nov 2010 18:16:22 +0100 Message-ID: <4CE55F66.80802@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=58605 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ7uh-0007VY-3z for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 12:04:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ7uU-0005ls-9Q for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 12:04:35 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:51871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ7uT-0005li-V2 for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 12:04:34 -0500 Received: by wwc33 with SMTP id 33so3644361wwc.30 for ; Thu, 18 Nov 2010 09:04:32 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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) ) Cheers,