From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: org-edit-file ? Date: Fri, 22 Jul 2011 00:11:12 +0200 Message-ID: <871uxjl1xb.fsf@gmx.de> References: <81y5zshnzx.fsf@gmail.com> <878vrst1wc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qk1SV-0006Rp-CK for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 18:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qk1SU-0006CJ-5V for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 18:11:07 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:56743) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qk1ST-0006C6-Ow for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 18:11:06 -0400 In-Reply-To: (Dov Grobgeld's message of "Thu, 21 Jul 2011 12:42:44 +0300") 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: Dov Grobgeld Cc: Bastien , emacs-orgmode , Jambunathan K --=-=-= Content-Type: text/plain Dov Grobgeld writes: > I'm not sure that emacs is the best tool to e.g. generate a template png > file of a given size and given background, or a svg file. I still don't feel > that any of the proposed solutions solves the file:foo.svg edit scenario, > where foo.svg does not exist yet. Also I would rather differentiate between > opening a few for viewing and opening a file for editing, as e.g. eog and > inkview are good for viewing, whereas gimp and inkscape are better for > editing. I used to do what you request on a dayly base creating SVGs from GPX-Data. I Use a special link type: [[track:((12.0399212 14.919293)(32.12394 15.342345))FILE.svg][Name of track]] See https://github.com/SebastianRose/org-osm/blob/de4634518c8dd7713ff702412cfc7ae89852a074/org-osm-link.el and follow the function `osm-org-link-follow'. If the SVG-Map for the track does not exist, it calls code from https://github.com/SebastianRose/org-osm/blob/de4634518c8dd7713ff702412cfc7ae89852a074/osm-maps.el to create it. It's seems a bit complicated in that example, as the name and size of the resulting SVG image depends on the area, customized zoom factor a.s.o. but this second file boils down to approx. 50 lines for your use case. Either a PNG (not tested for a long time - I don't think it works....) or an SVG (I use this on a dayly basis) is created, depending on your choice. You'll need image-magick to create PNGs while SVG is a simple text (XML) format, so emacs should be as good as any tool to create it. The track is drawn on top of background-images I download from Openstreetmap.org (customize google-maps if you like those better) in the function `osm-draw-track'. That's where your SVG-template would come to life. Once that file exists, it's easy to open it an editor. The function mentioned first calls `osm-org-image-viewer-function' which in turn opens the prepared image: In your case (provided inkscape is in your path): --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (setq osm-org-image-viewer-function (lambda (filename) (call-process \"inkscape\" nil 0 nil filename))) --=-=-= Content-Type: text/plain ....and don't forget to share the results :) Best wishes Sebastian --=-=-=--