Emacs Lisp: quickly insert Openstreetmap location link

Emacs Lisp: quickly insert Openstreetmap location link

This function asks the user for location, opens the Openstreetmap and inserts the link into buffer. Imagine you wish to tell your friends where you are located, so you need to give them some pointers.

It will not always work as expected, but you still have the option to find the right link and yank it back into the Emacs buffer.

(defun osm-location ()
  "The function asks for location, searches the location at
OpenStreetMaps and inserts link to the location into buffer"
  (interactive)
  (let* ((location (read-from-minibuffer "Location?"))
         (url (format "http://www.openstreetmap.org/search?query=%s#map=9" location)))
    (insert url)
    (browse-url url)))

Do not get lost!

Leave Your Comment or Contact GNU.Support

Contact GNU.Support now. There is a simple rule at GNU.Support: if we can help you, we do, whenever and wherever necessary, and it's the way we've been doing business since 2002, and the only way we know


Full name:


E-mail:


Message: