From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: insert picture feature request. Date: Sun, 8 May 2011 09:59:15 +0530 Message-ID: References: <20110504131917.GD2970@x201> <163798.45474.qm@web32007.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIvce-0002mM-Rr for emacs-orgmode@gnu.org; Sun, 08 May 2011 00:29:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIvcd-0000re-VG for emacs-orgmode@gnu.org; Sun, 08 May 2011 00:29:36 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:48713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIvcd-0000ra-RS for emacs-orgmode@gnu.org; Sun, 08 May 2011 00:29:35 -0400 Received: by vxk20 with SMTP id 20so6260108vxk.0 for ; Sat, 07 May 2011 21:29:35 -0700 (PDT) In-Reply-To: <163798.45474.qm@web32007.mail.mud.yahoo.com> 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: "Mark S." , Russell Adams , emacs-orgmode@gnu.org Hullo, On Sun, May 8, 2011 at 03:03, Mark S. wrote: > This is very close ... I think. The problem is that the file name needs t= o be formatted for Windows. Currently its formatted =C2=A0using unix style = forward slashes. The file name that is passed to irfan in the call process = needs to be formatted with Windows style backslashes. Without this fix, irf= an will complain that it doesn't recognize the file type. In other language= s I could figure out how to do the replace sequence, but it would take me a= while in lisp. Is there a quick fix? I believe =E2=80=98convert-standard-filename=E2=80=99 should do it: ,---- | (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 | (convert-standard-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=3D2" (concat "/convert=3D" filename) ) | (insert (concat "[[" filename "]]")) | (org-display-inline-images)) `---- Seems to work here, although I=E2=80=99m unable to get the resulting image = to display inline. Aankhen