emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Yet another way to use maps --- the light way


From: Sebastian Rose
Subject: Re: [Orgmode] Re: Yet another way to use maps --- the light way
Date: Thu, 23 Sep 2010 22:10:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Memnon Anon <address@hidden> writes:
> Hi,
>
> Sebastian Rose <address@hidden> writes:
>
>> there is a light and easy way to use google and openstreetmap.org maps
>> if you define them as a custom link type:
>>
>> (setq org-link-abbrev-alist
>>   '(("gmap"
>>      . "http://maps.google.com/maps?q=%s";)
>>     ("omap"
>>       . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1";)))
>>
>> Now
>>   [[gmap:Falkenstr 10, Hannover, Germany][Falkenstraße]]
>>
>> and
>>   [[omap:Falkenstr 10, Hannover, Germany]]
> [...]
>
> This works fine for viewing in an external browser like conkeror or ff,
> but fails for me in emacs w3m.
>
> Memnon


Yes.  For this to work, you'd to do something like this (untested):


(defun org-follow-gmap-link (path)
  "Follow a google-map link when clicked."
  (browse-url-mozilla
   (concat "http://maps.google.com/maps?q="; path)))

(org-add-link-type "gmap" 'org-follow-gmap-link nil)


(defun org-follow-omap-link (path)
  "Follow a osm-map link when clicked."
  (browse-url-mozilla
   (concat
    "http://nominatim.openstreetmap.org/search?q=";
    path "&polygon=1")))

(org-add-link-type "omap" 'org-follow-omap-link nil)




HTH

   Sebastian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]