From 25d348673bd6951e5e9f9235dbd4db311e1a0567 Mon Sep 17 00:00:00 2001 From: "vincent@spotify.com" Date: Wed, 28 Aug 2013 17:16:44 +0200 Subject: * added circe to package list (*potential* replacement for rcirc) * added a handy function to retrieve passwords from the OS X keychain --- init-functions.el | 11 +++++++++++ init.el | 1 + 2 files changed, 12 insertions(+) diff --git a/init-functions.el b/init-functions.el index 79a9bddc16c4..b461b2e6a720 100644 --- a/init-functions.el +++ b/init-functions.el @@ -35,6 +35,17 @@ (load file))) +(defun keychain-password (account &optional keychain) + "Returns the password for the account, by default it's looked up in the Login.keychain but a + different keychain can be specified." + (let ((k (if keychain keychain "Login.keychain"))) + (replace-regexp-in-string + "\n" "" + (shell-command-to-string (concat "security find-generic-password -w -a " + account + " " + k))))) + ;; This clones a git repository to 'foldername in .emacs.d ;; if there isn't already a folder with that name (defun custom-clone-git (url foldername) diff --git a/init.el b/init.el index 9281861bb45d..80525b12ccac 100644 --- a/init.el +++ b/init.el @@ -17,6 +17,7 @@ '(ac-nrepl ace-jump-mode browse-kill-ring + circe clojure-mode flycheck flx-ido -- cgit 1.4.1