From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: Help, I need to paste raw image from clipboard into emacs/orgmode Date: Sun, 24 Jul 2011 22:11:10 +0200 Message-ID: <4E2C7C5E.9020307@online.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ql517-0007Li-1n for emacs-orgmode@gnu.org; Sun, 24 Jul 2011 16:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ql516-0007Ou-2J for emacs-orgmode@gnu.org; Sun, 24 Jul 2011 16:11:13 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:56466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ql515-0007OM-Gl for emacs-orgmode@gnu.org; Sun, 24 Jul 2011 16:11:11 -0400 In-Reply-To: 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: Medhat Essmat Cc: emacs-orgmode@gnu.org Am 20.07.2011 16:59, schrieb Medhat Essmat: > Dear All, > > Please Help, > > I need to paste raw image from clipboard into emacs/orgmode, I am a microsoft onenote user and I got used to take a lot of snapshots and embed it into my notes, I think if I could know how to embed images directly into emacs/orgmode from clipboard, I will switch to emacs very easily. > > > I searched the internet but unfortunately I didn't find the answer, > > Thanks a lot. > Dodo Dear Dodo, check this for Windows: --------------------------------------------------------------------------------------------------------------- The better approach seems to be to take the screenshot image from the clipboard. Therefore any screenshot tool will do. This works for me under Windows XP: (I had to introduce the tilde-buffer-filename variable for irfanview to work) (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 tilde-buffer-filename (replace-regexp-in-string "/" "\\" (buffer-file-name) t t)) (setq filename (concat (make-temp-name (concat tilde-buffer-filename "_" (format-time-string "%Y%m%d_%H%M%S_")) ) ".jpg")) ;; Linux: ImageMagick: (call-process "import" nil nil nil filename) ;; Windows: Irfanview (call-process "c:\\Programme\\IrfanView\\i_view32.exe" nil nil nil (concat "/clippaste /convert=" filename)) (insert (concat "[[file:" filename "]]")) (org-display-inline-images)) So this is how it works: 1. take a screenshot with any tool you are used to use 2. change to your org buffer and call "org-screenshot" via M-x Instead of ".jpg" you can use any format IrfanView understands, for example "png". Very useful! -- Rainer --------------------------------------------------------------------------------------------------------------- Check the corrsponding gmane thread with subject "insert picture feature request." -- Rainer