emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcelo de Moraes Serpa <celoserpa@gmail.com>
To: Bastien <bastien.guerry@wikimedia.fr>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Extending paste to auto-archive a copied image
Date: Fri, 11 Feb 2011 13:57:34 -0600	[thread overview]
Message-ID: <AANLkTikhizx-QJAXhi_kveD-6BouBOD4ObouVsB=B9P6@mail.gmail.com> (raw)
In-Reply-To: <87sjvuvlhx.fsf@gnu.org>

Hi Bastien,

Let's say I copy a file from my desktop. If I copy it (C-c) and then
yank into emacs, the filename is pasted.

Now, if I drag and drop it into an emacs buffer, emacs inserts the
contents of the file.

These two scenarios sum up something I think would be an awesome
addition to org, if only we could handle them differently.

For example, when taking notes in org, I often have different
reference sources open (web pages, word documents, pdfs etc), and
would like to insert images. I can already do that manually, and emacs
will even render them. But it takes too much time, and gets me out of
my productive zone.

What I am suggesting is, somehow hook into the moment the file is
pasted/dragged and run some code. This code would get a reference to
the file/contents of the file, save it in a org data directory and
return a URL to it, which would then be pasted in the document like a
regular link, and then iimage-mode would come into action and render
it.

Thanks,

Marcelo.

On Fri, Feb 11, 2011 at 5:50 AM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Hi Marcelo,
>
> Marcelo de Moraes Serpa <celoserpa@gmail.com> writes:
>
>> So, I'm usign an emacs extension that renders links to image as the
>> image itself, it's a minor mode called iimage.el. It works great, but
>> the fact that I need to copy the image somewhere first is a time and
>> flow - killer. Is it possible to hook up to the paste command and, if
>> it's a image in the clipboard, auto-archive somewhere in the
>> filesystem it and then return its URL?
>
> Sorry I don't understand.  Can you give an example?  When you say
> "paste", is it pasting from X or from Emacs?
>
> Thanks,
>
> --
>  Bastien
>

  reply	other threads:[~2011-02-11 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 16:38 Extending paste to auto-archive a copied image Marcelo de Moraes Serpa
2011-01-12 20:09 ` Marcelo de Moraes Serpa
2011-02-11 11:50 ` Bastien
2011-02-11 19:57   ` Marcelo de Moraes Serpa [this message]
2011-02-12 11:25     ` Bastien
2011-02-12 22:22       ` Marcelo de Moraes Serpa
2011-10-04 18:46         ` [Orgmode] " Marcelo de Moraes Serpa

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTikhizx-QJAXhi_kveD-6BouBOD4ObouVsB=B9P6@mail.gmail.com' \
    --to=celoserpa@gmail.com \
    --cc=bastien.guerry@wikimedia.fr \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).