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.gue...@wikimedia.fr> wrote: > Hi Marcelo, > > Marcelo de Moraes Serpa <celose...@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 > _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode