[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] insert picture feature request.
From: |
Mark S. |
Subject: |
Re: [O] insert picture feature request. |
Date: |
Sun, 8 May 2011 11:51:11 -0700 (PDT) |
Additional thought. Having all those pngs in the main directory will get messy.
I would like to put them in a sub-directory like "images". But there doesn't
seem to be an easy way to insert that into (buffer-file-name). I've looked, but
can't seem to be a variable that just holds the current buffer directory. Where
would I start?
Thanks!
Mark
--- On Sun, 5/8/11, Mark S. <address@hidden> wrote:
> From: Mark S. <address@hidden>
> Subject: Re: [O] insert picture feature request.
> To: address@hidden
> Date: Sunday, May 8, 2011, 9:28 AM
> Thanks Aankhen.
>
> That seems to have fixed the technical problem.
> Unfortunately, because of the way irfan works, all I was
> able to get pictures of was the emacs screen! People with
> lots of screen real-estate can have emacs and their target
> application up at the same time, but that doesn't work on my
> older screen.
>
> So instead, I have the code grab whatever is in the
> clipboard and use it. Then if I want a screen capture, I can
> use whatever tool is available. Surfulator has a really nice
> free screen capture. Also, with this approach I can
> right-click on images in the browser, click "copy image" and
> use those images directly.
>
> As for viewing, the only way I know is to export to HTML.
> Ctl-c e b is quick. I vaguely remember that there is a way
> to actually view images inline in Emacs, but its not
> portable or something.
>
> Modified code below.
>
> Thanks!
> Mark
>
> (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 "C:\\Program
> Files\\IrfanView\\i_view32.exe" nil nil nil
>
> "/clippaste" (concat "/convert=" filename) )
> (insert (concat "[[" filename "]]"))
> (org-display-inline-images))
>
>
> --- On Sat, 5/7/11, Aankhen wrote:
>
> > Subject: Re: [O] insert picture feature request.
> >
> > 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
> >
>
>
- Re: [O] insert picture feature request., (continued)
- 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, 2011/05/08
- Re: [O] insert picture feature request., Mark S., 2011/05/08
- Re: [O] insert picture feature request.,
Mark S. <=
- 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