From a6486abd8b4f7e47884bf324ac7fcb7b76d4e260 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 16 Nov 2015 16:42:04 +0100 Subject: Emacs: Monitor location and set lat/long (OSX) --- tag-emacs/emacs.d/init.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 4dcbe057..b832b037 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -840,6 +840,19 @@ Sometimes I want to insert a date or time into a buffer. ** Time of Day +#+BEGIN_SRC emacs-lisp + (req-package osx-location + :if (eq system-type 'darwin) + :config (progn + (add-hook 'osx-location-changed-hook + (lambda () + (setq calendar-latitude osx-location-latitude + calendar-longitude osx-location-longitude + calendar-location-name (format "%s, %s" osx-location-latitude osx-location-longitude)) + (rase-start))) + (osx-location-watch))) +#+END_SRC + #+BEGIN_SRC emacs-lisp (req-package rase :config (progn -- cgit 1.4.1