From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Mikhanosha Subject: Re: RFQ - new contribution - org-screenshot.el Date: Mon, 20 May 2013 20:14:16 -0400 Message-ID: <87y5b9dw9z.wl%max@openchat.com> References: <87mwru8f57.wl%max@openchat.com> <20130520184548.GL26045@cardamom.adamsinfoserv.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeaDa-0007BU-Ex for emacs-orgmode@gnu.org; Mon, 20 May 2013 20:14:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeaDZ-0003xt-K8 for emacs-orgmode@gnu.org; Mon, 20 May 2013 20:14:18 -0400 Received: from openchat.com ([75.99.81.170]:58199 helo=momoland.openchat.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeaDZ-0003xe-GQ for emacs-orgmode@gnu.org; Mon, 20 May 2013 20:14:17 -0400 Received: from momoland.openchat.com (localhost [127.0.0.1]) by momoland.openchat.com (Postfix) with ESMTP id 73C35EA0EE for ; Mon, 20 May 2013 20:14:16 -0400 (EDT) In-Reply-To: <20130520184548.GL26045@cardamom.adamsinfoserv.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org At Mon, 20 May 2013 13:45:48 -0500, Russell Adams wrote: > I use this for all screenshots. This inserts a link named by buffer > with a timestamp appended using the Imagemagick import utility, where > I can just click a window or drag an area. > > (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 (concat (make-temp-name (concat (buffer-file-name) "_" (format-time-string "%Y%m%d_%H%M%S_")) ) ".png")) > (call-process "import" nil nil nil filename) > (insert (concat "[[" filename "]]"))) > > What advantages would org-screenshot provide by comparison? I started with the similar function. To me the most useful feature is actually "screenshot rotation" shortcuts, that cycle image before point, with other files in the `(org-screenshot-image-directory)'. Taking screenshot itself and inserting link is simple I agree. Maybe that rotation code can be uplifted into Org itself , because I think its probably useful for people working with a lot of image links, not just screenshots. Another is specifying screenshot delay by C-u prefix (C-u C-u C-u -> 3 seconds), for making screenshot of menus. I would love to add more to it, but don't have time. If someone wants to hack on it, you welcome :-) Some ideas are: 1. Allow customizing the screenshot program used, ie like imagemagic 2. Option to automatically rotate when taking a screenshot, and the first thing before point is already an image 3. Command to enter crop mode, where you would press arrow keys (or jklh) and it would crop the displayed image only (emacs supports that in properties), and then on RET will use image manipulation program to crop it 4. Have ability to inject screenshot via emacsclient, so that you can bind a global shortcut instead, it feels silly to go to emacs to take screenshot.. I prefer to make lots of screenshot first, and then use rotate keys to select ones I like most Regards, Max