Skip to content

Instantly share code, notes, and snippets.

View jone's full-sized avatar

Jonas Baumann jone

View GitHub Profile
(defun find-buildout-root (path)
"Search PATH for a buildout root.
If a buildout root is found return the path, othwise return
nil."
;; find the most top one, not the first one
(let ((dir default-directory)
(previous nil))
(while dir
(let ((dir (find-parent-with-file dir "boostrap.py")))
(defun jone-filter (condp lst)
(delq nil
(mapcar (lambda (x) (and (funcall condp x) x)) lst)))
(jone-filter (lambda (e) (string= e "hans")) ("hans" "peter"))