From: Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com>
To: Vitalie Spinu <spinuvit@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Help, I need to paste raw image from clipboard into emacs/orgmode
Date: Fri, 7 Jun 2013 20:15:15 +0200 [thread overview]
Message-ID: <CANtbJLEX3yepL=SuQG0RmUnhRr_LXLFXYoVdVNePqk4P8Ew7-Q@mail.gmail.com> (raw)
In-Reply-To: <87obbiferr.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]
(defun my-org-insert-clipboard ()
(interactive)
(let* ((image-file "clipboard.png")
(exit-status
(call-process "convert" nil nil nil
"clipboard:" image-file)))
(org-insert-link nil (concat "file:" image-file) "")
(org-display-inline-images)))
That works for me (Emacs 24.3, Windows 7) though for practical use some
more edge case handling ("don't insert on failure", "different name if file
exists") will be wanted.
kind regards, Klaus
2013/6/7 Vitalie Spinu <spinuvit@gmail.com>
>
> Thanks for the tip. Do you have an elisp piece that handles the image
> insertion into org buffers?
>
> Thanks,
>
> Vitalie
>
> >> Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com>
> >> on Thu, 6 Jun 2013 19:16:26 +0200 wrote:
>
> > 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
>
> > Hello!
>
> > While the original poster probably long since has implemented one of the
> > previously suggested solutions (or given up) I thought I'd share a more
> general
> > solution I found [1].
>
> > ImageMagick's `convert' can use clipboard: as input file (don't know if
> it works
> > as output file).
>
> > convert clipboard: FILENAME-WITH-EXTENSION
>
> > I tested it with the cygwin and native windows versions and both worked.
>
> > king regards, Klaus
>
> > PS1: On Windows `convert.exe' might be shadowed by another executable,
> > especially C:\Windows\System32\convert.exe. In that case the PATH
> variable
> > should be adjusted such that ImageMagick comes before
> C:\Windows\system32. To
> > check what shadows the executable, you can run "where convert" in the
> > Windows-commandline.
> > PS2: On Windows only basic image-displaying-support is included
> out-of-the-box.
> > To get full support, the easiest way is to install the full GnuWin32
> tools
> > (which include the necessary image libraries) with the web-installer.
>
> > ------
>
> > [1] User "magick" in
> >
> http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=7524&p=22859
> .
>
>
[-- Attachment #2: Type: text/html, Size: 3713 bytes --]
next prev parent reply other threads:[~2013-06-07 18:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 17:16 Help, I need to paste raw image from clipboard into emacs/orgmode Klaus-Dieter Bauer
2013-06-07 9:31 ` Vitalie Spinu
2013-06-07 18:15 ` Klaus-Dieter Bauer [this message]
2013-11-06 15:28 ` Alexander Vorobiev
-- strict thread matches above, loose matches on Subject: below --
2011-07-20 14:59 Medhat Essmat
2011-07-24 18:26 ` suvayu ali
2011-07-24 20:11 ` Rainer Stengele
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANtbJLEX3yepL=SuQG0RmUnhRr_LXLFXYoVdVNePqk4P8Ew7-Q@mail.gmail.com' \
--to=bauer.klaus.dieter@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=spinuvit@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.