 ;;; Files in current dir
 (defvar anything-c-source-files-in-current-dir
   '((name . "Files from Current Directory")
-    (init . (lambda () (setq anything-c-default-directory default-directory)))
-    (candidates . (lambda () (directory-files anything-c-default-directory)))
-    (volatile)
+    (candidates . (lambda ()
+                    (with-current-buffer anything-current-buffer
+                      (directory-files default-directory))))
+    ;; volatile is not needed, I think.
     (type . file)))
 ;; (anything 'anything-c-source-files-in-current-dir)
 


(defvar anything-c-source-emacs-process
  '((name . "Emacs Process")
    (candidates . (lambda ()
                    (mapcar #'process-name
                            (process-list))))
    (action . (("Kill Process" . (lambda (elm)
                                   (delete-process (get-process elm))))))))

;; (anything 'anything-c-source-emacs-process)


                   ('install "sudo emerge -av ")
                   ('uninstall "sudo emerge -avC ")
                   (t (error "Unknow action")))))
  (if (anything-marked-candidates)
      (let ((elms (mapconcat 'identity (anything-marked-candidates) " ")))
        (insert (concat command elms)))
      (insert (concat command candidate)))))

