[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] insert picture feature request.
From: |
Aankhen |
Subject: |
Re: [O] insert picture feature request. |
Date: |
Sun, 8 May 2011 09:59:15 +0530 |
Hullo,
On Sun, May 8, 2011 at 03:03, Mark S. <address@hidden> wrote:
> This is very close ... I think. The problem is that the file name needs to be
> formatted for Windows. Currently its formatted using 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, irfan will
> complain that it doesn't recognize the file type. In other languages I could
> figure out how to do the replace sequence, but it would take me awhile in
> lisp. Is there a quick fix?
I believe ‘convert-standard-filename’ 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=2" (concat "/convert=" filename) )
| (insert (concat "[[" filename "]]"))
| (org-display-inline-images))
`----
Seems to work here, although I’m unable to get the resulting image to
display inline.
Aankhen
- [O] insert picture feature request., Piter_, 2011/05/02
- Re: [O] insert picture feature request., Russell Adams, 2011/05/02
- Re: [O] insert picture feature request., brian powell, 2011/05/02
- Re: [O] insert picture feature request., Mark S., 2011/05/03
- Re: [O] insert picture feature request., Russell Adams, 2011/05/04
- Re: [O] insert picture feature request., Mark S., 2011/05/07
- Re: [O] insert picture feature request.,
Aankhen <=
- Re: [O] insert picture feature request., Mark S., 2011/05/08
- Re: [O] insert picture feature request., Mark S., 2011/05/08
- Re: [O] insert picture feature request., Nick Dokos, 2011/05/08
- Re: [O] insert picture feature request., Mark S., 2011/05/08
- Re: [O] insert picture feature request., Aankhen, 2011/05/16
- Re: [O] insert picture feature request., Stinky Wizzleteet, 2011/05/25
- Re: [O] insert picture feature request., Rainer Stengele, 2011/05/04