emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Dov Grobgeld <dov.grobgeld@gmail.com>
Cc: Bastien <bzg@altern.org>, emacs-orgmode <emacs-orgmode@gnu.org>,
	Jambunathan K <kjambunathan@gmail.com>
Subject: Re: org-edit-file ?
Date: Fri, 22 Jul 2011 00:11:12 +0200	[thread overview]
Message-ID: <871uxjl1xb.fsf@gmx.de> (raw)
In-Reply-To: <CA++fsGHosYJYhyJu0PXEG0J_w4RcXL_e=PBBkep0gHUx66-WJA@mail.gmail.com> (Dov Grobgeld's message of "Thu, 21 Jul 2011 12:42:44 +0300")

[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]

Dov Grobgeld <dov.grobgeld@gmail.com> 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):



[-- Attachment #2: Type: application/emacs-lisp, Size: 122 bytes --]

[-- Attachment #3: Type: text/plain, Size: 75 bytes --]



....and don't forget to share the results :)


Best wishes

   Sebastian

  parent reply	other threads:[~2011-07-21 22:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 14:26 org-edit-file ? Dov Grobgeld
2011-07-20 17:15 ` Jambunathan K
2011-07-21  9:32   ` Bastien
2011-07-21  9:42     ` Dov Grobgeld
2011-07-21 10:54       ` Jambunathan K
2011-07-21 22:11       ` Sebastian Rose [this message]
2011-07-21 23:50         ` Jambunathan K

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=871uxjl1xb.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=bzg@altern.org \
    --cc=dov.grobgeld@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@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 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).