From 767b5c276e9e762e230aa9e0574b295b454feb26 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 11 Apr 2013 10:40:05 -0700 Subject: [PATCH 1/2] Added caching to find-file-in-project. --- elpa/find-file-in-project-3.2/find-file-in-project.el | 9 ++++++++- init.el | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/elpa/find-file-in-project-3.2/find-file-in-project.el b/elpa/find-file-in-project-3.2/find-file-in-project.el index fcbd050c..b90a676e 100644 --- a/elpa/find-file-in-project-3.2/find-file-in-project.el +++ b/elpa/find-file-in-project-3.2/find-file-in-project.el @@ -139,6 +139,13 @@ directory they are found in so that they are unique." root (ffip-join-patterns) ffip-find-options ffip-limit)))))) +(defvar ffip-project-files-cache '()) + +(defun ffip-get-project-files () + (when (equal (assoc (ffip-project-root) ffip-project-files-cache) nil) + (add-to-list 'ffip-project-files-cache `(,(ffip-project-root) ,(ffip-project-files)))) + (car (cdr (assoc (ffip-project-root) ffip-project-files-cache)))) + ;;;###autoload (defun find-file-in-project () "Prompt with a completing list of all files in the project to find one. @@ -147,7 +154,7 @@ The project's scope is defined as the first directory containing an `.emacs-project' file. You can override this by locally setting the variable `ffip-project-root'." (interactive) - (let* ((project-files (ffip-project-files)) + (let* ((project-files (ffip-get-project-files)) (files (mapcar 'car project-files)) (file (if (and (boundp 'ido-mode) ido-mode) (ido-completing-read "Find file in project: " files) diff --git a/init.el b/init.el index b8a85845..734e61cf 100644 --- a/init.el +++ b/init.el @@ -58,6 +58,9 @@ ;; Disable the menu bar. (menu-bar-mode -1) +;; find-file-in-project +(setq ffip-limit 9999999999) + ;; ============================================================================= ;; tmux ;; ============================================================================= From 83bb775e38712f649672d71b374c6763b2fe57f9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 25 Apr 2013 16:35:51 -0700 Subject: [PATCH 2/2] Added emacs-testify Conflicts: init.el --- .gitmodules | 3 +++ init.el | 18 ++++++++++-------- lisp/emacs-testify | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) create mode 160000 lisp/emacs-testify diff --git a/.gitmodules b/.gitmodules index 51d2cf4d..9c282b7f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "themes/solarized"] path = themes/solarized url = git@github.com:sellout/emacs-color-theme-solarized.git +[submodule "lisp/emacs-testify"] + path = lisp/emacs-testify + url = git@github.com:IvanMalison/emacs-testify.git diff --git a/init.el b/init.el index 734e61cf..9232e968 100644 --- a/init.el +++ b/init.el @@ -20,7 +20,8 @@ (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/zenburn") (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/solarized") -(load-theme 'solarized-dark t) +(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") +(load-theme 'zenburn t) ;; ============================================================================= ;; General Emacs Options @@ -96,12 +97,9 @@ ;; Multi-lining for python. (require 'multi-line-it) +(require 'emacs-testify) -(defun python-tabs () - (setq tab-width 4 - indent-tabs-mode t - python-indent-offset 4 - (subword-mode t))) +(add-hook 'python-mode-hook (lambda () (subword-mode 1))) ;; ============================================================================= ;; Custom Key Bindings @@ -116,10 +114,13 @@ ;; Miscellaneous (global-set-key "\C-x\C-b" 'buffer-menu) (global-set-key "\C-xw" 'whitespace-mode) +(global-set-key "\C-cw" 'tmux-copy) (global-set-key "\C-x\C-r" (lambda () (interactive) (revert-buffer t t))) (global-set-key "\C-c\C-c" 'comment-region) (global-set-key (kbd "C-c w") 'tmux-copy) (global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1))) +(global-set-key "\C-ct" 'testify-run-test) +(global-set-key "\C-c\C-t" 'testify-run-case) ;; Something will occasionally override this binding. (global-set-key "\C-cg" 'rope-goto-definition) @@ -226,6 +227,7 @@ '(background-color "#ffffd7") '(background-mode light) '(cursor-color "#626262") - '(custom-safe-themes (quote ("fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "36a309985a0f9ed1a0c3a69625802f87dee940767c9e200b89cdebdb737e5b29" default))) + '(custom-safe-themes (quote ("762d33a7e24260c48c6b16381d013bf86d8a0fd918700c702f35d0c7ee59b689" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "36a309985a0f9ed1a0c3a69625802f87dee940767c9e200b89cdebdb737e5b29" default))) '(fci-rule-color "#383838") - '(foreground-color "#626262")) + '(foreground-color "#626262") + '(safe-local-variable-values (quote ((python-indent . tab-width) (whitespace-line-column . 80) (lexical-binding . t))))) diff --git a/lisp/emacs-testify b/lisp/emacs-testify new file mode 160000 index 00000000..72809658 --- /dev/null +++ b/lisp/emacs-testify @@ -0,0 +1 @@ +Subproject commit 72809658f15c37ee99c3a3e210463ffce34da662